Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Telerik MVC Extensions (superseded) > Chart > Multiple series in the model

Not answered Multiple series in the model

Feed from this thread
  • Fab avatar

    Posted on Jan 10, 2012 (permalink)

    Hello,

    in the demos you show how to display multiple series : the model has a propoerty for each serie
    public class SalesData
    {
      public string RepName { get; set; }
      public string DateString { get; set; }
      public decimal? TotalSales { get; set; }
      public decimal? RepSales { get; set; }
    }

    I want to bind a list of series and all that series should be displayed
    ie with my Model :
    public class ChartData<T>
    {
       public string Title { get; set; }
       public List<ChartSerie<T>> Series { get; set; }
    }
     
    public class ChartSerie<T>
    {
      public string Name { get; set; }
      public List<T> Values { get; set; }
      public String Format { get; set; }
    }

    so in my controller, I add multiple series
    ChartData<float> chartData = new ChartData<float>();
    ChartSerie<float> serieA = new ChartSerie<float>();
    ChartSerie<float> serieB = new ChartSerie<float>();
    ChartSerie<float> serieC = new ChartSerie<float>();
    chartData.Series.Add(serieA);
    chartData.Series.Add(serieB);
    chartData.Series.Add(serieC);
    //.... add values to series ...

    is it possible to do that ? if so, how can i code the view ?
    Thanks a lot

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Telerik MVC Extensions (superseded) > Chart > Multiple series in the model
Related resources for "Multiple series in the model"

ASP.NET MVC Chart Features  |  Documentation  |  Demos  |  Telerik TV ]