Home 소개       다운로드       온라인 설명서      주식/코인 차트    Q & A     Blog    

히포차트4 - n차 추세선 그래프







koop abortuspil

abortuspil online bestellen patemery.azurewebsites.net abortuspil kopen online

accutane without dermatologist

buy accutane 10mg uk website buy accutane singapore

amoxicillin without prescription

amoxicillin without insurance hikebikeclimb.net buy amoxicillin without prescription

low dose naltrexone buy

low dose naltrexone buy blog.endungen.de how to buy naltrexone
히포차트에서 제공하는 Regression 클래스를 이용하여 1, 2, 3차 등 n차 추세선을 그릴 수 있습니다.




히포차트로 추세선 그리기  히포차트4 - n차 추세선 그래프  


C#
 
this.hHippoChart1.SeriesListDictionary.Clear();

SeriesList sList = new SeriesList();
sList.ChartType = ChartType.Line;
sList.AxisFactor.YAxis.SetAxisStep(0, 1000, 100);

Random r = new Random();
Series sr = new Series();

for(int x = 0; x < 15; x++)
{
SeriesItem item = new SeriesItem();
item.Name = x.ToString();
item.YValue = r.Next(0, 900);

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

Series sr2 = new Series();
sr2.Name = "Trend";

Regression rg = new Regression();
rg.XYCount = 15;
rg.Degree(3);

int count = 0;
foreach(SeriesItem item in sr.items)
{
rg.XYAdd(count, item.YValue);

count++;
}

for(int j = 0; j < 1000; j++)
{
rg.RegVal(j);
}

for(int i = 0; i < 20; i++)
{
SeriesItem item2 = new SeriesItem();

item2.YValue = rg.Coeff(3) * Math.Pow(i, 3) + rg.Coeff(2) * Math.Pow(i, 2) + rg.Coeff(1) * i + rg.Coeff(0);
//item2.YValue = rg.Coeff(2) * Math.Pow(i, 2) + rg.Coeff(1) * i + rg.Coeff(0);
//item2.YValue = rg.Coeff(1) * i + rg.Coeff(0);

sr2.items.Add(item2);
}

sList.SeriesCollection.Add(sr2);

this.hHippoChart1.SeriesListDictionary.Add(sList);
this.hHippoChart1.DrawChart();


VB
 
Me.hHippoChart1.SeriesListDictionary.Clear()

Dim sList As New. SeriesList()
sList.ChartType = ChartType.Line
sList.AxisFactor.YAxis.SetAxisStep(0, 1000, 100)

Dim r As New. Random()
Dim sr As New. Series()

For x As Integer = 0 To 14
Dim item As New. SeriesItem()
item.Name = x.ToString()
item.YValue = r.[Next](0, 900)

sr.items.Add(item)
Next
sList.SeriesCollection.Add(sr)

Dim sr2 As New. Series()
sr2.Name = "Trend"

Dim rg As New. Regression()
rg.XYCount = 15
rg.Degree(3)

Dim count As Integer = 0
For Each item As SeriesItem In sr.items
rg.XYAdd(count, item.YValue)

count += 1
Next

For j As Integer = 0 To 999
rg.RegVal(j)
Next

For i As Integer = 0 To 19
Dim item2 As New. SeriesItem()

item2.YValue = rg.Coeff(3) * Math.Pow(i, 3) + rg.Coeff(2) * Math.Pow(i, 2) + rg.Coeff(1) * i + rg.Coeff(0)
`item2.YValue = rg.Coeff(2) * Math.Pow(i, 2) + rg.Coeff(1) * i + rg.Coeff(0);
`item2.YValue = rg.Coeff(1) * i + rg.Coeff(0);

sr2.items.Add(item2)
Next

sList.SeriesCollection.Add(sr2)

Me.hHippoChart1.SeriesListDictionary.Add(sList)
Me.hHippoChart1.DrawChart()


※ 히포차트 샘플 코드는 버전별로 상이한 결과를 나타낼 수 있습니다.

이 코드 관련 문의 사항은 페이스북 리플을 달아주시거나 아래 이메일로 이 페이지 주소와 함께 문의주세요.

helpdesk@hippochart.com





Copyright © 2009-2018 투데이트레이딩. Inc.  All Rights Reserved.