Package com.google.gwt.visualization.client.visualizations.corechart.PieChart

Examples of com.google.gwt.visualization.client.visualizations.corechart.PieChart.PieOptions


    loadApi(new Runnable() {
      public void run() {
        DataTable data = createDailyActivities();

        // Create a minimal pie chart.
        PieOptions pieOptions = PieChart.createPieOptions();
        Options options = pieOptions;
        // Common options
        options.setAxisTitlesPosition("out");
        options.setBackgroundColor(Color.create("pink", "black", 2));
        ChartArea chartArea = ChartArea.create();
        chartArea.setTop(5);
        chartArea.setHeight(6);
        chartArea.setWidth(7);
        chartArea.setLeft(8);
        options.setChartArea(chartArea);
        options.setColors("pink", "black", "white");
        options.setFontName("Verbena");
        options.setFontSize(12);
        options.setGridlineColor("blue");
        options.setHeight(400);
        options.setInterpolateNulls(true);
        options.setLegend(LegendPosition.RIGHT);
        TextStyle textStyle = TextStyle.create();
        textStyle.setFontSize(10);
        textStyle.setFontName("Courier New");
        options.setLegendTextStyle(textStyle);
        options.setLineWidth(5);
        options.setTitle("My Daily Activities");
        options.setTitleTextStyle(textStyle);
        options.setTooltipTextStyle(textStyle);
        options.setWidth(400);

        // Pie specific
        pieOptions.set3D(true);
        pieOptions.setPieSliceText("data");
        pieOptions.setPieSliceTextStyle(textStyle);
        pieOptions.setPieResidueSliceLabel("Bling");

        Widget widget = new PieChart(data, options);
        RootPanel.get().add(widget);
        Element div = widget.getElement();
        // assert that the div's first child is an iframe
View Full Code Here


    data.setValue(4, 0, "Sleep");
    data.setValue(4, 1, 7);

    /* create pie chart */

    PieOptions options = PieChart.createPieOptions();
    options.setWidth(400);
    options.setHeight(240);
    options.set3D(true);
    options.setTitle("My Daily Activities");
    return new PieChart(data, options);
  }
View Full Code Here

  }

  // report pie chart
  private Options createTotalReportOptions()
  {
    PieOptions options = PieOptions.create();
    options.setWidth((int) ((double) browserWidth * 0.4));
    options.setHeight((int) ((double) browserHeight * 0.4));
    options.set3D(true);
    options.setPieSliceText("value");
    switch (totalsDataSelection.getSelectedIndex())
    {
      case 0: // reports
        options.setTitle("Total Reports per App");
        break;
      case 1: // fixed
        options.setTitle("Total Reports Fixed per App");
        break;
      case 2: // looked at
        options.setTitle("Total Reports Looked At per App");
        break;
      case 3: // not fixed
        options.setTitle("Total Reports Not Fixed per App");
        break;
      case 4: // new
        options.setTitle("Total New Reports per App");
        break;
    }

    options.setTitleTextStyle(mBoldTitleFont);
    Properties animation = Properties.create();
    animation.set("duration", 1000.0);
    animation.set("easing", "out");
    options.set("animation", animation);

    return options;
  }
View Full Code Here

TOP

Related Classes of com.google.gwt.visualization.client.visualizations.corechart.PieChart.PieOptions

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.