highcharts / highcharts-editor

https://www.highcharts.com/products/highcharts-editor
Other
250 stars 96 forks source link

defaultChartOptions loads chart, but editor UI controls aren't set the values in the options #186

Open Nexlen opened 5 years ago

Nexlen commented 5 years ago

Expected behaviour

Options for controls are inherited from the defaultChartOptions object.

Actual behaviour

The minute the user clicks any option the template defaults are set. Making it impossible for a user to adjust a single value without resetting all the other values.

Reproduction steps

create an editor with defaultChartOptions.

var data0 = '"name","val"
"Users",4054
"Premium", 725';

highed.Editor(document.body,{defaultChartOptions: 
                    {"title": { "text": "Accounts"},"subtitle": { "text": ""},"exporting": {},"chart": { "type": "pie", "polar": false},"plotOptions": { "pie": {"allowPointSelect": true,"cursor": true,"showInLegend": true,"innerSize": "60%","dataLabels": { "enabled": false} }, "series": {"animation": false,"dataLabels": {} }},"series": [ {"name": "val","turboThreshold": 0,"_colorIndex": 0,"_symbolIndex": 0,"marker": {},"type": "pie" }],"data": { "csv": data0, "googleSpreadsheetKey": false, "googleSpreadsheetWorksheet": false},"yAxis": [ {"title": { "text": ""},"labels": {} }],"colors": [ "#3d5afe", "#f44336", "#76ff03", "#ffeb3b", "#512da8", "#37474f", "#5d4037", "#4caf50", "#9575cd", "#f06292"],"xAxis": [ {"title": {},"labels": {} }],"lang": { "thousandsSep": ","},"credits": { "enabled": false}}
                    });

The Editor loads visually: screen shot 2018-12-05 at 11 29 10 am

However the options are out of sync for the controls

screen shot 2018-12-05 at 11 29 39 am

The minute the user clicks any option the template defaults are set. Making it impossible for a user to adjust a single value without resetting all the other values.

Editor version

0.2.2

Affected browser(s)

Chrome and Firefox (don't have a windows machine to test Edge or IE)