掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
2つのグラフを表示するには? (ID:47397)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
1つ目のグラフは散布図、2つ目のグラフは折れ線の グラフを表示させたいと考え、以下のプログラムを書きましたが、 2つ目の折れ線が表示できません。 Delphi6を使ってます。 procedure TForm1.Button3Click(Sender: TObject); var i: Integer; max,min:real; begin Edit6.Text:=IntToStr(StringGrid1.RowCount-1); n:=StrToInt(Edit6.Text); m:=StrToInt(Edit19.Text); l:=StrToInt(Edit20.Text); Form2.Chartfx1.Width:=650; Form2.Chartfx1.Height:=600; Form2.Chartfx1.Angles3D := MAKELONG(60,30); Form2.Chartfx1.Title[CHART_TOPTIT] := 'Gragh 1'; Form2.Chartfx1.AutoIncrement; Form2.Chartfx1.OpenDataEx(COD_VALUES, 1,n); Form2.Chartfx1.Decimals := 0; Form2.Chartfx1.IniValue[0] := 100; Form2.Chartfx1.ThisSerie := 0; Form2.ChartfX1.SerLeg [0]:=Stringgrid1.Cells[m,0]; for i := 0 to n-1 do begin Form2.Chartfx1.Value[i] := StrtoFloat(StringGrid1.Cells[m+1,i+1]); end; Form2.Chartfx1.CloseData(COD_VALUES); Form2.Chartfx1.OpenDataEx(COD_XVALUES, 1,n); Form2.ChartfX1.SerLeg [0]:=Stringgrid1.Cells[l,0]; for i := 0 to n-1 do begin Form2.Chartfx1.XValue[i] := StrtoFloat(StringGrid1.Cells[l+1,i+1]); Form2.Chartfx1.CloseData(COD_VALUES); end; begin Form2.Chartfx1.ThisSerie := 1; Edit6.Text:=IntToStr(StringGrid1.RowCount-1); n:=StrToInt(Edit6.Text); Form2.Chartfx1.Width:=650; Form2.Chartfx1.Height:=600; Form2.Chartfx1.Angles3D := MAKELONG(60,30); Form2.Chartfx1.Title[CHART_TOPTIT] := 'Gragh 1'; Form2.Chartfx1.AutoIncrement; Form2.Chartfx1.OpenDataEx(COD_VALUES, 1,2); Form2.Chartfx1.Decimals := 0; end; max:=Form2.Chartfx1.Value[0]; for i:=2 to n do if Form2.Chartfx1.Value[i]>max then max:=Form2.Chartfx1.Value[i]; Form2.Chartfx1.Value[0]:=max; min:=Form2.Chartfx1.XValue[1]; for i:=2 to n do if Form2.Chartfx1.XValue[i]<min then min:=Form2.Chartfx1.XValue[i]; Form2.Chartfx1.XValue[1]:=min; Form2.Chartfx1.LineStyle ; Form2.Chartfx1.CloseData(COD_VALUES); Form2.ShowModal; end;
←解決時は質問者本人がここをチェックしてください。
戻る
掲示板システム
Copyright 2021 Takeshi Okamoto All Rights Reserved.