ngx-echarts icon indicating copy to clipboard operation
ngx-echarts copied to clipboard

user 'graphic' but no convertToPixel & convertFromPixel

Open cwtgogo opened this issue 6 years ago • 4 comments

i want to use 'graphic ' to drag a line,but ngx-echarts has no convertToPixel & convertFromPixel .could anyone help me solve this issue.thanks!

cwtgogo avatar Jul 09 '18 10:07 cwtgogo

@cwtgogo convertToPixel is a method of echartsInstance. You can get echartsInstance from (chartInit) event.

For example:

<div echarts class="demo-chart" [options]="chartOptions" (chartInit)="onChartInit($event)"></div>
onChartInit(ec) {
  this.myChart = ec;
  this.myChart.convertToPixel('geo', [128.3324, 89.5344]);
}

xieziyu avatar Jul 10 '18 15:07 xieziyu

Thanks for your answer!I will try it again!

cwtgogo avatar Jul 11 '18 10:07 cwtgogo

你好,请问用'graphic '拖动线,你成功了吗?我对照echarts官方示例,在angular上还是不行。 aaa

image

kang059089 avatar Aug 16 '18 08:08 kang059089

I am having trouble implementing this as well.

coreyasmith35 avatar Aug 24 '18 14:08 coreyasmith35