xiyang2333 opened a new issue #10977: 散点-pie图中datazoom的问题 URL: https://github.com/apache/incubator-echarts/issues/10977 ### What problem does this feature solve? 在散点-pie的mix图中,pie会在散点图加载后动态替换途中的散点,如果加上datazoom,会导致只有坐标轴被放大而图标不变。 如果加上监听事件,在zoom后动态再次替换,会导致异常情况发生,请问如何处理这样的问题? ### What does the proposed API look like? function buildPieSeries(){ // var xAxis = myChart.component.xAxis.getAxis(0); // var yAxis = myChart.component.yAxis.getAxis(0); var len = sData1.length; option.series = option.series.slice(0,3); option.legend = { data : ['p', 'n', 'e'] }; while (len--) { var x = myChart.convertToPixel({xAxisIndex: 0}, sData1[len][0]); var y = myChart.convertToPixel({yAxisIndex: 0}, sData1[len][1]); console.log(x, y); option.series.push({ type: 'pie', itemStyle : { normal : { label : { show : false }, labelLine : { show : false } } }, radius : sData1[len][2] sData2[len][2] sData3[len][2], center: [ x,y ], data: [ {name: 'p', value: sData1[len][2]}, {name: 'n', value: sData2[len][2]}, {name: 'e', value: sData3[len][2]} ] }) } option.animation = true; myChart.setOption(option, true); window.onresize = buildPieSeries; } // 构造出一系列的饼图代替原来的散点,需要在散点画出来后才能获取到散点的坐标,setTimeout! setTimeout(buildPieSeries, 100); myChart.on('datazoom', buildPieSeries); <!-- This issue is generated by echarts-issue-helper. DO NOT REMOVE -->
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@echarts.apache.org For additional commands, e-mail: dev-h...@echarts.apache.org