Managing app state with charming::Chart #137
Replies: 2 comments
-
I don't think you are missing something, there is no solution to this at the moment. Do you mind sharing your current implementation of the setters and getters? Maybe I can try to implement something that works in general. |
Beta Was this translation helpful? Give feedback.
-
Yes of course. In order to work on this, I created a minimal version of charming (omitted many modules) , to make breaking things more manageable. I will paste the code snippets of changed files here.
The methods implemented on If you prefer I can provide the entire files. Example usage: a module in a Tauri app
|
Beta Was this translation helpful? Give feedback.
-
I am developing a Tauri app with Vue and ECharts. The convenience of serializing a
charming::Chart
directly into the ECharts option is awesome! I am trying to use the charming data structure to within Tauri's state management system.As far as I can tell, there is no way to modify only certain components of the
Chart
instance. For example, imagine a user can change the color of a series from the UI. It seems to me that the entireChart
has to be rebuilt to change the color of a single series. I have been able to get around this by writing "getters"- and "setters"-like trait methods on various structs/enums, but am wondering if there is something I am missing or if there has already been thoughts on how such functionality could be implemented.Thanks for all the time and effort that has gone into charming so far! Looking forward to discussing this further.
Beta Was this translation helpful? Give feedback.
All reactions