API version 1
- ‐
R
integer
alignment¶
軸が存在している方向を表します。
使用例
CRSダウンロード
Form ChartStrings {
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.AXISTYPE_STRING);
/* 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(100,60,65,78) ;
/*detachの座標指定は左上が原点のマシンスケール */
lg.bgVisible = true ;
lg.borderColor = "BLACK" ;
lg.bgColor = "#c5ff90" ;
/* ここからChart(String)Axis の操作です */
var ax = testChart.getAxis(Chart.AXISALIGN_BOTTOM);
ax.strings = new Array("1月","2月","3月","4月","5月","6月");
ax.title = "自動車の取り扱い(月別集計)" ;
ax.gridLineColor = "BLACK" ;
ax.labelsAngle = -30 ;
ax.labelsFont = new Font("MS 明朝", 20) ;
ax.titleVisible = true ;
ax.visible = true ;
var ax2 = testChart.getAxis(Chart.AXISALIGN_LEFT);
ax2.max = 30 ;
ax2.title = "取扱数(台)";
ax2.titleColor = "RED" ;
ax2.gridLineColor = "BLACK" ;
ax2.gridLineVisible = true ;
ax2.labelsColor = "RED" ;
ax2.labelsVisible = true ;
ax2.lineColor = "RED" ;
ax2.titleFont = new Font("MS 明朝", 16) ;
print("下軸 ",ax.alignment,"方向、左軸 ",ax2.alignment,"方向") ;
print("下軸のタイプは ",ax.type ," 、右軸のタイプは ",ax2.type) ;
}
}
testChart.initChart();
}