C#

 
            SeriesList sList = new SeriesList();
            sList.ChartType = ChartType.Scatter;
            sList.AxisFactor.XAxis.DataType = AxisDataType.Number;

            Random r = new Random();
            for (int i = 0; i < 4; i++)
            {
                Series sr = new Series();
                sr.Points.Width = 6;

                if (i == 0) sr.Points.PointType = PointType.FillCircle;
                if (i == 1) sr.Points.PointType = PointType.FillRectangle;
                if (i == 2) sr.Points.PointType = PointType.FillTriangle;
                if (i == 3) sr.Points.PointType = PointType.FillCircle;

                for (int x = 0; x < 19; x++)
                {
                    SeriesItem item = new SeriesItem();
                    item.XValue = x;
                    item.YValue = r.Next(100);

                    sr.items.Add(item);
                }
                sList.SeriesCollection.Add(sr);
            }

            this.hHippoChart1.Titles.Label.ForeColor = Color.SteelBlue;
            this.hHippoChart1.DesignType = ChartDesignType.Simple;
            this.hHippoChart1.SeriesListDictionary.Add(sList);
            this.hHippoChart1.DrawChart();   


VB

 Dim sList As New SeriesList()
sList.ChartType = ChartType.Scatter
sList.AxisFactor.XAxis.DataType = AxisDataType.Number

Dim r As New Random()
For i As Integer = 0 To 3
    Dim sr As New Series()
    sr.Points.Width = 6
   
    If i = 0 Then
        sr.Points.PointType = PointType.FillCircle
    End If
    If i = 1 Then
        sr.Points.PointType = PointType.FillRectangle
    End If
    If i = 2 Then
        sr.Points.PointType = PointType.FillTriangle
    End If
    If i = 3 Then
        sr.Points.PointType = PointType.FillCircle
    End If
   
    For x As Integer = 0 To 18
        Dim item As New SeriesItem()
        item.XValue = x
        item.YValue = r.[Next](100)
       
        sr.items.Add(item)
    Next
    sList.SeriesCollection.Add(sr)
Next

Me.hHippoChart1.Titles.Label.ForeColor = Color.SteelBlue
Me.hHippoChart1.DesignType = ChartDesignType.Simple
Me.hHippoChart1.SeriesListDictionary.Add(sList)
Me.hHippoChart1.DrawChart()


사업자 정보 표시
히포차트 | 하영대 | 경기도 성남시 수정구 복정동 631-5 401 | 사업자 등록번호 : 129-34-55719 | TEL : 031-751-6673 | Mail : hippochart@gmail.com | 통신판매신고번호 : 제 2010-경기성남-1203호 | 사이버몰의 이용약관 바로가기

'Chart Type > Scatter' 카테고리의 다른 글

Scatter plot chart using pointType(Image)  (0) 2009.04.07
Scatter plot chart using Number type  (0) 2009.04.07
Default scatter plot chart  (2) 2009.04.07

Posted by 리바이 병장

댓글을 달아 주세요



/* 다음 웹인사이드 로그 분석*/