Examples of LineChart


Examples of com.dianping.cat.report.page.LineChart

      }
    }
  }

  protected void put(Map<String, LineChart> charts, Map<String, LineChart> result, String key) {
    LineChart value = charts.get(key);

    if (value != null) {
      result.put(key, charts.get(key));
    }
  }
View Full Code Here

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

    super(valueProperty, labelProperty);
  }

  @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) {
View Full Code Here

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

    barProvider.bind(store);
    bar.setDataProvider(barProvider);
    bar.addChartListener(listener);
    model.addChartConfig(bar);

    LineChart line = new LineChart();
    line.setAnimateOnShow(true);
    line.setText("Average");
    line.setColour("#FF0000");
    LineDataProvider lineProvider = new LineDataProvider("avgsales");
    lineProvider.bind(store);
    line.setDataProvider(lineProvider);
    model.addChartConfig(line);

    chart.setChartModel(model);

    // grid
View Full Code Here

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

    super(valueProperty, labelProperty);
  }

  @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) {
View Full Code Here

Examples of com.google.gwt.visualization.client.visualizations.LineChart

        options.setHeight(400);
        options.setLineSize(2);
        options.setPointSize(5);
        options.setSmoothLine(true);
        options.setShowCategories(true);
        widget = new LineChart(createCompanyPerformance(), options);
        RootPanel.get().add(widget);
      }});
  }
View Full Code Here

Examples of com.google.gwt.visualization.client.visualizations.LineChart

  }
 
  public void testOnMouseOver() {
    loadApi(new Runnable() {
      public void run() {
        LineChart chart;
        Options options = Options.create();
        chart = new LineChart(createCompanyPerformance(), options);
        chart.addOnMouseOverHandler(new OnMouseOverHandler() {
          @Override
          public void onMouseOverEvent(OnMouseOverEvent event) {
            assertNotNull(event);
            assertEquals(1, event.getRow());
            assertEquals(1, event.getColumn());
            finishTest();
          }
        });
        triggerOnMouseOver(chart.getJso());
      }
    }, false);
  }
View Full Code Here

Examples of com.google.gwt.visualization.client.visualizations.LineChart

  }
 
  public void testOnMouseOut() {
    loadApi(new Runnable() {
      public void run() {
        LineChart chart;
        Options options = Options.create();
        chart = new LineChart(createCompanyPerformance(), options);
        chart.addOnMouseOutHandler(new OnMouseOutHandler() {
          @Override
          public void onMouseOutEvent(OnMouseOutEvent event) {
            assertNotNull(event);
            assertEquals(1, event.getRow());
            assertEquals(1, event.getColumn());
            finishTest();
          }
        });
        triggerOnMouseOut(chart.getJso());
      }
    }, false);
 
View Full Code Here

Examples of com.google.gwt.visualization.client.visualizations.LineChart

  @UiField DecoratedPopupPanel panel;

  @Override
  public void setChart(ReportData<Map<Integer, Map<String, Integer>>> reportData, ReportMetaData reportMeta) {
    chartPanel.clear();
    chartPanel.add(new LineChart(getAbstractTable(reportData, reportMeta), getAreaOptions(reportMeta)));
  }
View Full Code Here

Examples of com.google.gwt.visualization.client.visualizations.LineChart

      public void onChange(ChangeEvent event) {
        redrawChart(NumberParser.convertToDouble(price.getText()));
      }
    });

    chart = new LineChart(getAbstractTable(1), getAreaOptions());
    panel.add(chart);
    panel.add(getAdjustmentPanel());

    initWidget(panel);
  }
View Full Code Here

Examples of com.google.gwt.visualization.client.visualizations.LineChart

              com.google.gwt.visualization.client.visualizations.LineChart.Options options = com.google.gwt.visualization.client.visualizations.LineChart.Options.create();
              options.setTitle("Line");
              options.setWidth(width);
              options.setHeight(240);
              // Create a PieChart and add it to a panel.
              StatisticsPresenter.this.display.upperRightChartArea().add(new LineChart(data, options));

            }
          }
        });
      }
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.