highcharts / highcharts-editor

https://www.highcharts.com/products/highcharts-editor
Other
248 stars 95 forks source link

Changing template now overwrites customizedOptions #180

Closed kai2468 closed 6 years ago

kai2468 commented 6 years ago

Template options would get overwritten when merging with customizedOptions at line 414. Ive just overwritten the customized options with the new template options before it gets to that step

jigar-sheth commented 6 years ago

@kai2468 - I tried to pinch your change and stick it into my local version and I am having issues with changing templates.

  1. If I select "Inverted" from Line chart templates then I cant go back to normal Line chart, it always remains inverted
  2. If I select any of the Bar charts then I cant go back to Line, Column etc.
  3. Same as above if I choose Column charts
  4. If I choose "Funnel" and then choose "Pyramid", the "Pyramid" displays as inverted Funnel.

Thanks.

kai2468 commented 6 years ago

@jigar-sheth Yes, youre right, I was merging the template options before they had a chance to get merged with the users customized options but it ended up causing all sorts of problems with the chart options set up by the user, like you encountered. Anyway Ive pushed a new fix that changes the order of the merging