Skip to content

Commit

Permalink
fix: resolve emitted data of grouped series models(fix #565) (#582)
Browse files Browse the repository at this point in the history
  • Loading branch information
jungeun-cho committed Feb 18, 2021
1 parent 4ad3700 commit 5007db9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion apps/chart/src/component/lineSeries.ts
Expand Up @@ -255,7 +255,7 @@ export default class LineSeries extends Component {
this.rect.width,
getCoordinateXValue(datum as CoordinateDataType),
getCoordinateDataIndex(datum, categories, idx, this.startIndex),
xAxisLimit,
xAxisLimit
);
points.push({ x, y, value });
});
Expand Down
6 changes: 4 additions & 2 deletions apps/chart/src/component/selectedSeries.ts
Expand Up @@ -20,6 +20,8 @@ type ActiveSeriesNames = { [key in TooltipModelName]: string[] };
export default class SelectedSeries extends Component {
models: ResponderSeriesModel = {} as ResponderSeriesModel;

seriesModels: ResponderSeriesModel = {} as ResponderSeriesModel;

activeSeriesNames: ActiveSeriesNames = {} as ActiveSeriesNames;

isShow = false;
Expand Down Expand Up @@ -101,11 +103,11 @@ export default class SelectedSeries extends Component {
})
? []
: models;

this.seriesModels[alias || name] = this.getSelectedSeriesModels(selectedSeriesEventModel);
this.isShow = !!Object.values(this.models).flatMap((value) => value).length;
this.eventBus.emit(
this.isShow ? 'selectSeries' : 'unselectSeries',
makeObservableObjectToNormal(this.getSelectedSeriesModels(selectedSeriesEventModel))
makeObservableObjectToNormal(this.seriesModels)
);
this.activeSeriesNames[name] = this.getSeriesNames(selectedSeriesEventModel.models, name);
this.setActiveState();
Expand Down

2 comments on commit 5007db9

@rajhen96
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @jungeun-cho ,
Currently, l'm using javascript Library for toast UI charts.How can I use the fix in minified JS and CSS?

@jungeun-cho
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rajhen96
We will be releasing 4.1.0 today.

Please sign in to comment.