HippoEngine en = new HippoEngine();
en.DataType = DataSourceType.Excel;
en.Query = " select * from [자료2$] ";
en.ConnectionString = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:\MY Docu\stock34.xls;Extended Properties=Excel 12.0;HDR=YES";
SeriesList sList = en.GetSeriesListOfStock(DataSourceType.Excel, "년/월", "시가", "종가", "저가", "고가");
sList.ChartType = ChartType.Stock;
sList.SeriesCollection[0].Name = "주가";
sList.GraphArea.Grid.Interval = 10;
sList.GraphArea.Grid.GridDirection = GridDirection.Vertical;
sList.AxisFactor.XAxis.LabelFormat.FormatFlags = StringFormatFlags.DirectionVertical;
sList.AxisFactor.XAxis.Interval = 10;
sList.AxisFactor.XAxis.IsVisibleFigures = false;
sList.AxisFactor.XAxis.IsShowTick = false;
sList.AxisFactor.YAxis.SetAxisStep(10000, 40000, 5000);
AxisArea mk = new AxisArea("", 5, 22);
mk.TextFormat.LineAlignment = StringAlignment.Near;
mk.BackColor = Color.FromArgb(20, Color.Violet);
sList.AxisFactor.XAxis.Areas.Add(mk);
SeriesList sList2 = new SeriesList();
sList2.ChartType = ChartType.Column;
Random r = new Random();
for(int i = 0; i < 1; i++)
{
Series sr = new Series();
sr.SeriesColor = Color.YellowGreen;
for(int x = 0; x < 300; x++)
{
SeriesItem item = new SeriesItem();
item.Name = x.ToString();
item.YValue = r.Next(92320);
if (x > 100 && x < 172)
{
item.ItemColor = Color.Red;
}
sr.items.Add(item);
}
sList2.SeriesCollection.Add(sr);
}
SeriesList sList3= new SeriesList();
sList3.ChartType = ChartType.Spline;
for(int i = 0; i < 1; i++)
{
Series sr = new Series();
for(int x = 0; x < 25; x++)
{
SeriesItem item = new SeriesItem();
item.Name = x.ToString();
item.YValue = r.Next(92320);
sr.items.Add(item);
}
sList3.SeriesCollection.Add(sr);
}
sList.AxisFactor.YAxis.AxisMagin = 30;
sList2.AxisFactor.YAxis.AxisMagin = 30;
sList3.AxisFactor.YAxis.AxisMagin = 30;
this.hHippoChart1.Direction = GraphAreaLocation.Vertical;
this.hHippoChart1.DesignType = ChartDesignType.Simple;
this.hHippoChart1.Titles.Label.ForeColor = Color.SteelBlue;
this.hHippoChart1.LegendBox.Visible = false;
this.hHippoChart1.SeriesListDictionary.Add(sList);
this.hHippoChart1.SeriesListDictionary.Add(sList2);
this.hHippoChart1.SeriesListDictionary.Add(sList3);
this.hHippoChart1.SeriesAreaRate = "3: 2: 2";
this.hHippoChart1.DrawChart();
Dim en As New. HippoEngine()
en.DataType = DataSourceType.Excel
en.Query = " select * from [자료2$] "
en.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:\MY Docu\stock34.xls;Extended Properties=Excel 12.0;HDR=YES"
Dim sList As SeriesList = en.GetSeriesListOfStock(DataSourceType.Excel, "년/월", "시가", "종가", "저가", "고가")
sList.ChartType = ChartType.Stock
sList.SeriesCollection(0).Name = "주가"
sList.GraphArea.Grid.Interval = 10
sList.GraphArea.Grid.GridDirection = GridDirection.Vertical
sList.AxisFactor.XAxis.LabelFormat.FormatFlags = StringFormatFlags.DirectionVertical
sList.AxisFactor.XAxis.Interval = 10
sList.AxisFactor.XAxis.IsVisibleFigures = False
sList.AxisFactor.XAxis.IsShowTick = False
sList.AxisFactor.YAxis.SetAxisStep(10000, 40000, 5000)
Dim mk As New. AxisArea("", 5, 22)
mk.TextFormat.LineAlignment = StringAlignment.Near
mk.BackColor = Color.FromArgb(20, Color.Violet)
sList.AxisFactor.XAxis.Areas.Add(mk)
Dim sList2 As New. SeriesList()
sList2.ChartType = ChartType.Column
Dim r As New. Random()
For i As Integer = 0 To 0
Dim sr As New. Series()
sr.SeriesColor = Color.YellowGreen
For x As Integer = 0 To 299
Dim item As New. SeriesItem()
item.Name = x.ToString()
item.YValue = r.[Next](92320)
If x > 100 AndAlso x < 172 Then
item.ItemColor = Color.Red
End If
sr.items.Add(item)
Next
sList2.SeriesCollection.Add(sr)
Next
Dim sList3 As New. SeriesList()
sList3.ChartType = ChartType.Spline
For i As Integer = 0 To 0
Dim sr As New. Series()
For x As Integer = 0 To 24
Dim item As New. SeriesItem()
item.Name = x.ToString()
item.YValue = r.[Next](92320)
sr.items.Add(item)
Next
sList3.SeriesCollection.Add(sr)
Next
sList.AxisFactor.YAxis.AxisMagin = 30
sList2.AxisFactor.YAxis.AxisMagin = 30
sList3.AxisFactor.YAxis.AxisMagin = 30
Me.hHippoChart1.Direction = GraphAreaLocation.Vertical
Me.hHippoChart1.DesignType = ChartDesignType.Simple
Me.hHippoChart1.Titles.Label.ForeColor = Color.SteelBlue
Me.hHippoChart1.LegendBox.Visible = False
Me.hHippoChart1.SeriesListDictionary.Add(sList)
Me.hHippoChart1.SeriesListDictionary.Add(sList2)
Me.hHippoChart1.SeriesListDictionary.Add(sList3)
Me.hHippoChart1.SeriesAreaRate = "3: 2: 2"
Me.hHippoChart1.DrawChart()