Hi,
I have two series of type
Series 1: {Date:1/1/2011,Hitcount:3,Date:1/12/13,Hitcount 4}
Series 2:{Date :1/1/2011,Hitcount 5,Date:1/12/13:Hitcount 5}
How do I generate Multiple series using dynamic binding
my kendo chart currently looks liek this
@(Html.Kendo().Chart<kendoNet.Models.ChartSeries>() // The chart will be bound to the Model which is the InternetUsers lis
.Name("Chart3")
.Title("Test")
// The name of the chart is mandatory. It specifies the "id" attribute of the widget.
.DataSource(dataSource =>
dataSource.Read(read => read.Action("Series", "Home", new { plname=ViewBag.Pl,test="VCS"})) // Specify the action method and controller name
)
.Legend(legend => legend
.Position(ChartLegendPosition.Bottom)
).ChartArea(chartArea => chartArea
.Background("transparent")
).SeriesDefaults(seriesDefaults =>
seriesDefaults.Line().Style(ChartLineStyle.Smooth)
)
.Series(series =>
{
//MODEL IS DICTIONARY CONTAINING THE TWO SERIES 1 AND SERIES 2 ,HOW DO WE DISPLAY MULTIPLE SERIES HERE
series.Line(model => model.Values).Name("HitCount").Labels(labels => labels.Visible(true).Color("Red")).Color("Blue");
})
.CategoryAxis(axis => axis
//.Categories(model => model.Date)
.Labels(labels => labels.Rotation(-65)
)
)
.ValueAxis(axis => axis
.Numeric().Labels(labels => labels.Format("{0}"))
.Line(line => line.Visible(false))
.AxisCrossingValue(-10)
)
.Tooltip(tooltip => tooltip
.Visible(true)
.Format("{0}")
)
)
I have two series of type
Series 1: {Date:1/1/2011,Hitcount:3,Date:1/12/13,Hitcount 4}
Series 2:{Date :1/1/2011,Hitcount 5,Date:1/12/13:Hitcount 5}
How do I generate Multiple series using dynamic binding
my kendo chart currently looks liek this
@(Html.Kendo().Chart<kendoNet.Models.ChartSeries>() // The chart will be bound to the Model which is the InternetUsers lis
.Name("Chart3")
.Title("Test")
// The name of the chart is mandatory. It specifies the "id" attribute of the widget.
.DataSource(dataSource =>
dataSource.Read(read => read.Action("Series", "Home", new { plname=ViewBag.Pl,test="VCS"})) // Specify the action method and controller name
)
.Legend(legend => legend
.Position(ChartLegendPosition.Bottom)
).ChartArea(chartArea => chartArea
.Background("transparent")
).SeriesDefaults(seriesDefaults =>
seriesDefaults.Line().Style(ChartLineStyle.Smooth)
)
.Series(series =>
{
//MODEL IS DICTIONARY CONTAINING THE TWO SERIES 1 AND SERIES 2 ,HOW DO WE DISPLAY MULTIPLE SERIES HERE
series.Line(model => model.Values).Name("HitCount").Labels(labels => labels.Visible(true).Color("Red")).Color("Blue");
})
.CategoryAxis(axis => axis
//.Categories(model => model.Date)
.Labels(labels => labels.Rotation(-65)
)
)
.ValueAxis(axis => axis
.Numeric().Labels(labels => labels.Format("{0}"))
.Line(line => line.Visible(false))
.AxisCrossingValue(-10)
)
.Tooltip(tooltip => tooltip
.Visible(true)
.Format("{0}")
)
)