SeriesList sList = new SeriesList();
sList.ChartType = ChartType.Column;
AxisArea tk = new AxisArea("safe", 0, 300);
tk.BackColor = Color.FromArgb(50, Color.Red);
tk.TextFormat.Alignment = StringAlignment.Far;
sList.AxisFactor.YAxis.Areas.Add(tk);
AxisArea tk2 = new AxisArea("low", 300, 500);
tk2.BackColor = Color.FromArgb(100, Color.Red);
tk2.TextFormat.Alignment = StringAlignment.Far;
sList.AxisFactor.YAxis.Areas.Add(tk2);
AxisArea tk3 = new AxisArea("normal", 500, 700);
tk3.BackColor = Color.FromArgb(150, Color.Red);
tk3.TextFormat.Alignment = StringAlignment.Far;
sList.AxisFactor.YAxis.Areas.Add(tk3);
AxisArea tk4 = new AxisArea("dangerous", 700, 900);
tk4.BackColor = Color.FromArgb(200, Color.Red);
tk4.TextFormat.Alignment = StringAlignment.Far;
sList.AxisFactor.YAxis.Areas.Add(tk4);
Random r = new Random();
for(int i = 0; i < 4; i++)
{
Series sr = new Series();
sr.Points.Width = 6;
sr.Points.PointType = PointType.FillRectangle;
for(int x = 0; x < 3; x++)
{
SeriesItem item = new SeriesItem();
item.Name = "item" + x.ToString();
item.XValue = x;
item.YValue = r.Next(900);
sr.items.Add(item);
}
sList.SeriesCollection.Add(sr);
}
this.hHippoChart1.DesignType = ChartDesignType.Simple;
this.hHippoChart1.SeriesListDictionary.Add(sList);
this.hHippoChart1.DrawChart();
Dim sList As New. SeriesList()
sList.ChartType = ChartType.Column
Dim tk As New. AxisArea("safe", 0, 300)
tk.BackColor = Color.FromArgb(50, Color.Red)
tk.TextFormat.Alignment = StringAlignment.Far
sList.AxisFactor.YAxis.Areas.Add(tk)
Dim tk2 As New. AxisArea("low", 300, 500)
tk2.BackColor = Color.FromArgb(100, Color.Red)
tk2.TextFormat.Alignment = StringAlignment.Far
sList.AxisFactor.YAxis.Areas.Add(tk2)
Dim tk3 As New. AxisArea("normal", 500, 700)
tk3.BackColor = Color.FromArgb(150, Color.Red)
tk3.TextFormat.Alignment = StringAlignment.Far
sList.AxisFactor.YAxis.Areas.Add(tk3)
Dim tk4 As New. AxisArea("dangerous", 700, 900)
tk4.BackColor = Color.FromArgb(200, Color.Red)
tk4.TextFormat.Alignment = StringAlignment.Far
sList.AxisFactor.YAxis.Areas.Add(tk4)
Dim r As New. Random()
For i As Integer = 0 To 3
Dim sr As New. Series()
sr.Points.Width = 6
sr.Points.PointType = PointType.FillRectangle
For x As Integer = 0 To 2
Dim item As New. SeriesItem()
item.Name = "item" & x.ToString()
item.XValue = x
item.YValue = r.[Next](900)
sr.items.Add(item)
Next
sList.SeriesCollection.Add(sr)
Next
Me.hHippoChart1.DesignType = ChartDesignType.Simple
Me.hHippoChart1.SeriesListDictionary.Add(sList)
Me.hHippoChart1.DrawChart()