highslide-software/highcharts.com — Issue #545: Changing series type doesn't work
Author: josephruscio
Created: 2011-11-02 01:35:12+00:00
State: open

We have a dynamically updating chart that we call `setData` on with any new data on a regular period. Users can also change the certain attributes of the chart using an external form we provide. There is a checkbox that is intended to let the user switch the series (and thereby the graph) between *line* and *area*. When they click on our update `button` we attempt to update the series e.g.:

# Take care of per-series attributes
for series in @chart.series

# Don't touch the nav series
continue if series.name is "Navigator"

# handle updated display_stacked
series.type = @getChartType()
series.options.type = @getChartType()

`getChartType()` is a function that returns either *line* or *area* depending on the state of the checkbox. After calling `@chart.redraw()` I would expect to see the graph change between types. This is not happening.