I'm trying to write a graph where the user can configure what data she wants to see.
I implemented a first version based on the remote data binding demo that uses a model describing all data point of the given "column":
Html.KendoEscapeTemplate(Html.Kendo().Chart<
Peppermint.ApplicationCore.ViewModel.FiscalYearSerieDataPointVM
>() ...
With the VM being:
public class FiscalYearSerieDataPointVM
{
public int MonthNumber { get; set; }
public decimal CurrentFiscalYearDataPoint { get; set; }
public decimal? PreviousFiscalYearDataPoint { get; set; }
}
That, obviously, will not work when the char is configured by the user and could have any number of different lines. It's also not very practical to generate data in a "vertical" format because I have to run all queries first and then pivot the result into a collection of FiscalYearSerieDataPointVM
How am I supposed to work around that problem? Am I supposed to use a dynamic object instead of a ViewModel?