API version 1
- ‐
RW
CRS::Common::UI::Brush
plotBgColor¶
プロットエリアの背景色を表します。
使用例
CRSダウンロード
Form ChartLegend {
x = 0;
y = 0;
width = 800;
height = 600;
/* 1.初期化 */
Chart testChart(Chart.CHARTTYPE_BAR){
Width = 700;
Height = 500;
Function initChart(){
bgColor = "WHITE" ;
/* 2.棒グラフ作成 */
var cs = createSeries(Chart.SERIESTYPE_BAR);
/* CSVデータの作成 */
var cv = new CSVDocument;
cv << csv {
"新車",10,13,15,18,22,24
"中古",8,7,8,7,6,5
"廃車",16,14,11,8,5,3
} ;
/* 3.CSVデータを流し込み */
cs.load( cv ) ;
/* 4.データの表示範囲を自動調整 */
relayout( ) ;
plotBgVisible = true ;
plotBgColor = "#e0e0e0" ;
/* 凡例表示位置の指定 */
var lg = testChart.legend ;
lg.detach(90,50,65,78) ;
/*detachの座標指定は左上が原点のマシンスケール */
lg.bgVisible = true ;
lg.borderColor = "BLACK" ;
lg.bgColor = "#c5ff90" ;
lg.font = new Font("MS 明朝", 10) ;
if(testChart.charttype == Chart.CHARTTYPE_BAR){ print("yes ") ; } ;
var ax2 = testChart.getAxis(Chart.AXISALIGN_LEFT);
ax2.title = "タイトル 左";
var gSr = testChart.getSeries(0);
var gIt = gSr.getItems();
print(gIt[0].title," ",gIt[1].title," ",gIt[2].title ) ;
/* 全削除のため、試すときのみコメントを外す */
/*removeAllSeries() ; */
}
}
testChart.initChart();
}