You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's a requirement brought about by the logic in getSeriesMap and it's uses in ember-highcharts/components/high-charts that all series names' are unique within a single chart.
I thought that this was for the best the first time I hit this behavior and simply renamed the chart series (the names were the same because the charts are generated from a web form and the user happened to add the same series to a chart twice during editing session).
To reproduce:
add several series to the highchart with the same value for name.
wait for initial render to complete: notice that the chart renders fine
cause a re-render (e.g., if chart options are rendered from a computed property whose dependent key changes)
result:
all but one of the series with the same name are removed from the chart
The case for not using name as a unique key
TODO (I have a use case in our app for this that I can describe later)
Workaround
I have monkey-patched ember-highcharts locally by modifying the a couple of functions:
As well as updated didReceiveAttrs of the high-charts component. To use the getSeriesMapKey function.
I'm happy to create a better description of the issue, a reproduction app using ember-fiddle, and discussing workarounds, as well as PRing a permanent fix here.
The text was updated successfully, but these errors were encountered:
There's a requirement brought about by the logic in
getSeriesMap
and it's uses inember-highcharts/components/high-charts
that all series names' are unique within a single chart.I thought that this was for the best the first time I hit this behavior and simply renamed the chart series (the names were the same because the charts are generated from a web form and the user happened to add the same series to a chart twice during editing session).
To reproduce:
name
.result:
The case for not using name as a unique key
Workaround
I have monkey-patched ember-highcharts locally by modifying the a couple of functions:
As well as updated
didReceiveAttrs
of thehigh-charts
component. To use thegetSeriesMapKey
function.I'm happy to create a better description of the issue, a reproduction app using ember-fiddle, and discussing workarounds, as well as PRing a permanent fix here.
The text was updated successfully, but these errors were encountered: