Slide 12
Slide 12 text
Copyright(C)2025 Climb Inc. All Rights Reserved.
12
テンプレートの活用
//入力するデータファイルの形式を指定
ColInfo colInfo = new ColInfo();
colInfo.series = 1; //系列が2列目
colInfo.category = 0; //カテゴリが1列目
colInfo.value = 4; //値が6列目
//チャートの作成
QbChart chart = new QbChart
(parent, //Applet
QbChart.VIEW2D, // 2D、3Dを指定
QbChart.COL, // チャートの形式を指定
"test.dat", // データファイルを指定
colInfo, // データファイルの形式
null); // テンプレートの指定(今回は無し)
//各種デザイン設定
//チャートの色変更
Color dataColors[] = {Color.gray, Color.green, Color.orange, Color.blue};
chart.gethDataPoints().setColors(dataColors);
//チャートサイズの調整
chart.gethChartPlot().setRelativeHeight(0.7f);
chart.gethChartPlot().setRelativeWidth(0.7f);
chart.gethChartPlot().setPosition(new quadbase.util.Position(0.1f,0.1f));
chart.gethCanvas().setSize(new Dimension(800,600));
//チャートの作成
QbChart chart = new QbChart
(parent, //Applet
"test.tpl"); // テンプレートの指定
テンプレートを使用しない場合 テンプレートを使用する場合