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

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


    this.textProperty = textProperty;
  }

  @Override
  public void populateData(ChartConfig config) {
    PieChart chart = (PieChart) config;
    chart.getValues().clear();

    for (ModelData m : store.getModels()) {
      Number n = getValue(m);
      if (n == null) {
        chart.addNullValue();
      } else {
        chart.addSlices(new Slice(n, getLabel(m), getText(m)));
      }
    }
  }
View Full Code Here


  class PieChartExample implements ChartModelExample {
    public ChartModel getChartModel(int segments) {
      ChartModel cd = new ChartModel("Sales per Month", "font-size: 14px; font-family: Verdana;");
      cd.setBackgroundColour("#fffff0");
      PieChart pie = new PieChart();
      pie.setAlpha(0.5f);
      pie.setTooltip("#label# $#val#<br>#percent#");
      pie.setAnimate(false);
      pie.setAlphaHighlight(true);
      pie.setGradientFill(true);
      pie.setColours("#ff0000", "#00aa00", "#0000ff", "#ff9900", "#ff00ff");

      for (int n = 0; n < segments; n++) {
        pie.addSlices(new PieChart.Slice(Random.nextInt(110) * 100, TestData.getMonths()[n]));
      }
      cd.addChartConfig(pie);
      return cd;
    }
View Full Code Here

    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

    this.textProperty = textProperty;
  }

  @Override
  public void populateData(ChartConfig config) {
    PieChart chart = (PieChart) config;
    chart.getValues().clear();

    for (ModelData m : store.getModels()) {
      Number n = getValue(m);
      if (n == null) {
        chart.addNullValue();
      } else {
        chart.addSlices(new Slice(n, getLabel(m), getText(m)));
      }
    }
  }
View Full Code Here

    this.textProperty = textProperty;
  }

  @Override
  public void populateData(ChartConfig config) {
    PieChart chart = (PieChart) config;
    chart.getValues().clear();

    for (ModelData m : store.getModels()) {
      Number n = getValue(m);
      if (n == null) {
        chart.addNullValue();
      } else {
        chart.addSlices(new Slice(n, getLabel(m), getText(m)));
      }
    }
  }
View Full Code Here

    this.textProperty = textProperty;
  }

  @Override
  public void populateData(ChartConfig config) {
    PieChart chart = (PieChart) config;
    chart.getValues().clear();

    for (ModelData m : store.getModels()) {
      Number n = getValue(m);
      if (n == null) {
        chart.addNullValue();
      } else {
        chart.addSlices(new Slice(n, getLabel(m), getText(m)));
      }
    }
  }
View Full Code Here

    this.textProperty = textProperty;
  }

  @Override
  public void populateData(ChartConfig config) {
    PieChart chart = (PieChart) config;
    chart.getValues().clear();

    for (ModelData m : store.getModels()) {
      Number n = getValue(m);
      if (n == null) {
        chart.addNullValue();
      } else {
        chart.addSlices(new Slice(n, getLabel(m), getText(m)));
      }
    }
  }
View Full Code Here

    this.textProperty = textProperty;
  }

  @Override
  public void populateData(ChartConfig config) {
    PieChart chart = (PieChart) config;
    chart.getValues().clear();

    for (ModelData m : store.getModels()) {
      Number n = getValue(m);
      if (n == null) {
        chart.addNullValue();
      } else {
        chart.addSlices(new Slice(n, getLabel(m), getText(m)));
      }
    }
  }
View Full Code Here

    this.textProperty = textProperty;
  }

  @Override
  public void populateData(ChartConfig config) {
    PieChart chart = (PieChart) config;
    chart.getValues().clear();

    for (ModelData m : store.getModels()) {
      Number n = getValue(m);
      if (n == null) {
        chart.addNullValue();
      } else {
        chart.addSlices(new Slice(n, getLabel(m), getText(m)));
      }
    }
  }
View Full Code Here

    this.textProperty = textProperty;
  }

  @Override
  public void populateData(ChartConfig config) {
    PieChart chart = (PieChart) config;
    chart.getValues().clear();

    for (ModelData m : store.getModels()) {
      Number n = getValue(m);
      if (n == null) {
        chart.addNullValue();
      } else {
        chart.addSlices(new Slice(n, getLabel(m), getText(m)));
      }
    }
  }
View Full Code Here

TOP

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

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.