Replies: 2 comments 11 replies
-
Saving and loading of drawings would be out of scope for Lightweight Charts. It would be completely up to you to implement this. You would probably want to add 'save' methods to your plugins which return an object containing all the state to replicate the drawing. When you want to save the drawings then you would iterate over all the plugins, calling this 'save' method and collecting the data into an object tracking the plugin used and the data saved. Later when you want to load then data then you would read that object, create instances of each plugin that is found in that data, and then use a 'load' method which can be provided the state data, and set the correct internal variables so that the drawings are restored. There would be a lot of different ways to implement a load / save functionality. |
Beta Was this translation helpful? Give feedback.
-
Hi , I really appreciate the reply , can u suggest which is bestway or How would you do it , for example user scribbles some drawing or draw circle over the chart , how would you handle it.. This is out of lightningchart scope , but chatgpt cannot able to help as they dont have much info about primitives from lwc.Give me some tips if you have some time. |
Beta Was this translation helpful? Give feedback.
-
Hello , I am creating various drawing tools for my lightweight chart, After user draws which I do via Drawing primitives , How to save this data and restore it,
Small example or guidance will be really helpful , thanks @SlicedSilver
Beta Was this translation helpful? Give feedback.
All reactions