975
adding chart series dynamically with MVC helpers
posted

 I need to be able to dynamically add multiple series to a chart based on the underlying data.  For example.

In my data I may have multiple price values for jul-18, aug-18, sep-18

OR i could have

Jan-18, Feb-18, Mar-18, Apr-18, etc, etc

I wont know this until Ive generated the data.  So at runtime for the former above Id have 3 series and for the latter Id have 4 series.  I can determine the number of unique date periods in my code (C#) so I could have this available for some razor code to iterate though.  How can this be achieved in my chart definition ?  Im using MVC helpers so could be please provide any examples in this format NOT javascript.

many thanks