API version 1

- ‐

RW

number

opacity

データ系列の不透明度を表します。



使用例 CRSダウンロード

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

   /* 1.初期化 */
   Chart testChart(Chart.CHARTTYPE_PIE){
           Width = 700;
           Height = 500;
           x = 5;
           y = 58;
           bgColor = new Brush("#fff0f0f0", Brush.NOBRUSH);
           Function initChart(){

                   /* 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.opacity = 0.75 ;
                   print("ID = ",cs.id,"、不透明度= ",cs.opacity,"、データの系列種類= ",cs.type,"、データの表示=",cs.visible) ;
                   /* cs.truncate() ; */

                   /* 4.データの表示範囲を自動調整 */
                   relayout( ) ;
           }
   }
   Button button1 {
           x = 232;
           y = 414;
           width = 200;
           height = 60;
           title = "ボタンサンプル";
           fgColor = "black";
           font = new Font("HG創英角ポップ体", 14);

   }
   testChart.initChart();
}