Package nl.topicus.wqplot.options

Examples of nl.topicus.wqplot.options.PlotOptions


    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


    lines.add(line);
    lines.add(line2);

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

    PlotOptions chart2O = chart2.getOptions();
    chart2O.addNewSeries().setRenderer("$.jqplot.BarRenderer");
    chart2O.addNewSeries().setXaxis("x2axis").setYaxis("y2axis");

    chart2O.getAxesDefaults().setLabelRenderer("$.jqplot.CanvasAxisLabelRenderer");
    chart2O.getAxesDefaults().setTickRenderer("$.jqplot.CanvasAxisTickRenderer");
    chart2O.getAxesDefaults().setTickOptions(
      new PlotCanvasAxisTickRendererOptions().setAngle(30.0));

    chart2O.getAxes().getXaxis().setRenderer("$.jqplot.CategoryAxisRenderer");
    chart2O.getAxes().getXaxis().setLabel("Warranty Concern");
    chart2O.getAxes().getX2axis().setRenderer("$.jqplot.CategoryAxisRenderer");
    chart2O.getAxes().getX2axis().setLabel("Metal");
    chart2O.getAxes().getYaxis().setLabel("Occurance");
    chart2O.getAxes().getYaxis().setAutoscale(true);
    chart2O.getAxes().getY2axis().setLabel("Number");
    chart2O.getAxes().getY2axis().setAutoscale(true);

    add(chart2);
  }
View Full Code Here

    List<BaseSeries<String, Integer>> lines = new ArrayList<BaseSeries<String, Integer>>();
    lines.add(line);

    JQPlot chart3 = new JQPlot("chart3", new ListModel<BaseSeries<String, Integer>>(lines));

    PlotOptions chart3O = chart3.getOptions();
    chart3O.setTitle("Concern vs. Occurrance");
    chart3O.addNewSeries().setRenderer("$.jqplot.BarRenderer");
    chart3O.getAxesDefaults().setLabelRenderer("$.jqplot.CanvasAxisLabelRenderer");
    chart3O.getAxesDefaults().setTickRenderer("$.jqplot.CanvasAxisTickRenderer");
    chart3O.getAxesDefaults().setTickOptions(
      new PlotCanvasAxisTickRendererOptions().setLabelPosition(PlotTickLabelPosition.middle)
        .setAngle(-30.0));
    chart3O.getAxes().getXaxis().setRenderer("$.jqplot.CategoryAxisRenderer");
    chart3O.getAxes().getXaxis().setLabel("Warranty Concern");
    chart3O.getAxes().getYaxis().setAutoscale(true);
    chart3O.getAxes().getYaxis().setLabel("Occurance");
    add(chart3);
  }
View Full Code Here

  {
    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

    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'"));
    chart1O.addNewSeries().setRendererOptions(
      new PlotBlockRendererOptions().setCss("background: '#D3E4A0'"));
    chart1O.getAxes().getXaxis().setMin(0).setMax(8);
    chart1O.getAxes().getYaxis().setMin(0).setMax(200);
    add(chart1);
  }
View Full Code Here

    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);
    chart2O.addNewSeries().setLabel("Independent Brands");
    chart2O.addNewSeries().setLabel("Pepsi Brands");
    chart2O.addNewSeries().setLabel("Coke Brands");
    chart2O.getAxes().getXaxis().setMin(0).setMax(8);
    chart2O.getAxes().getYaxis().setMin(0).setMax(200);

    add(chart2);
  }
View Full Code Here

    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

    @SuppressWarnings("unchecked")
    JQPlot chart1 =
      new JQPlot("chart1", new ListModel<NumberSeries<Double, Double>>(Arrays.asList(l1, l2,
        l3, l4)));
    PlotOptions chart1O = chart1.getOptions();
    chart1O.setTitle("Line Style Options");

    PlotSeries chart1series1 = chart1O.addNewSeries();
    chart1series1.setLineWidth(2d);
    chart1series1.getMarkerOptions().setStyle(PlotMarkerStyle.diamond);

    PlotSeries chart1series2 = chart1O.addNewSeries();
    chart1series2.setShowLine(false);
    chart1series2.getMarkerOptions().setSize(7d).setStyle(PlotMarkerStyle.diamond);

    PlotSeries chart1series3 = chart1O.addNewSeries();
    chart1series3.getMarkerOptions().setStyle(PlotMarkerStyle.circle);

    PlotSeries chart1series4 = chart1O.addNewSeries();
    chart1series4.setLineWidth(5d);
    chart1series4.getMarkerOptions().setSize(14d).setStyle(PlotMarkerStyle.filledSquare);

    add(chart1);
  }
View Full Code Here

      l1.addEntry(i, Math.cos(i));

    @SuppressWarnings("unchecked")
    JQPlot chart2 =
      new JQPlot("chart2", new ListModel<NumberSeries<Double, Double>>(Arrays.asList(l1)));
    PlotOptions chart2O = chart2.getOptions();
    chart2O.setTitle(new PlotTitle("Shadow Options"));

    PlotSeries chart2series1 = chart2O.addNewSeries();
    chart2series1.setLineWidth(5d);
    chart2series1.setShadowAngle(0d);
    chart2series1.setShadowOffset(1.5d);
    chart2series1.setShadowAlpha(0.08d);
    chart2series1.setShadowDepth(6);
View Full Code Here

    SimpleNumberSeries<Integer> l3 = new SimpleNumberSeries<Integer>(4, 25, 13, 22, 14, 17, 15);

    @SuppressWarnings("unchecked")
    JQPlot chart3 = new JQPlot("chart3", new ListModel(Arrays.asList(l1, l2, l3)));
    PlotOptions chart3O = chart3.getOptions();
    chart3O.getLegend().setShow(true);
    chart3O.setTitle("Mixed Data Input Formats");

    PlotSeries chart3series1 = chart3O.addNewSeries();
    chart3series1.setLabel("Rising line");
    chart3series1.setShowLine(false);
    chart3series1.getMarkerOptions().setStyle(PlotMarkerStyle.square);

    chart3O.addNewSeries().setLabel("Declining line");

    PlotSeries chart3series3 = chart3O.addNewSeries();
    chart3series3.setLabel("Zig Zag line");
    chart3series3.setLineWidth(5d);
    chart3series3.setShowMarker(false);

    add(chart3);
View Full Code Here

TOP

Related Classes of nl.topicus.wqplot.options.PlotOptions

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.