Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
Adding series dynamically to igDataChart and assigning data


I need to show several data series in one igDataChart (mostly line charts). The number of series shown can vary, so I need to add or remove data series dynamically (as well as adjusting the legend) at runtime.

This is an example of my data (whereas the number of Series can vary):

var data = [{"Series":1,"X":0.0,"Y":10.0},

Based on the High Volume Example (, I failed to add multiple dataSerires.

How do I create dynamically dataSeries for the igDatachart and how do I assign the data dynamically the corresping dataseries? I couldn't find any related examples. 

Kind regards.


edit 2020-03-26:

Mistake in embedded code window removed

  • 620
    Verified Answer
    Offline posted


    I have created and attached a sample illustrating how to dynamically change the series and their legend. I had to convert the structure of the data you have provided in order to create the series dynamically. Please test it on your side and let me know how it behaves. If this is not an accurate demonstration of what you are trying to achieve please feel free to modify it and send it back to me along with steps to reproduce.

Reply Children