掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
DBchartでX軸に文字列を利用したい (ID:18393)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
XLabelsSource := '商品名'; TChart コンポーネント TChartAxis のヘルプファイルくらいみましょう。 Delphi2005でしたら 「ホームページに書いてるとおり検索したんですが TChartのヘルプ どこにあるのでしょうか!!」 って ボーランドに直接 聞いてみて。 (実はいれわすれなんだけどね・・・・・ 無視しているボーランドがどうかともってね。問いかけてみて) 無いっていってきたら古バージョンのDelphiのヘルプでいいから のっている古いヘルプくれっていうといいね。 ごねるといいよ BottomAxis.LabelsSeparation := 0; で ラベル間の計算がされなくなるから全部表示される。 しかし、重なるので汚くなります。 だから 270度回転させて、縦フォントにするといいかもかも。 サンプル: procedure TForm1.FormCreate(Sender: TObject); var ChSr: TChartSeries; DBChart :TDBChart; begin DBChart := TDBChart.Create(self); DBChart.Parent := Self; DBChart.Align := alClient; DBChart.Legend.Visible := False; DataSource1.DataSet := Table1; Table1.DatabaseName := 'dbdemos'; Table1.TableName := 'country.db'; Table1.Open; ChSr := TBarSeries.Create(Self);; //TPointSeries.Create(Self); with ChSr do begin ParentChart := DBChart; DataSource := Table1; XLabelsSource := 'Name'; YValues.ValueSource := 'Population' ; AddXY(25,777,'えへへ'); with ParentChart do begin BottomAxis.LabelsSeparation := 0; BottomAxis.LabelsAngle := 270; BottomAxis.LabelsFont.Name := '@MS ゴシック'; end; end; end; procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction); begin Table1.Close; end;
←解決時は質問者本人がここをチェックしてください。
更新する
戻る
掲示板システム
Copyright 2021 Takeshi Okamoto All Rights Reserved.