ReinisV commented on issue #18449: URL: https://github.com/apache/echarts/issues/18449#issuecomment-1491319756
Oh, okay, that makes sense. I was actually using the Vue wrapper `https://github.com/ecomfe/vue-echarts` which takes advantage of Vue's reactivity system, so it requires you to only pass in the options object as a property to the chart component, and then inside of the component, performs the watching for changes on the object and calls the `setOption` [method](https://github.com/ecomfe/vue-echarts/blob/b86280e1f08338eae7b5f717649d3a2ac6da883f/src/ECharts.ts#L178). from that standpoint it is not as obvious that when changing the options object passed to the component, you are not declaring a state for the chart, but you are creating a merge request. there is the `update-options` [attribute ](https://github.com/ecomfe/vue-echarts#props) that allows passing that config to avoid merging, but from the [docs](https://echarts.apache.org/en/api.html#echartsInstance.setOption), it seems it comes with its own drawbacks, like loss of internal state (selections, etc) and possibly some performance penalties. anyway, while the interface of the Vue component is theoretically incorrect, I understand that for it to not be that way would a whole bunch of complexity just for handling a few edge cases. I'll try using the `replaceMerge` field and see where that gets me. Thanks! -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
