this.hHippoChart1.SeriesListDictionary.Clear();
SeriesList sList = new SeriesList();
sList.ChartType = ChartType.Line;
sList.AxisFactor.YAxis.TitleLabel.Text = "American peoples";
sList.AxisFactor.XAxis.TitleLabel.Text = "Step Items";
sList.AxisFactor.YAxis.IsAxisVerticalRotate = true;
sList.AxisFactor.XAxis.Interval = 2;
sList.AxisFactor.XAxis.DataType = AxisDataType.Number;
sList.GraphArea.Grid.IsBackGridColor = false;
AxisArea mk = new AxisArea("", 5, 12);
mk.TextFormat.LineAlignment = StringAlignment.Far;
mk.TextFormat.Alignment = StringAlignment.Center;
mk.BackColor = Color.FromArgb(44, Color.Violet);
mk.BringToFront = true;
mk.LegendVisible = false;
mk.Label.Text = "Safe Area ";
sList.AxisFactor.XAxis.Areas.Add(mk);
AxisArea tk = new AxisArea("", -25, 25);
tk.BackColor = Color.FromArgb(44, Color.Green);
tk.TextFormat.Alignment = StringAlignment.Far;
sList.AxisFactor.YAxis.Areas.Add(tk);
AxisMarker mk2 = new AxisMarker("Optimization", -25);
mk2.Line.LineColor = Color.LightGreen;
mk2.Line.LineWidth = 2;
mk2.Label.ForeColor = Color.LightGreen;
mk2.BringToFront = true;
mk2.TextFormat.LineAlignment = StringAlignment.Far;
mk2.TextFormat.Alignment = StringAlignment.Near;
sList.AxisFactor.YAxis.Markers.Add(mk2);
AxisMarker mk3 = new AxisMarker("[Step A]", 13);
mk3.Line.LineColor = Color.Blue;
mk3.Label.ForeColor = Color.Blue;
mk3.TextFormat.Alignment = StringAlignment.Near;
mk3.TextFormat.LineAlignment = StringAlignment.Near;
mk3.TextFormat.FormatFlags = StringFormatFlags.DirectionVertical;
sList.AxisFactor.XAxis.Markers.Add(mk3);
AxisMarker mk4 = new AxisMarker("[Step B]", 17);
mk4.Line.LineColor = Color.Blue;
mk4.Label.ForeColor = Color.Blue;
mk4.TextFormat.Alignment = StringAlignment.Near;
mk4.TextFormat.LineAlignment = StringAlignment.Near;
mk4.TextFormat.FormatFlags = StringFormatFlags.DirectionVertical;
sList.AxisFactor.XAxis.Markers.Add(mk4);
sList.AxisFactor.YAxis.AnalysisItems[AnalysisCategory.Median].Visible = true;
sList.AxisFactor.YAxis.AnalysisItems[AnalysisCategory.Max].Visible = true;
Random r = new Random();
for(int i = 0; i < 2; i++)
{
Series sr = new Series();
sr.Name = "Serie" + i.ToString();
sr.Points.Width = 5;
sr.Line.LineWidth = 3;
sr.Points.PointType = PointType.FillRectangle;
if (i == 1)
{
//sr.SeriesColor = Color.Blue;
sr.Line.LineWidth = 5;
}
for(int x = 0; x < 20; x++)
{
SeriesItem item = new SeriesItem();
item.XValue = x;
item.YValue = Math.Pow(x, 2) - 22 * x + r.Next(50);
if (i == 1 && x > 13)
{
item.YValue = double.NaN;
}
sr.items.Add(item);
}
sList.SeriesCollection.Add(sr);
}
this.hHippoChart1.SeriesListDictionary.Add(sList);
this.hHippoChart1.DrawChart();
Me.hHippoChart1.SeriesListDictionary.Clear()
Dim sList As New. SeriesList()
sList.ChartType = ChartType.Line
sList.AxisFactor.YAxis.TitleLabel.Text = "American peoples"
sList.AxisFactor.XAxis.TitleLabel.Text = "Step Items"
sList.AxisFactor.YAxis.IsAxisVerticalRotate = True
sList.AxisFactor.XAxis.Interval = 2
sList.AxisFactor.XAxis.DataType = AxisDataType.Number
sList.GraphArea.Grid.IsBackGridColor = False
Dim mk As New. AxisArea("", 5, 12)
mk.TextFormat.LineAlignment = StringAlignment.Far
mk.TextFormat.Alignment = StringAlignment.Center
mk.BackColor = Color.FromArgb(44, Color.Violet)
mk.BringToFront = True
mk.LegendVisible = False
mk.Label.Text = "Safe Area "
sList.AxisFactor.XAxis.Areas.Add(mk)
Dim tk As New. AxisArea("", -25, 25)
tk.BackColor = Color.FromArgb(44, Color.Green)
tk.TextFormat.Alignment = StringAlignment.Far
sList.AxisFactor.YAxis.Areas.Add(tk)
Dim mk2 As New. AxisMarker("Optimization", -25)
mk2.Line.LineColor = Color.LightGreen
mk2.Line.LineWidth = 2
mk2.Label.ForeColor = Color.LightGreen
mk2.BringToFront = True
mk2.TextFormat.LineAlignment = StringAlignment.Far
mk2.TextFormat.Alignment = StringAlignment.Near
sList.AxisFactor.YAxis.Markers.Add(mk2)
Dim mk3 As New. AxisMarker("[Step A]", 13)
mk3.Line.LineColor = Color.Blue
mk3.Label.ForeColor = Color.Blue
mk3.TextFormat.Alignment = StringAlignment.Near
mk3.TextFormat.LineAlignment = StringAlignment.Near
mk3.TextFormat.FormatFlags = StringFormatFlags.DirectionVertical
sList.AxisFactor.XAxis.Markers.Add(mk3)
Dim mk4 As New. AxisMarker("[Step B]", 17)
mk4.Line.LineColor = Color.Blue
mk4.Label.ForeColor = Color.Blue
mk4.TextFormat.Alignment = StringAlignment.Near
mk4.TextFormat.LineAlignment = StringAlignment.Near
mk4.TextFormat.FormatFlags = StringFormatFlags.DirectionVertical
sList.AxisFactor.XAxis.Markers.Add(mk4)
sList.AxisFactor.YAxis.AnalysisItems(AnalysisCategory.Median).Visible = True
sList.AxisFactor.YAxis.AnalysisItems(AnalysisCategory.Max).Visible = True
Dim r As New. Random()
For i As Integer = 0 To 1
Dim sr As New. Series()
sr.Name = "Serie" & i.ToString()
sr.Points.Width = 5
sr.Line.LineWidth = 3
sr.Points.PointType = PointType.FillRectangle
If i = 1 Then
`sr.SeriesColor = Color.Blue;
sr.Line.LineWidth = 5
End If
For x As Integer = 0 To 19
Dim item As New. SeriesItem()
item.XValue = x
item.YValue = Math.Pow(x, 2) - 22 * x + r.[Next](50)
If i = 1 AndAlso x > 13 Then
item.YValue = Double.NaN
End If
sr.items.Add(item)
Next
sList.SeriesCollection.Add(sr)
Next
Me.hHippoChart1.SeriesListDictionary.Add(sList)
Me.hHippoChart1.DrawChart()