Examples of JQPlot


Examples of nl.topicus.wqplot.components.JQPlot

  {
    List<SimpleNumberSeries<Integer>> lines = new ArrayList<SimpleNumberSeries<Integer>>();
    lines.add(new SimpleNumberSeries<Integer>(23, 53, 13, null, 18, 25, 26, 41, 42, null, null,
      null, 37, 29, 27, 19));

    JQPlot chart1b = new JQPlot("chart1b", new ListModel<SimpleNumberSeries<Integer>>(lines));

    PlotOptions chart1bO = chart1b.getOptions();
    chart1bO.setTitle("breakOnNull true, Nulls Break Line");
    chart1bO.addNewSeries().setBreakOnNull(true);

    add(chart1b);
  }
View Full Code Here

Examples of nl.topicus.wqplot.components.JQPlot

    line.addEntry(2, null);
    line.addEntry(3, 7);
    line.addEntry(4, 10);
    lines.add(line);

    JQPlot chart2 = new JQPlot("chart2", new ListModel<NumberSeries<Integer, Integer>>(lines));

    PlotOptions chart2O = chart2.getOptions();
    chart2O.getSeriesDefaults().setRenderer("$.jqplot.BarRenderer");
    chart2O.getAxes().getXaxis().setRenderer("$.jqplot.CategoryAxisRenderer");

    add(chart2);
  }
View Full Code Here

Examples of nl.topicus.wqplot.components.JQPlot

    line.addEntry(2, null);
    line.addEntry(3, 7);
    line.addEntry(4, 10);
    lines.add(line);

    JQPlot chart2b =
      new JQPlot("chart2b", new ListModel<NumberSeries<Integer, Integer>>(lines));

    PlotOptions chart2bO = chart2b.getOptions();
    chart2bO.getSeriesDefaults().setRenderer("$.jqplot.BarRenderer").setBreakOnNull(true);
    chart2bO.getAxes().getXaxis().setRenderer("$.jqplot.CategoryAxisRenderer");

    add(chart2b);
  }
View Full Code Here

Examples of nl.topicus.wqplot.components.JQPlot

  }

  @SuppressWarnings("unchecked")
  private void addChart1()
  {
    JQPlot chart1 =
      new JQPlot("chart1", new ListModel<SimpleNumberSeries<Integer>>(
        Arrays.asList(new SimpleNumberSeries<Integer>(null, 13, 43, null, 18, 25, 26, 41,
          42, null, null, null, 37, 29, 27, 19))));
    PlotOptions chart1O = chart1.getOptions();
    chart1O.setTitle("breakOnNull true");
    chart1O.getSeriesDefaults().setBreakOnNull(true);
    chart1O.getAxes().getXaxis().setMin(0).setMax(18).setTickInterval(2);

    add(chart1);
View Full Code Here

Examples of nl.topicus.wqplot.components.JQPlot

    s3.addEntry(4d, 90d, "Sprite", null);
    s3.addEntry(5d, 71d, "Squirt", null);
    s3.addEntry(5d, 155d, "Youki", null);
    lines.add(s3);

    JQPlot chart1 =
      new JQPlot("chart1", new ListModel<BlockSeries<Double, Double, String, Object>>(lines));

    PlotOptions chart1O = chart1.getOptions();
    chart1O.getSeriesDefaults().setRenderer(JQPlotBlockRenderer.get());
    chart1O.getLegend().setRenderer(JQPlotEnhancedLegendRenderer.get()).setShow(true);
    chart1O.addNewSeries();
    chart1O.addNewSeries().setRendererOptions(
      new PlotBlockRendererOptions().setCss("background: '#A1EED6'"));
View Full Code Here

Examples of nl.topicus.wqplot.components.JQPlot

    s3.addEntry(4d, 90d, "Sprite", null);
    s3.addEntry(5d, 71d, "Squirt", null);
    s3.addEntry(5d, 155d, "Youki", null);
    lines.add(s3);

    JQPlot chart2 =
      new JQPlot("chart2", new ListModel<BlockSeries<Double, Double, String, Object>>(lines));

    PlotOptions chart2O = chart2.getOptions();
    chart2O.getSeriesDefaults().setRenderer(JQPlotBlockRenderer.get())
      .setRendererOptions(new PlotBlockRendererOptions().setVaryBlockColors(true));
    chart2O.getSeriesDefaults().getPointLabels().setShow(false);
    chart2O.getLegend().setRenderer(JQPlotEnhancedLegendRenderer.get()).setShow(true)
      .setShowSwatch(false);
View Full Code Here

Examples of nl.topicus.wqplot.components.JQPlot

    l2.addEntry(2039, 800);
    NumberSeries<Integer, Integer> l3 = new NumberSeries<Integer, Integer>();
    l3.addEntry(2011, 0);
    l3.addEntry(2039, 400);

    JQPlot chart1 =
      new JQPlot("chart1", new ListModel<NumberSeries<Integer, Integer>>(Arrays.asList(l1,
        l2, l3)));
    add(chart1);

    PlotOptions chart1O = chart1.getOptions();
    chart1O.getGrid().setBackground("#ffffff");
    chart1O.getGrid().setBorderWidth(0d);
    chart1O.getGrid().setBorderColor("#ffffff");
    chart1O.getGrid().setShadow(true);
    chart1O.getGrid().setShadowWidth(10d);
    chart1O.getGrid().setShadowOffset(3d);
    chart1O.getGrid().setShadowDepth(8);
    chart1O.getGrid().setShadowColor("rgba(230, 230, 230, 0.07)");

    chart1O.getLegend().setRenderer("$.jqplot.EnhancedLegendRenderer");
    chart1O.getLegend().setShow(true);
    chart1O.getLegend().setLocation(PlotLegendLocation.s);
    chart1O.getLegend().setPlacement(PlotLegendPlacement.outside);
    chart1O.getLegend().setYoffset(30);
    chart1O.getLegend().setRendererOptions(
      new PlotEnhancedLegendRendererOptions().setNumberRows(2));

    chart1O.setStackSeries(true);
    chart1O.getSeriesDefaults().setFill(true);
    chart1O.getSeriesDefaults().setFillToZero(true);
    chart1O.getSeriesDefaults().setFillToValue(100);
    chart1O.getSeriesDefaults().setYaxis("y2axis");

    chart1O.addNewSeries().setLabel("oil");
    chart1O.addNewSeries().setLabel("renewables");
    chart1O.addNewSeries().setLabel("wind and water");

    chart1O.getAxesDefaults().setShowTickMarks(false);
    chart1O.getAxesDefaults().getTickOptions().setFormatString("%d");

    chart1O.getAxes().getXaxis().setBorderWidth(2d);
    chart1O.getAxes().getXaxis().setBorderColor("#999999");
    chart1O.getAxes().getXaxis()
      .setTicks(Arrays.asList(new PlotTick(2010), new PlotTick(2040)));
    chart1O.getAxes().getXaxis().getTickOptions().setShowGridline(false);

    chart1O.getAxes().getY2axis().setBorderWidth(0d);
    chart1O.getAxes().getY2axis().setBorderColor("#ffffff");
    chart1O.getAxes().getY2axis().setAutoscale(true);
    chart1O.getAxes().getY2axis().setMin(0);
    chart1O.getAxes().getY2axis().setMax(3000);
    chart1O.getAxes().getY2axis().setNumberTicks(4);
    chart1O.getAxes().getY2axis().setLabelRenderer("$.jqplot.CanvasAxisLabelRenderer");
    chart1O.getAxes().getY2axis().setLabel("energy use");

    chart1O.getAxes().getX2axis().setBorderWidth(0d);
    chart1O.getAxes().getX2axis().setBorderColor("#ffffff");

    chart1O.getAxes().getYaxis().setBorderWidth(2d);
    chart1O.getAxes().getYaxis().setBorderColor("#999999");

    chart1.addAfterRenderStatement("var r = " + chart1.getMarkupId() + "._width - "
      + chart1.getMarkupId() + "._gridPadding.left - 5; "
      + "r = r + 'px'; $('.jqplot-y2axis-label').css({ top : '10px', right : r });");
  }
View Full Code Here

Examples of nl.topicus.wqplot.components.JQPlot

    l1.addEntry(0.82d);
    l1.addEntry(1.5d);
    l1.addEntry(3.4d);
    l1.addEntry(4d);

    @SuppressWarnings("unchecked")
    JQPlot chart1 =
      new JQPlot("chart1", new ListModel<SimpleNumberSeries<Double>>(Arrays.asList(l1)));
    add(chart1);
  }
View Full Code Here

Examples of nl.topicus.wqplot.components.JQPlot

    l1.addEntry(0.82d);
    l1.addEntry(1.5d);
    l1.addEntry(3.4d);
    l1.addEntry(4d);

    @SuppressWarnings("unchecked")
    JQPlot chart2 =
      new JQPlot("chart2", new ListModel<SimpleNumberSeries<Double>>(Arrays.asList(l1)));
    chart2.getOptions().getAxes().getYaxis().getTickOptions().setFormatString("%.3f");
    add(chart2);
  }
View Full Code Here

Examples of nl.topicus.wqplot.components.JQPlot

    l1.addEntry(0.82d);
    l1.addEntry(1.5d);
    l1.addEntry(3.4d);
    l1.addEntry(4d);

    @SuppressWarnings("unchecked")
    JQPlot chart3 =
      new JQPlot("chart3", new ListModel<SimpleNumberSeries<Double>>(Arrays.asList(l1)));
    chart3.getOptions().getAxes().getYaxis().setAutoscale(true);
    add(chart3);
  }
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.