SeriesList sList = new SeriesList();
sList.ChartType = ChartType.Line;
sList.AxisFactor.XAxis.DataType = AxisDataType.Number;
Random r = new Random();
for(int i = 0; i < 1; i++)
{
Series sr = new Series();
sr.Name = "Serie" + i.ToString();
for(int x = -80; x < 80; x++)
{
SeriesItem item = new SeriesItem();
item.Name = "item" + x.ToString();
item.XValue = x;
item.YValue = (float)(Math.Pow(x, 2) - 3 * x - 500);
if (x == 42)
{
item.Balloon = new Balloon();
item.Balloon.Label.Text = "y = x2 - 3x - 500";
}
sr.items.Add(item);
}
sList.SeriesCollection.Add(sr);
}
this.hHippoChart1.DesignType = ChartDesignType.Simple;
this.hHippoChart1.PaletteType = PaletteType.Sky;
this.hHippoChart1.SeriesListDictionary.Add(sList);
this.hHippoChart1.DrawChart();
Dim sList As New. SeriesList()
sList.ChartType = ChartType.Line
sList.AxisFactor.XAxis.DataType = AxisDataType.Number
Dim r As New. Random()
For i As Integer = 0 To 0
Dim sr As New. Series()
sr.Name = "Serie" & i.ToString()
For x As Integer = -80 To 79
Dim item As New. SeriesItem()
item.Name = "item" & x.ToString()
item.XValue = x
item.YValue = CSng((Math.Pow(x, 2) - 3 * x - 500))
If x = 42 Then
item.Balloon = New Balloon()
item.Balloon.Label.Text = "y = x2 - 3x - 500"
End If
sr.items.Add(item)
Next
sList.SeriesCollection.Add(sr)
Next
Me.hHippoChart1.DesignType = ChartDesignType.Simple
Me.hHippoChart1.PaletteType = PaletteType.Sky
Me.hHippoChart1.SeriesListDictionary.Add(sList)
Me.hHippoChart1.DrawChart()