highcharts / highcharts-editor

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

Custom steps for data import #124

Closed leots closed 7 years ago

leots commented 7 years ago

Hello, I would like to ask if it is possible to create custom steps for the Editor, instead of making a request based on some text fields?

What I would like to do, is have a step that shows a list of items (that I get via an ajax call) in a custom interface with my own HTML inside the step container, then the user would select one of the items and after this I can get the chart configuration to give to the editor... Is this possible at all?

Thanks, Leonidas

leots commented 7 years ago

I fixed my issue: I had to create my own version of the Editor (this part: https://github.com/highcharts/highcharts-editor/blob/master/src/editors/highed.editor.js#L128) and add custom functions that add my desired HTML for parameter selection inside the parent element of each tab, similar to highed.DataImporter, highed.ChartTemplateSelector etc.

I give the data to the editor via the editor.chart.data.settings() method.