Package com.extjs.gxt.charts.client.model

Examples of com.extjs.gxt.charts.client.model.ChartModel


    add(cp, new MarginData(20));
  }

  private ChartModel getPieChartData() {
    ChartModel cm = new ChartModel("Sales by Region",
        "font-size: 14px; font-family: Verdana; text-align: center;");
    cm.setBackgroundColour("#fffff5");
    Legend lg = new Legend(Position.RIGHT, true);
    lg.setPadding(10);
    cm.setLegend(lg);
   
    PieChart pie = new PieChart();
    pie.setAlpha(0.5f);
    pie.setNoLabels(true);
    pie.setTooltip("#label# $#val#M<br>#percent#");
    pie.setColours("#ff0000", "#00aa00", "#0000ff", "#ff9900", "#ff00ff");
    pie.addSlices(new PieChart.Slice(100, "AU","Australia"));
    pie.addSlices(new PieChart.Slice(200, "US", "USA"));
    pie.addSlices(new PieChart.Slice(150, "JP", "Japan"));
    pie.addSlices(new PieChart.Slice(120, "DE", "Germany"));
    pie.addSlices(new PieChart.Slice(60, "UK", "United Kingdom"));
    pie.addChartListener(listener);

    cm.addChartConfig(pie);
    return cm;
  }
View Full Code Here

TOP

Related Classes of com.extjs.gxt.charts.client.model.ChartModel

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.