Skip to content

Commit

Permalink
[#1575] Chart > Scatter Chart > Real Time Scatter 시리즈 그리는 순서 변경 필요 (#…
Browse files Browse the repository at this point in the history
…1576)

* [#1575] Chart > Scatter Chart > Real Time Scatter 시리즈 그리는 순서 변경 필요

- realTimeScatter일 경우 series를 reverse

* [#1575] Chart > Scatter Chart > Real Time Scatter 시리즈 그리는 순서 변경 필요
######

- package version up

* [#1575] Chart > Scatter Chart > Real Time Scatter 시리즈 그리는 순서 변경 필요
######

- 좀더 가독성 좋은 코드로 변경

* [#1575] Chart > Scatter Chart > Real Time Scatter 시리즈 그리는 순서 변경 필요
######

- evChart.dataSet을 못 찾는 경우 에러 발생.
  • Loading branch information
sonky740 authored Jan 15, 2024
1 parent 2e54fe8 commit b530cf6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "evui",
"version": "3.4.29",
"version": "3.4.30",
"description": "A EXEM Library project",
"author": "exem <dev_client@ex-em.com>",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion src/components/chart/Chart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@
watch(() => props.realTimeScatterReset, (flag) => {
if (flag) {
Object.keys(evChart.dataSet).forEach((series) => {
Object.keys(evChart.dataSet ?? {}).forEach((series) => {
if (evChart.dataSet[series]) {
evChart.dataSet[series].dataGroup = [];
}
Expand Down
6 changes: 5 additions & 1 deletion src/components/chart/chart.core.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ class EvChart {
const chartTypeSet = this.seriesInfo.charts[chartType];

for (let jx = 0; jx < chartTypeSet.length; jx++) {
const series = this.seriesList[chartTypeSet[jx]];
let series = this.seriesList[chartTypeSet[jx]];

switch (chartType) {
case 'line': {
Expand Down Expand Up @@ -327,6 +327,10 @@ class EvChart {
}
}

if (this.options.realTimeScatter?.use) {
series = this.seriesList[chartTypeSet.at(-1 - jx)];
}

series.draw({
legendHitInfo,
selectInfo,
Expand Down

0 comments on commit b530cf6

Please sign in to comment.