SeriesList sList = new SeriesList();
sList.SeriesCollection.Add(new Series());
sList.ChartType = ChartType.Gantt;
sList.AxisFactor.YAxis.DataType = AxisDataType.DateTime;
sList.Gantt.Suffix = "일";
sList.AxisFactor.YAxis.Interval = 10;
sList.AxisFactor.Orientation = AxisOrientation.TopLeft;
AxisMarker mks = new AxisMarker("Start", new DateTime(2009, 1, 10));
mks.Label.Font = new Font("tahoma", 8, FontStyle.Bold);
mks.Label.ForeColor = Color.Black;
mks.Line.LineColor = Color.Transparent;
mks.BringToFront = true;
mks.TextFormat.FormatFlags = StringFormatFlags.DirectionVertical;
mks.TextFormat.LineAlignment = StringAlignment.Near;
mks.TextFormat.Alignment = StringAlignment.Near;
sList.AxisFactor.YAxis.Markers.Add(mks);
AxisMarker mk = new AxisMarker("dead line", new DateTime(2009, 2, 10));
mk.BringToFront = true;
mk.TextFormat.FormatFlags = StringFormatFlags.DirectionVertical;
mk.TextFormat.LineAlignment = StringAlignment.Near;
mk.TextFormat.Alignment = StringAlignment.Near;
sList.AxisFactor.YAxis.Markers.Add(mk);
AxisMarker mk2 = new AxisMarker("Today", DateTime.Now);
mk2.BringToFront = true;
mk2.TextFormat.FormatFlags = StringFormatFlags.DirectionVertical;
mk2.TextFormat.LineAlignment = StringAlignment.Near;
mk2.TextFormat.Alignment = StringAlignment.Near;
mk2.Line.DashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
mk2.Line.LineColor = Color.Blue;
mk2.Line.LineWidth = 2;
mk2.Label.ForeColor = Color.Blue;
sList.AxisFactor.YAxis.Markers.Add(mk2);
AxisArea are = new AxisArea("집중\r\n개발\r\n기간", new DateTime(2009, 1, 20), new DateTime(2009, 2, 5));
are.BackColor = Color.FromArgb(50, Color.Yellow);
are.BringToFront = true;
are.TextFormat.FormatFlags = StringFormatFlags.DisplayFormatControl;
are.TextFormat.LineAlignment = StringAlignment.Center;
are.TextFormat.Alignment = StringAlignment.Center;
are.Label.Font = new Font("굴림", 11, FontStyle.Bold);
sList.AxisFactor.YAxis.Areas.Add(are);
AxisTick extk = new AxisTick();
extk.DateTimeValue = new DateTime(2009, 2, 10);
extk.Label.Text = "↓";
sList.AxisFactor.YAxis.ExtraTicks.Add(extk);
for(int i = 0; i < 5; i++)
{
sList.SeriesCollection[0].items.Add(new SeriesItem());
sList.SeriesCollection[0].items[i].IsShowFigureText = true;
}
sList.SeriesCollection[0].items[0].YStartDateTimeValue = new DateTime(2009, 1, 10);
sList.SeriesCollection[0].items[0].YDateTimeValue = new DateTime(2009, 1, 17);
sList.SeriesCollection[0].items[1].YStartDateTimeValue = new DateTime(2009, 1, 15);
sList.SeriesCollection[0].items[1].YDateTimeValue = new DateTime(2009, 1, 25);
sList.SeriesCollection[0].items[2].YStartDateTimeValue = new DateTime(2009, 1, 17);
sList.SeriesCollection[0].items[2].YDateTimeValue = new DateTime(2009, 2, 10);
sList.SeriesCollection[0].items[3].YStartDateTimeValue = new DateTime(2009, 2, 10);
sList.SeriesCollection[0].items[3].YDateTimeValue = new DateTime(2009, 2, 18);
sList.SeriesCollection[0].items[4].YStartDateTimeValue = new DateTime(2009, 2, 19);
sList.SeriesCollection[0].items[4].YDateTimeValue = new DateTime(2009, 2, 27);
sList.SeriesCollection[0].items[0].Name = "프로젝트 제안";
sList.SeriesCollection[0].items[1].Name = "DB 및 Framework 설계";
sList.SeriesCollection[0].items[2].Name = "개발 기간";
sList.SeriesCollection[0].items[3].Name = "1차 검수기간";
sList.SeriesCollection[0].items[4].Name = "유지 보수";
Palette p = new Palette();
sList.SeriesCollection[0].items[0].ItemColor = p.DefaultColor1;
sList.SeriesCollection[0].items[1].ItemColor = p.DefaultColor2;
sList.SeriesCollection[0].items[2].ItemColor = p.DefaultColor3;
sList.SeriesCollection[0].items[3].ItemColor = p.DefaultColor4;
sList.SeriesCollection[0].items[4].ItemColor = p.DefaultColor5;
sList.SeriesCollection[0].Column.DesignType = AreaDesignType.Gradation;
sList.SeriesCollection[0].Column.WidthType = ColumnWidthType.Dynamic;
this.hHippoChart1.SeriesListDictionary.Add(sList);
this.hHippoChart1.LegendBox.Visible = false;
this.hHippoChart1.DrawChart();
Dim sList As New. SeriesList()
sList.SeriesCollection.Add(New Series())
sList.ChartType = ChartType.Gantt
sList.AxisFactor.YAxis.DataType = AxisDataType.DateTime
sList.Gantt.Suffix = "일"
sList.AxisFactor.YAxis.Interval = 10
sList.AxisFactor.Orientation = AxisOrientation.TopLeft
Dim mks As New. AxisMarker("Start", New DateTime(2009, 1, 10))
mks.Label.Font = New Font("tahoma", 8, FontStyle.Bold)
mks.Label.ForeColor = Color.Black
mks.Line.LineColor = Color.Transparent
mks.BringToFront = True
mks.TextFormat.FormatFlags = StringFormatFlags.DirectionVertical
mks.TextFormat.LineAlignment = StringAlignment.Near
mks.TextFormat.Alignment = StringAlignment.Near
sList.AxisFactor.YAxis.Markers.Add(mks)
Dim mk As New. AxisMarker("dead line", New DateTime(2009, 2, 10))
mk.BringToFront = True
mk.TextFormat.FormatFlags = StringFormatFlags.DirectionVertical
mk.TextFormat.LineAlignment = StringAlignment.Near
mk.TextFormat.Alignment = StringAlignment.Near
sList.AxisFactor.YAxis.Markers.Add(mk)
Dim mk2 As New. AxisMarker("Today", DateTime.Now)
mk2.BringToFront = True
mk2.TextFormat.FormatFlags = StringFormatFlags.DirectionVertical
mk2.TextFormat.LineAlignment = StringAlignment.Near
mk2.TextFormat.Alignment = StringAlignment.Near
mk2.Line.DashStyle = System.Drawing.Drawing2D.DashStyle.Dash
mk2.Line.LineColor = Color.Blue
mk2.Line.LineWidth = 2
mk2.Label.ForeColor = Color.Blue
sList.AxisFactor.YAxis.Markers.Add(mk2)
Dim are As New. AxisArea("집중" & vbCr & vbLf & "개발" & vbCr & vbLf & "기간", New DateTime(2009, 1, 20), New DateTime(2009, 2, 5))
are.BackColor = Color.FromArgb(50, Color.Yellow)
are.BringToFront = True
are.TextFormat.FormatFlags = StringFormatFlags.DisplayFormatControl
are.TextFormat.LineAlignment = StringAlignment.Center
are.TextFormat.Alignment = StringAlignment.Center
are.Label.Font = New Font("굴림", 11, FontStyle.Bold)
sList.AxisFactor.YAxis.Areas.Add(are)
Dim extk As New. AxisTick()
extk.DateTimeValue = New DateTime(2009, 2, 10)
extk.Label.Text = "↓"
sList.AxisFactor.YAxis.ExtraTicks.Add(extk)
For i As Integer = 0 To 4
sList.SeriesCollection(0).items.Add(New SeriesItem())
sList.SeriesCollection(0).items(i).IsShowFigureText = True
Next
sList.SeriesCollection(0).items(0).YStartDateTimeValue = New DateTime(2009, 1, 10)
sList.SeriesCollection(0).items(0).YDateTimeValue = New DateTime(2009, 1, 17)
sList.SeriesCollection(0).items(1).YStartDateTimeValue = New DateTime(2009, 1, 15)
sList.SeriesCollection(0).items(1).YDateTimeValue = New DateTime(2009, 1, 25)
sList.SeriesCollection(0).items(2).YStartDateTimeValue = New DateTime(2009, 1, 17)
sList.SeriesCollection(0).items(2).YDateTimeValue = New DateTime(2009, 2, 10)
sList.SeriesCollection(0).items(3).YStartDateTimeValue = New DateTime(2009, 2, 10)
sList.SeriesCollection(0).items(3).YDateTimeValue = New DateTime(2009, 2, 18)
sList.SeriesCollection(0).items(4).YStartDateTimeValue = New DateTime(2009, 2, 19)
sList.SeriesCollection(0).items(4).YDateTimeValue = New DateTime(2009, 2, 27)
sList.SeriesCollection(0).items(0).Name = "프로젝트 제안"
sList.SeriesCollection(0).items(1).Name = "DB 및 Framework 설계"
sList.SeriesCollection(0).items(2).Name = "개발 기간"
sList.SeriesCollection(0).items(3).Name = "1차 검수기간"
sList.SeriesCollection(0).items(4).Name = "유지 보수"
Dim p As New. Palette()
sList.SeriesCollection(0).items(0).ItemColor = p.DefaultColor1
sList.SeriesCollection(0).items(1).ItemColor = p.DefaultColor2
sList.SeriesCollection(0).items(2).ItemColor = p.DefaultColor3
sList.SeriesCollection(0).items(3).ItemColor = p.DefaultColor4
sList.SeriesCollection(0).items(4).ItemColor = p.DefaultColor5
sList.SeriesCollection(0).Column.DesignType = AreaDesignType.Gradation
sList.SeriesCollection(0).Column.WidthType = ColumnWidthType.Dynamic
Me.hHippoChart1.SeriesListDictionary.Add(sList)
Me.hHippoChart1.LegendBox.Visible = False
Me.hHippoChart1.DrawChart()