SeriesList sList = new SeriesList();
sList.ChartType = ChartType.Line;
sList.AxisFactor.YAxis.IsAutoSetting = false;
sList.AxisFactor.YAxis.MinUnitValue = -500;
sList.AxisFactor.YAxis.MaxUnitValue = 2500;
sList.AxisFactor.YAxis.Interval = 500;
Random r = new Random();
for(int i = 0; i < 2; i++)
{
Series sr = new Series();
sr.Line.LineWidth = 2;
sr.Points.Width = 5;
sr.Points.PointType = PointType.FillRectangle;
if (i == 1)
{
sr.ChartType = ChartType.Column;
}
for(int x = 0; x < 50; x++)
{
SeriesItem item = new SeriesItem();
item.Name = "item" + x.ToString();
item.YValue = r.Next(1000, 2000);
if (i == 1)
{
item.YValue = -1 * r.Next(500);
}
sr.items.Add(item);
}
sList.SeriesCollection.Add(sr);
}
this.hHippoChart1.SeriesListDictionary.Add(sList);
this.hHippoChart1.DrawChart();
Dim sList As New. SeriesList()
sList.ChartType = ChartType.Line
sList.AxisFactor.YAxis.IsAutoSetting = False
sList.AxisFactor.YAxis.MinUnitValue = -500
sList.AxisFactor.YAxis.MaxUnitValue = 2500
sList.AxisFactor.YAxis.Interval = 500
Dim r As New. Random()
Dim i As Integer = 0
While i < 2
Dim sr As New. Series()
sr.Line.LineWidth = 2
sr.Points.Width = 5
sr.Points.PointType = PointType.FillRectangle
If i = 1 Then
sr.ChartType = ChartType.Column
End If
Dim x As Integer = 0
While x < 50
Dim item As New. SeriesItem()
item.Name = "item" + x.ToString()
item.YValue = r.[Next](1000, 2000)
If i = 1 Then
item.YValue = -1 * r.[Next](500)
End If
sr.items.Add(item)
System.Math.Max(System.Threading.Interlocked.Increment(x),x - 1)
End While
sList.SeriesCollection.Add(sr)
System.Math.Max(System.Threading.Interlocked.Increment(i),i - 1)
End While
Me.hHippoChart1.SeriesListDictionary.Add(sList)
Me.hHippoChart1.DrawChart()