amcharts / editor4

amCharts Chart Editor based on amCharts 4
Other
27 stars 36 forks source link

Import from Code is stripping properties #60

Closed ChazUK closed 3 years ago

ChazUK commented 3 years ago

I've been trying to import a chart from code into the editor and scratching my head why the properties listed in the docs aren't working properly. After diff'ing the original json config against the one that is displayed in the code tab on the editor I noticed that properties are being removed. heatRules is the main one which is causing issues.

Original https://gist.github.com/ChazUK/a6406eb9e9012b39d87d54756a35b289 -> https://codepen.io/ChazUK/pen/NWjgEeX

Screenshot 2021-07-19 at 17 43 47

Exported https://gist.github.com/ChazUK/fb1d4251af9e35ade77166c49328cf8e -> https://codepen.io/ChazUK/pen/QWvgzBo

Screenshot 2021-07-19 at 17 41 44

Is there a step in the import that expands / removes certain properties?

Also the legend is not being positioned correctly.

ailon commented 3 years ago

Hi Charles,

Unfortunately, heatRules are not supported by the Editor due to internal complexities.

While we try to support as many amCharts features as possible in the Editor, the general rule of thumb is that the Editor is mainly targeting scenarios where the charts being edited were created with Editor in the first place.