Closed microwin168 closed 2 years ago
There is a bug in the demo page. The event emitters are case sensitive. Please refer to the source file: https://github.com/xieziyu/ngx-echarts/blob/master/src/app/pages/demo-basic/basic/basic-events/basic-events.component.html
Thanks,It works
when I use the demo code ,the event is not work ,I don't know why this happen?
<div echarts [options]="options" class="demo-chart" (chartinit)="onChartEvent($event, 'chartInit')" (chartclick)="onChartEvent($event, 'chartClick')" (chartdblclick)="onChartEvent($event, 'chartDblClick')" (chartmousedown)="onChartEvent($event, 'chartMouseDown')" (chartmouseup)="onChartEvent($event, 'chartMouseUp')" (chartmouseover)="onChartEvent($event, 'chartMouseOver')" (chartmouseout)="onChartEvent($event, 'chartMouseOut')" (chartglobalout)="onChartEvent($event, 'chartGlobalOut')" (chartcontextmenu)="onChartEvent($event, 'chartContextMenu')" (chartdatazoom)="onChartEvent($event, 'chartDataZoom')"> </div>
onChartEvent(event: any, type: string) { console.log('chart event:', type, event); }