Skip to content

Commit a77d895

Browse files
author
Xie, Ziyu
committedJun 1, 2017
release v1.2.1
support 'contextmenu' event
1 parent 8bff877 commit a77d895

File tree

4 files changed

+14
-1
lines changed

4 files changed

+14
-1
lines changed
 

‎CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
<a name="1.2.1"></a>
2+
## [1.2.1](https://github.com/xieziyu/ngx-echarts/compare/v1.2.0...v1.2.1) (2017-06-01)
3+
4+
### New
5+
+ Support `chartContextMenu` emitter for `contextmenu` event
6+
17
<a name="1.2.0"></a>
28
## [1.2.0](https://github.com/xieziyu/angular2-echarts/compare/v1.1.7...v1.2.0) (2017-05-18)
39

‎README.md

+3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ Angular directive for echarts v3. Please refer to the [demo](https://xieziyu.git
1414
ngx-echarts is an angular (ver >= 2.x) directive for ECharts v3.
1515

1616
# Latest Update
17+
+ 2017.06.01: Support `chartContextMenu` emitter for `contextmenu` event.
18+
1719
+ 2017.05.18: Publish `UMD` bundle
1820

1921
+ 2017.05.10: Support `theme`.
@@ -263,6 +265,7 @@ It supports following event outputs:
263265
+ `chartMouseOver`: It emits the same `params` of `'mouseover'` event
264266
+ `chartMouseOut`: It emits the same `params` of `'mouseout'` event
265267
+ `chartGlobalOut`: It emits the same `params` of `'globalout'` event
268+
+ `chartContextMenu`: It emits the same `params` of `'contextmenu'` event (since v1.2.1)
266269
+ `chartDataZoom`: It emits the same `params` of `'dataZoom'` event (thanks to averhaegen)
267270

268271
You can refer to the echarts tutorial: [Events and Actions in ECharts](https://ecomfe.github.io/echarts-doc/public/en/tutorial.html#Events%20and%20Actions%20in%20ECharts) for more details of the event params. You can also refer to the [demo](https://xieziyu.github.io/#/ngx-echarts/demo) page for the detailed example.

‎src/directive/angular-echarts.directive.ts

+4
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export class AngularEchartsDirective implements OnChanges, OnDestroy {
2020
@Output() chartMouseOver: EventEmitter<any> = new EventEmitter<any>();
2121
@Output() chartMouseOut: EventEmitter<any> = new EventEmitter<any>();
2222
@Output() chartGlobalOut: EventEmitter<any> = new EventEmitter<any>();
23+
@Output() chartContextMenu: EventEmitter<any> = new EventEmitter<any>();
2324
@Output() chartDataZoom: EventEmitter<any> = new EventEmitter<any>();
2425

2526
private myChart: any = null;
@@ -153,6 +154,9 @@ export class AngularEchartsDirective implements OnChanges, OnDestroy {
153154
myChart.on('mouseover', (e: any) => { this.chartMouseOver.emit(e); });
154155
myChart.on('mouseout', (e: any) => { this.chartMouseOut.emit(e); });
155156
myChart.on('globalout', (e: any) => { this.chartGlobalOut.emit(e); });
157+
myChart.on('contextmenu', (e: any) => { this.chartContextMenu.emit(e); });
158+
159+
// other events;
156160
myChart.on('dataZoom', (e: any) => { this.chartDataZoom.emit(e); });
157161
}
158162
}

‎src/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ngx-echarts",
3-
"version": "1.2.0",
3+
"version": "1.2.1",
44
"peerDependencies": {
55
"@angular/common": "*",
66
"@angular/compiler": "*",

0 commit comments

Comments
 (0)
Please sign in to comment.