Package org.timepedia.chronoscope.client

Examples of org.timepedia.chronoscope.client.Datasets


  /**
   * shim for UI binder
   */
  private GssProperties shimGssProperties(GssProperties gssProperties){
      Datasets datasets = getChart().getPlot().getDatasets();
      Dataset shim = datasets.getById("shim__");
      // if ((datasets.size() > 0) && (simulationLoaded != null)) {
      //     gssProperties.setTransparency(0.0);
      // }
      return gssProperties;
   }
View Full Code Here


   * Adjusts {@link #absRangeMin} and {@link #absRangeMax} to the smallest
   * interval that fully encompasses
   */
  private void adjustAbsRanges() {
    this.setAbsRange(Double.POSITIVE_INFINITY, Double.NEGATIVE_INFINITY);
    Datasets datasets = plot.getDatasets();
    for (int i = 0; i < datasets.size(); i++) {
      Dataset dataset = datasets.get(i);
      if (dataset.getAxisId(0).equals(this.getAxisId())) {
        this.adjustAbsRange(dataset);
      }
    }
  }
View Full Code Here

  public StaticImageChartPanel(Dataset[] ds, boolean interactive, int width,
      int height, GssContext gssContext) {
    this.interactive = interactive;
    chart = new Chart();
    plot = new DefaultXYPlot();
    Datasets dss = new Datasets(ds);

    plot.setDatasets(dss);
    plot.setOverviewEnabled(false);
    plot.setPlotRenderer(new XYPlotRenderer());
    chart.setPlot(plot);
View Full Code Here

  public static BufferedImage renderChronoscopeImage(Dataset[] ds, int width,
      int height, String css, boolean interactive, double domainOrigin,
      double currentDomain, boolean az) {
    StaticImageChartPanel sicp = ServerChronoscope.get()
        .createChart(new Datasets(ds), width, height, null);

    Chart c = sicp.getChart();

    XYPlot xyPlot = c.getPlot();
    xyPlot.getRangeAxis(0).setAutoZoomVisibleRange(az);
View Full Code Here

        DefaultXYPlot theplot = (DefaultXYPlot) view.getChart().getPlot();
       
        theplot.setAutoZoomVisibleRange(0, true);
        theplot.setAnimationPreview(false);

        Datasets datasets = theplot.getDatasets();
        Dataset d = theplot.getDatasets().get(0);
        d.setIncrementalHandler(new IncrementalHandler() {
          public void onDataNeeded(Interval domain, Dataset dataset,
              IncrementalDataResponse response) {
          }
View Full Code Here

    }
   
    JSONObject json = (JSONObject) JSONSerializer.toJSON(jsonTxt);
    JSONArray  sets = json.getJSONArray("datasets");
   
    Datasets dsets = new Datasets();
    for (int i=0; i < sets.size(); i++) {
      JSONObject set = sets.getJSONObject(i);
      GwtJsonDataset s = new GwtJsonDataset(set);
      Dataset d = datasetReader.createDatasetFromJson(s);
      dsets.add(d);
    }
   
    String mippedJson;
    if (multiple) {
      mippedJson = dsets.toJson();
    } else {
      mippedJson = dsets.get(0).toJson();
    }
   
    if (varName != null) {
      mippedJson = varName + " = " + mippedJson + ";";
    }
View Full Code Here

    label = new JLabel();

    chart = new Chart();
    plot = new DefaultXYPlot();
    plot.setDatasets(new Datasets(xyDatasets));
    XYPlotRenderer plotRenderer = new XYPlotRenderer();
    plot.setPlotRenderer(plotRenderer);
    chart.setPlot(plot);

    add(label);
View Full Code Here

    }
  }

  private void benchMark(final View view) {
    final XYPlot plot = view.getChart().getPlot();
    final Datasets datasets = plot.getDatasets();
   
    // Reset plot domain to 'max zoom'
    datasets.getDomainExtrema().copyTo(plot.getDomain());
   
    final double dO = plot.getDomain().getStart();
    final double cD = plot.getDomain().length();
    final double dC = dO + cD / 2;
    final int lim = GWT.isScript() ? 100 : 5;
View Full Code Here

TOP

Related Classes of org.timepedia.chronoscope.client.Datasets

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.