Examples of XAxis


Examples of com.extjs.gxt.charts.client.model.axis.XAxis

  class SketchChartExample implements ChartModelExample {
    public ChartModel getChartModel(int segments) {
      ChartModel cm = new ChartModel("Smartest kid at school!", "font-size: 14px; font-family: Verdana;");
      cm.setBackgroundColour("#ffffff");
      XAxis xa = new XAxis();
      xa.setLabels("John", "Frank", "Mary", "Alec", "Mike", "James");
      cm.setXAxis(xa);
      SketchBarChart sketch = new SketchBarChart("#00aa00", "#009900", 6);
      sketch.setTooltip("#val# points");
      sketch.addValues(Random.nextInt(6) + 1, Random.nextInt(5) + 1, Random.nextInt(3) + 1);
      SketchBarChart.SketchBar skb = new SketchBarChart.SketchBar(Random.nextInt(5) + 5);
View Full Code Here

Examples of com.extjs.gxt.charts.client.model.axis.XAxis

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

    XAxis xAxis = null;
    if (labelProperty != null || labelProvider != null) {
      xAxis = chart.getModel().getXAxis();
      if (xAxis == null) {
        xAxis = new XAxis();
        chart.getModel().setXAxis(xAxis);
      } else {
        xAxis.getLabels().getLabels().clear();
      }
    }
    for (ModelData m : store.getModels()) {
      Number n = getValue(m);
      if (n == null) {
        chart.addNullValue();
      } else {
        chart.addBars(new Bar(n));
        minYValue = Math.min(minYValue, n.doubleValue());
        maxYValue = Math.max(maxYValue, n.doubleValue());
      }
      if (xAxis != null) {
        xAxis.addLabels(getLabel(m));
      }
    }
  }
View Full Code Here

Examples of com.extjs.gxt.charts.client.model.axis.XAxis

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

    XAxis xAxis = null;
    if (labelProperty != null || labelProvider != null) {
      xAxis = chart.getModel().getXAxis();
      if (xAxis == null) {
        xAxis = new XAxis();
        chart.getModel().setXAxis(xAxis);
      } else {
        xAxis.getLabels().getLabels().clear();
      }
    }

    boolean first = true;
    for (ModelData m : store.getModels()) {
      Number n = getValue(m);
      if (n == null) {
        chart.addNullValue();
      } else {
        chart.addValues(n);
        maxYValue = first ? n.doubleValue() : Math.max(maxYValue, n.doubleValue());
        minYValue = first ? n.doubleValue() : Math.min(minYValue, n.doubleValue());
        first = false;
      }
      if (xAxis != null) {
        xAxis.addLabels(getLabel(m));
      }
    }
  }
View Full Code Here

Examples of com.extjs.gxt.charts.client.model.axis.XAxis

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

    XAxis xAxis = null;
    if (labelProperty != null || labelProvider != null) {
      xAxis = chart.getModel().getXAxis();
      if (xAxis == null) {
        xAxis = new XAxis();
        chart.getModel().setXAxis(xAxis);
      }
      xAxis.getLabels().getLabels().clear();
    }
    for (ModelData m : store.getModels()) {
      Number n = getValue(m);
      if (n == null) {
        chart.addNullValue();
      } else {
        chart.addBars(new Bar(n));
        minYValue = Math.min(minYValue, n.doubleValue());
        maxYValue = Math.max(maxYValue, n.doubleValue());
      }
      if (xAxis != null) {
        xAxis.addLabels(getLabel(m));
      }
    }
  }
View Full Code Here

Examples of com.extjs.gxt.charts.client.model.axis.XAxis

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

    XAxis xAxis = null;
    if (labelProperty != null || labelProvider != null) {
      xAxis = chart.getModel().getXAxis();
      if (xAxis == null) {
        xAxis = new XAxis();
        chart.getModel().setXAxis(xAxis);
      }
      xAxis.getLabels().getLabels().clear();
    }

    boolean first = true;
    for (ModelData m : store.getModels()) {
      Number n = getValue(m);
      if (n == null) {
        chart.addNullValue();
      } else {
        chart.addValues(n);
        maxYValue = first ? n.doubleValue() : Math.max(maxYValue, n.doubleValue());
        minYValue = first ? n.doubleValue() : Math.min(minYValue, n.doubleValue());
        first = false;
      }
      if (xAxis != null) {
        xAxis.addLabels(getLabel(m));
      }
    }
  }
View Full Code Here

Examples of com.extjs.gxt.charts.client.model.axis.XAxis

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

    XAxis xAxis = null;
    if (labelProperty != null || labelProvider != null) {
      xAxis = chart.getModel().getXAxis();
      if (xAxis == null) {
        xAxis = new XAxis();
        chart.getModel().setXAxis(xAxis);
      } else {
        xAxis.getLabels().getLabels().clear();
      }
    }
    for (ModelData m : store.getModels()) {
      Number n = getValue(m);
      if (n == null) {
        chart.addNullValue();
      } else {
        chart.addBars(new Bar(n));
        minYValue = Math.min(minYValue, n.doubleValue());
        maxYValue = Math.max(maxYValue, n.doubleValue());
      }
      if (xAxis != null) {
        xAxis.addLabels(getLabel(m));
      }
    }
  }
View Full Code Here

Examples of com.extjs.gxt.charts.client.model.axis.XAxis

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

    XAxis xAxis = null;
    if (labelProperty != null || labelProvider != null) {
      xAxis = chart.getModel().getXAxis();
      if (xAxis == null) {
        xAxis = new XAxis();
        chart.getModel().setXAxis(xAxis);
      } else {
        xAxis.getLabels().getLabels().clear();
      }
    }

    boolean first = true;
    for (ModelData m : store.getModels()) {
      Number n = getValue(m);
      if (n == null) {
        chart.addNullValue();
      } else {
        chart.addValues(n);
        maxYValue = first ? n.doubleValue() : Math.max(maxYValue, n.doubleValue());
        minYValue = first ? n.doubleValue() : Math.min(minYValue, n.doubleValue());
        first = false;
      }
      if (xAxis != null) {
        xAxis.addLabels(getLabel(m));
      }
    }
  }
View Full Code Here

Examples of com.extjs.gxt.charts.client.model.axis.XAxis

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

    XAxis xAxis = null;
    if (labelProperty != null || labelProvider != null) {
      xAxis = chart.getModel().getXAxis();
      if (xAxis == null) {
        xAxis = new XAxis();
        chart.getModel().setXAxis(xAxis);
      }
      xAxis.getLabels().getLabels().clear();
    }

    for (ModelData m : store.getModels()) {
      Number n = getValue(m);
      if (n == null) {
        chart.addNullValue();
      } else {
        chart.addValues(n);
        maxYValue = maxYValue == null ? n.doubleValue() : Math.max(maxYValue, n.doubleValue());
        minYValue = minYValue == null ? n.doubleValue() : Math.min(minYValue, n.doubleValue());
        if (xAxis != null) {
          xAxis.addLabels(getLabel(m));
        }
      }
    }
  }
View Full Code Here

Examples of com.extjs.gxt.charts.client.model.axis.XAxis

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

    XAxis xAxis = null;
    if (labelProperty != null || labelProvider != null) {
      xAxis = chart.getModel().getXAxis();
      if (xAxis == null) {
        xAxis = new XAxis();
        chart.getModel().setXAxis(xAxis);
      }
      xAxis.getLabels().getLabels().clear();
    }

    for (ModelData m : store.getModels()) {
      Number n = getValue(m);
      if (n == null) {
        chart.addNullValue();
      } else {
        chart.addBars(new Bar(n));
        minYValue = Math.min(minYValue == null ? 0 : minYValue, n.doubleValue());
        maxYValue = Math.max(maxYValue == null ? 0 : maxYValue, n.doubleValue());
        if (xAxis != null) {
          xAxis.addLabels(getLabel(m));
        }
      }
    }
  }
View Full Code Here

Examples of com.extjs.gxt.charts.client.model.axis.XAxis

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

    XAxis xAxis = null;
    if (labelProperty != null || labelProvider != null) {
      xAxis = chart.getModel().getXAxis();
      if (xAxis == null) {
        xAxis = new XAxis();
        chart.getModel().setXAxis(xAxis);
      }
      xAxis.getLabels().getLabels().clear();
    }
    for (ModelData m : store.getModels()) {
      Number n = getValue(m);
      if (n == null) {
        chart.addNullValue();
      } else {
        chart.addBars(new Bar(n));
        minYValue = Math.min(minYValue, n.doubleValue());
        maxYValue = Math.max(maxYValue, n.doubleValue());
      }
      if (xAxis != null) {
        xAxis.addLabels(getLabel(m));
      }
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.