Skip to content

Commit 202ad1c

Browse files
author
Xie, Ziyu
authored
Merge pull request #48 from xieziyu/bugfix
release v2.0.1
2 parents c274e39 + f128dcc commit 202ad1c

File tree

4 files changed

+19
-12
lines changed

4 files changed

+19
-12
lines changed

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ Angular directive for echarts v3. (The project is renamed from **angular2-echart
2121
`ngx-echarts` is an Angular (ver >= 2.x) directive for ECharts 3.
2222

2323
# Latest Update
24+
+ 2017.12.11: v2.0.1. Fix issue: No change detection involved in event handler. Refer to issue [#26](https://github.com/xieziyu/ngx-echarts/issues/26), [#28](https://github.com/xieziyu/ngx-echarts/issues/28)
25+
2426
+ 2017.12.04: v2.0.0. Provide an echarts wrapper service: NgxEchartsService. Please see [demo](https://xieziyu.github.io/ngx-echarts/#/usage/NgxEchartsService)
2527

2628
+ 2017.11.25: v2.0.0-beta.0. It has some [BREAKING CHANGES](https://github.com/xieziyu/ngx-echarts/blob/master/src/assets/CHANGELOG.md) you should know.

lib/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ngx-echarts",
3-
"version": "2.0.0",
3+
"version": "2.0.1",
44
"description": "Angular directive for ECharts 3",
55
"repository": "https://github.com/xieziyu/ngx-echarts.git",
66
"author": "Xie, Ziyu <[email protected]>",

lib/src/directive/ngx-echarts.directive.ts

+9-9
Original file line numberDiff line numberDiff line change
@@ -89,16 +89,16 @@ export class NgxEchartsDirective implements OnChanges, OnDestroy {
8989
private registerEvents(_chart: any) {
9090
if (_chart) {
9191
// register mouse events:
92-
_chart.on('click', e => this.chartClick.emit(e));
93-
_chart.on('dblClick', e => this.chartDblClick.emit(e));
94-
_chart.on('mousedown', e => this.chartMouseDown.emit(e));
95-
_chart.on('mouseup', e => this.chartMouseUp.emit(e));
96-
_chart.on('mouseover', e => this.chartMouseOver.emit(e));
97-
_chart.on('mouseout', e => this.chartMouseOut.emit(e));
98-
_chart.on('globalout', e => this.chartGlobalOut.emit(e));
99-
_chart.on('contextmenu', e => this.chartContextMenu.emit(e));
92+
_chart.on('click', e => this._ngZone.run(() => this.chartClick.emit(e)));
93+
_chart.on('dblClick', e => this._ngZone.run(() => this.chartDblClick.emit(e)));
94+
_chart.on('mousedown', e => this._ngZone.run(() => this.chartMouseDown.emit(e)));
95+
_chart.on('mouseup', e => this._ngZone.run(() => this.chartMouseUp.emit(e)));
96+
_chart.on('mouseover', e => this._ngZone.run(() => this.chartMouseOver.emit(e)));
97+
_chart.on('mouseout', e => this._ngZone.run(() => this.chartMouseOut.emit(e)));
98+
_chart.on('globalout', e => this._ngZone.run(() => this.chartGlobalOut.emit(e)));
99+
_chart.on('contextmenu', e => this._ngZone.run(() => this.chartContextMenu.emit(e)));
100100
// other events;
101-
_chart.on('datazoom', e => this.chartDataZoom.emit(e));
101+
_chart.on('datazoom', e => this._ngZone.run(() => this.chartDataZoom.emit(e)));
102102
}
103103
}
104104

src/assets/CHANGELOG.md

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
1+
## 2.0.1 (2017-12-11)
2+
3+
#### Bugfix
4+
+ Fix issue: No change detection involved in event handler. [#26](https://github.com/xieziyu/ngx-echarts/issues/26), [#28](https://github.com/xieziyu/ngx-echarts/issues/28)
5+
16
## 2.0.0 (2017-12-04)
27

3-
#### NEW
8+
#### New
49
+ New Service: `NgxEchartsService` provided. Refer to [API document](https://xieziyu.github.io/ngx-echarts/api-doc/injectables/NgxEchartsService.html) for details
510

611
## 2.0.0-beta.0 (2017-11-25)
712

8-
#### NEW
13+
#### New
914
+ New input: `[merge]`. The value of `[merge]` will be merged into `[options]`. So it's perfect for updating chart data series. Refer to [ECharts documentation](https://ecomfe.github.io/echarts-doc/public/en/api.html#echartsInstance.setOption) for details
1015

1116
+ New input: `[initOpts]`. The value of `[initOpts]` will be used in `echarts.init()`. It may contain `devicePixelRatio`, `renderer`, `width` or `height` properties. Refer to [ECharts documentation](https://ecomfe.github.io/echarts-doc/public/en/api.html#echarts.init) for details

0 commit comments

Comments
 (0)