API version 1

- ‐

RW

number

endAngle

円グラフの終了角度を表します。

円グラフがどの角度まで開いているかを指定します。角度は0~360[deg]で指定します。

関連項目

startAngle プロパティ



使用例 CRSダウンロード

Form ChartPieSeries {
   x = 0;
   y = 0;
   width = 800;
   height = 600;

   /* 1.初期化 */
   Chart testChart(Chart.CHARTTYPE_PIE){
           Width = 700;
           Height = 500;

           Function initChart(){
                   /*bgColor = "#c5ff90" ; */
                   bgColor = "WHITE" ;

                   /* 2.円グラフ作成 */
                   var cs = createSeries(Chart.SERIESTYPE_PIE);

                   /* CSVデータの作成 */
                   var cv = new CSVDocument;
                   cv << csv {
                           "予約",5
                           "新車",24
                           "中古",15
                           "廃車",5
                   } ;

                   /* 3.CSVデータを流し込み */
                   cs.load( cv ) ;

                   /* 円の表示オプション */
                   cs.endAngle = 320 ;
                   cs.holeSize = 0.2 ;
                   cs.hPosition = 0.6 ;
                   cs.pieSize = 0.8 ;
                   cs.startAngle = 15 ;
                   cs.vPosition = 0.5 ;

                   /* メソッドサンプル */
                   cs.addItem("代行",2) ;
                   var item = new ChartPieItem(3 , "追加" );
                   item.color = "#00ff00";
                   item.value = 5 ;
                   item.label = "輸入" ;
                   cs.insertItem(2, item) ;

                   cs.setLabelsPosition(0) ;
                   cs.setLabelsVisible(true);
                   print("新車は ",cs.getItem("新車") ) ;
                   print("取り扱い台数(項目順) ",cs.getItems() ) ;

                   /* cs.truncate() ; */

                   /* 4.データの表示範囲を自動調整 */
                   relayout( ) ;
           }
   }
   testChart.initChart();
}