Open DiegoCardoso opened 22 hours ago
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
While this is true in the latest version of the library, I could verify that adding and removing series dynamically through Chart#addSeries() and Series#remove() (these are methods in the HighCharts API) are not reflected on the userOptions object in the version we are current using
I noticed that addSeries
works as long as you also call drawChart
:
chart.getConfiguration().addSeries(new ListSeries("Foobar", 107, 31, 635, 203, 2));
chart.drawChart();
Description
Fix an issue where a chart defined using the
updateConfiguration
method loses its configuration after detaching and re-attaching. This fix stores theuserOptions
object when the component is disconnected to use it again when the component is connected back later.The
userOptions
, according to the Highcharts documentation is:While this is true in the latest version of the library, I could verify that adding and removing series dynamically through
Chart#addSeries()
andSeries#remove()
(these are methods in the HighCharts API) are not reflected on theuserOptions
object in the version we are current using. That might be problematic for cases where series are added through theConfiguration#addSeries()
API in the Flow component. I believe that this fix proposal will cover most of the cases, hence I am creating it for discussion.Fixes https://github.com/vaadin/flow-components/issues/6802
Type of change