see this code
protected void Page_Load(object sender, EventArgs e)
{
chart.InitChart(new Chart
{
Type = ChartTypes.Spline,
BackgroundColor = new BackColorOrGradient(System.Drawing.Color.FromName("'#f1f2f7'")),
ZoomType = ZoomTypes.X
})
.SetTitle(new Title
{
Text = ""
})
.SetLegend(new Legend
{
Enabled = true
//BackgroundColor = new BackColorOrGradient(System.Drawing.Color.FromName("'#ffffff'"))
})
.SetXAxis(new XAxis
{
Type = AxisTypes.Datetime,
DateTimeLabelFormats = new DateTimeLabel
{
Month = "%e. %b",
Year = "%b"
},
Labels = new XAxisLabels
{
StaggerLines = 2
}
})
.SetTooltip(new Tooltip
{
Shared = true,
Shadow = true
})
.SetYAxis(new YAxis
{
Title = new YAxisTitle
{
Text = ""
}
})
.SetSeries(new[]
{
new Series{
Name = "Parameter1",
Type = ChartTypes.Column,
Data = new Data(new object[] { "3200", "1300", "1400", "1600", "1800", "2000", "2200", "2300", "2400", "2500", "2600", "3200" }),
Color = System.Drawing.Color.FromName("'#4CB7A5'")
},
new Series{
Name = "Parameter2",
Type = ChartTypes.Line,
Data = new Data(new object[] { 1100, 1500, 1200, 1800, 2000, 2100, 2300, 2500,2600, 2700, 2800, 2900 }),
Color = System.Drawing.Color.FromName("'#ff6c60'")
},
});
litChart.text = chart.ToHtmlString();
}
in this code I want to bind data from database in series so how can i bind data from database
in above they have two parameters in series parameter1 and parameter2.
they have hardcoded array . I want to make it dynamic.please give solution with any small example.
thank you