-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
While running deserializeModel running into some problem. #3
Comments
@McQuinTrix |
Hi @Shestac92 , So I was just testing out this plugin in sample application with this url : https://www.anychart.com/features/chart_editor/chart-editor.min.js .
If I remove the first and last When I pass it as:
where |
Hi @Shestac92 , I think I know why it is happening. Suppose we have instantiated If I instantiate new
So, we cannot deserialize model of Chart A on Chart B ? Because only difference between both model was the If not, how to edit a chart which was previously built ? |
@McQuinTrix |
@Shestac92 Thank you! Can you please let me know how to restore model of Chart B ? I think to get model of Chart A we need to do |
@McQuinTrix |
Would the chart editor be suitable for the following use case? Using Chart Editor we configure all the settings and then store the chart configuration in a database. |
@ajay12thwonder Unfortunately, we have no model of the chart to reproduce the issue. |
I tried this
I stored the model in the database. I don't see an API to initialize the editor with model. Can you please point me in the right direction. |
So I have made a codepen to make this easier to explain: Editor 1 loads on "Generate Editor 1" and Editor 2 loads on "editorComplete" event of Editor 1 where I am passing the model of Editor 1 to Editor 2 before instantiating like this :
Is this how to use the model ? |
@McQuinTrix
Also, I want to warn you, that model doesn't include chart data. It means that one can create a chart with the same settings but new data. In the sample above, in the second editor, you can choose another data preset but you will get the same chart just with new data. |
Hello there,
I am using chart editor for an angular application. While creating the chart I face no problem. We save the json string from
serializeModel
in database. When we are getting data and putting the string indeserializeModel
it throws an errorI tried doing same from console replacing the starting and ending
"
with the ES6 ` (tilde). It works fine. I tried various ways to resolve it but not working. Can you please let me know how you deserializeModel in your application if you have used it ?The text was updated successfully, but these errors were encountered: