-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to change the series type in XYChart in amcharts5? From LineSeries to ColumnSeries? #1829
Comments
Yes @nikichak , You can switch to the column series from line series. You just have to set the properties of valueAxis and dateAxis properly. If, Still facing issue then can you post a codepen link? |
There's no way to change type of the series on an existing series object. You would need to:
|
@martynasma thanks for your suggestion. Could you give hints on what to watch while debugging? Thanks. |
One thing that comes to mind: are you setting |
Yes I am, they are also present when I log the amcharts.series list. |
In that case we'll need a demo. The process should just work. |
InitialIy when I'm instantiating the chart I have LineSeries created and added to the chart. I have external menu from which the user can select the Series type.
Let's say they've selected ColumnSeries. What I should do is to remove old LineSeries, to instantiate the new ColumnSeries and to add them to the chart.
However when I try this.amChart.series.clear(), the old series are removed and when I instantiate the ColumnSeries and add them to the chart they are not rendered. When I try to add initially ColumnSeries instead of LineSeries they are working correctly.
Is it even possible to replace the series in an XYChart? If so, could you please provide an example?
Thanks!
The text was updated successfully, but these errors were encountered: