When I click on the pie chart, the corresponding content appears and the pie chart display content is re-rendered. Pie chart click event
('click', (params) => { });
What you get is the corresponding section name of the click. Use the acquired section name to retrieve the corresponding data from the interface. The data is called asynchronously, so the re-rendered view must be rendered in asynchronously, otherwise the data will not be rendered synchronously.
var options = () [0].data = (options)
getoption() is to get the current view configuration item, reassign the settings() is to mount the configuration item, complete code
initconechart () { = this.$(('conechart')); const option = { title: { text: 'Risk proportion', // subtext: 'Fake Data', left: '45%', top: "20px", textStyle:{ fontSize:30, } }, tooltip: { trigger: 'item' }, legend: { type: 'scroll', orient: 'vertical', left: 'left', top:5, }, series: [ { name: 'Access From', type: 'pie', radius: '50%', left:"10%", top:"15%", data: , emphasis: { itemStyle: { shadowBlur: 10, shadowOffsetX: 0, shadowColor: 'rgba(0, 0, 0, 0.5)' } }, label: { alignTo: "labelLine", distanceToLabelLine: 10, edgeDistance: "15%" }, labelLayout: { fontSize: "16" } } ] }; (option) ('click', (params) => { if ( == 0) { () } }); },
If judged as a switch, control can only be clicked once
// Update the viewgetWarnInfoBySecond(name) { getWarnInfoBySecond(name).then(res => { var options = () [0].data = (options) = 1 }) },
Summarize
This is the end of this article about how to re-render Echarts. For more related content related to re-rendering of Echarts, please search for my previous articles or continue browsing the related articles below. I hope everyone will support me in the future!