SeriesList sList = new SeriesList();
sList.ChartType = ChartType.Spline;
Random r = new Random();
for(int i = 0; i < 1; i++)
{
Series sr = new Series();
sr.Points.Width = 0;
sr.Name = "Series" + i.ToString();
for(int x = 0; x < 100; x++)
{
SeriesItem item = new SeriesItem();
item.Name = "item" + x.ToString();
item.YValue = r.Next(200, 340);
sr.items.Add(item);
}
sList.SeriesCollection.Add(sr);
}
this.hHippoChart1.LegendBox.IsAutoSetting = false;
this.hHippoChart1.LegendBox.LegendBoxItems.Clear();
sList.Legend.IsAutoSetting = false;
sList.Legend.LegendBoxItems.Clear();
LegendBoxItem box = new LegendBoxItem();
LegendRow row = new LegendRow(LegendFormat.Icon_Name);
row.Item.LegendBoxType = ChartType.Column;
row.Item.IconColor = Color.SteelBlue;
row.Item.Label.Text = "수동 범례1";
row.Item.Label.Font = new Font("굴림", 9, FontStyle.Bold);
LegendRow row2 = new LegendRow(LegendFormat.Icon_Name);
row2.Item.LegendBoxType = ChartType.Circular;
row2.Item.IconColor = Color.YellowGreen;
row2.Item.Label.Text = "수동 범례2";
row2.Item.Label.Font = new Font("굴림", 9, FontStyle.Bold);
box.Rows.Add(row);
box.Rows.Add(row2);
sList.Legend.LegendBoxItems.Add(box);
this.hHippoChart1.LegendBox.LegendBoxItems.Add(box);
this.hHippoChart1.LegendBox.Header.NameLabel.Text = "범례를 길게했네";
this.hHippoChart1.DesignType = ChartDesignType.Classic;
this.hHippoChart1.SeriesListDictionary.Add(sList);
this.hHippoChart1.DrawChart();
Dim sList As New. SeriesList()
sList.ChartType = ChartType.Spline
Dim r As New. Random()
Dim i As Integer = 0
While i < 1
Dim sr As New. Series()
sr.Points.Width = 0
sr.Name = "Series" + i.ToString()
Dim x As Integer = 0
While x < 100
Dim item As New. SeriesItem()
item.Name = "item" + x.ToString()
item.YValue = r.[Next](200, 340)
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.LegendBox.IsAutoSetting = False
Me.hHippoChart1.LegendBox.LegendBoxItems.Clear()
sList.Legend.IsAutoSetting = False
sList.Legend.LegendBoxItems.Clear()
Dim box As New. LegendBoxItem()
Dim row As New. LegendRow(LegendFormat.Icon_Name)
row.Item.LegendBoxType = ChartType.Column
row.Item.IconColor = Color.SteelBlue
row.Item.Label.Text = "수동 범례1"
row.Item.Label.Font = New Font("굴림", 9, FontStyle.Bold)
Dim row2 As New. LegendRow(LegendFormat.Icon_Name)
row2.Item.LegendBoxType = ChartType.Circular
row2.Item.IconColor = Color.YellowGreen
row2.Item.Label.Text = "수동 범례2"
row2.Item.Label.Font = New Font("굴림", 9, FontStyle.Bold)
box.Rows.Add(row)
box.Rows.Add(row2)
sList.Legend.LegendBoxItems.Add(box)
Me.hHippoChart1.LegendBox.LegendBoxItems.Add(box)
Me.hHippoChart1.LegendBox.Header.NameLabel.Text = "범례를 길게했네"
Me.hHippoChart1.DesignType = ChartDesignType.Classic
Me.hHippoChart1.SeriesListDictionary.Add(sList)
Me.hHippoChart1.DrawChart()