Package nl.topicus.wqplot.options

Examples of nl.topicus.wqplot.options.PlotOptions


    lines.add(new SimpleNumberSeries<Integer>(2, 3, 1, 4, 3));
    lines.add(new SimpleNumberSeries<Integer>(1, 4, 3, 2, 5));

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

    PlotOptions chart1O = chart1.getOptions();
    chart1O
      .setTitle("Stacked Filled Line Plot with Transparency (transparency not supported in IE6)");
    chart1O.setStackSeries(true);
    chart1O.getGrid().setBackground("#fefbf3").setBorderWidth(2.5);
    chart1O.getSeriesDefaults().setFill(true).setShowMarker(false).setShadow(false);
    chart1O.getAxes().getXaxis().setPad(1.0).setNumberTicks(5).setAutoscale(false);
    chart1O.getAxes().getYaxis().setMin(0.0).setMax(12.0).setNumberTicks(5);
    chart1O.addNewSeries().setColor("rgba(68, 124, 147, 0.7)");
    chart1O.addNewSeries().setColor("rgba(150, 35, 90, 0.7)");

    add(chart1);
  }
View Full Code Here


    line1.addEntry(asDate("2009-01-30"), 8.2);
    lines.add(line1);

    JQPlot chart2 = new JQPlot("chart2", new ListModel<BaseSeries<Date, Double>>(lines));

    PlotOptions chart2O = chart2.getOptions();
    chart2O.setTitle("Rotated Axis Text");
    chart2O.getAxes().getXaxis().setRenderer("$.jqplot.DateAxisRenderer");
    chart2O.getAxes().getXaxis().setMin(asDate("2008-08-30"));
    chart2O.getAxes().getXaxis().setTickRenderer("$.jqplot.CanvasAxisTickRenderer");
    chart2O.getAxes().getXaxis().setTickInterval("1 month");
    PlotCanvasAxisTickRendererOptions tickOptions = new PlotCanvasAxisTickRendererOptions();
    tickOptions.setFormatString("%b %#d, %Y");
    tickOptions.setFontSize("10pt");
    tickOptions.setFontFamily("Tahoma");
    tickOptions.setAngle(-40.0);
    tickOptions.setFontWeight("normal");
    tickOptions.setFontStretch(1.0);
    chart2O.getAxes().getXaxis().setTickOptions(tickOptions);
    chart2O.addNewSeries().setLineWidth(4.0).getMarkerOptions()
      .setStyle(PlotMarkerStyle.square);

    add(chart2);
  }
View Full Code Here

    lines.add(line1);
    lines.add(line2);

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

    PlotOptions chart3O = chart3.getOptions();
    chart3O.setStackSeries(true);
    chart3O.getLegend().setShow(true).setLocation(PlotLegendLocation.se);
    chart3O.setTitle("Unit Sales: Acme Decoy Division");
    chart3O.getSeriesDefaults().setRenderer("$.jqplot.BarRenderer");
    PlotBarRendererOptions renderOptions = new PlotBarRendererOptions();
    renderOptions.setBarDirection(PlotBarDirection.horizontal);
    renderOptions.setBarPadding(6.0);
    renderOptions.setBarMargin(40.0);
    chart3O.getSeriesDefaults().setRendererOptions(renderOptions);
    chart3O.addNewSeries().setLabel("1st Qtr");
    chart3O.addNewSeries().setLabel("2nd Qtr");
    chart3O.getAxes().getYaxis().setRenderer("$.jqplot.CategoryAxisRenderer");
    chart3O.getAxes().getYaxis().setTicks("Q1", "Q2", "Q3", "Q4");
    chart3O.getAxes().getXaxis().setMin(0).setMax(20).setNumberTicks(5);

    add(chart3);
  }
View Full Code Here

    lines.add(new SimpleNumberSeries<Double>(4.0, 2.0, 9.0, 16.0));
    lines.add(new SimpleNumberSeries<Double>(3.0, 7.0, 6.25, 3.125));

    JQPlot chart3b = new JQPlot("chart3b", new ListModel<SimpleNumberSeries<Double>>(lines));

    PlotOptions chart3bO = chart3b.getOptions();
    chart3bO.setStackSeries(true);
    chart3bO.getLegend().setShow(true).setLocation(PlotLegendLocation.nw);
    chart3bO.setTitle("Unit Sales: Acme Decoy Division");
    chart3bO.getSeriesDefaults().setRenderer("$.jqplot.BarRenderer");
    PlotBarRendererOptions renderOptions = new PlotBarRendererOptions();
    renderOptions.setBarPadding(6.0);
    renderOptions.setBarMargin(40.0);
    chart3bO.getSeriesDefaults().setRendererOptions(renderOptions);
    chart3bO.addNewSeries().setLabel("1st Qtr");
    chart3bO.addNewSeries().setLabel("2nd Qtr");
    chart3bO.getAxes().getXaxis().setRenderer("$.jqplot.CategoryAxisRenderer");
    chart3bO.getAxes().getXaxis().setTicks("Q1", "Q2", "Q3", "Q4");
    chart3bO.getAxes().getYaxis().setMin(0).setMax(20).setNumberTicks(5);

    add(chart3b);
  }
View Full Code Here

    lines.add(new SimpleNumberSeries<Double>(4.0, 2.0, 9.0, 16.0));
    lines.add(new SimpleNumberSeries<Double>(3.0, 7.0, 6.25, 3.125));

    JQPlot chart3c = new JQPlot("chart3c", new ListModel<SimpleNumberSeries<Double>>(lines));

    PlotOptions chart3cO = chart3c.getOptions();
    chart3cO.getLegend().setShow(true).setLocation(PlotLegendLocation.nw);
    chart3cO.setTitle("Unit Sales: Acme Decoy Division");
    chart3cO.getSeriesDefaults().setRenderer("$.jqplot.BarRenderer");
    PlotBarRendererOptions renderOptions = new PlotBarRendererOptions();
    renderOptions.setBarPadding(6.0);
    renderOptions.setBarMargin(20.0);
    chart3cO.getSeriesDefaults().setRendererOptions(renderOptions);
    chart3cO.addNewSeries().setLabel("1st Qtr");
    chart3cO.addNewSeries().setLabel("2nd Qtr");
    chart3cO.getAxes().getXaxis().setRenderer("$.jqplot.CategoryAxisRenderer");
    chart3cO.getAxes().getXaxis().setTicks("Q1", "Q2", "Q3", "Q4");
    chart3cO.getAxes().getYaxis().setMin(0).setMax(20).setNumberTicks(5);

    add(chart3c);
  }
View Full Code Here

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

    JQPlot chart4 = new JQPlot("chart4", new ListModel<BaseSeries<String, Double>>(lines));

    PlotOptions chart4O = chart4.getOptions();
    chart4O.setTitle("Pie Chart with Legend and sliceMargin");
    PlotPieRendererOptions renderOptions = new PlotPieRendererOptions();
    renderOptions.setSliceMargin(8.0);
    chart4O.getSeriesDefaults().setRenderer("$.jqplot.PieRenderer")
      .setRendererOptions(renderOptions);
    chart4O.getLegend().setShow(true);

    add(chart4);
  }
View Full Code Here

  {
    JQPlot chart1 =
      new JQPlot("chart1", new ListModel<SimpleNumberSeries<Integer>>(
        Arrays.asList(new SimpleNumberSeries<Integer>(2, 6, 7, 10))));

    PlotOptions chart1O = chart1.getOptions();
    chart1O.getSeriesDefaults().setRenderer(JQPlotBarRenderer.get());
    chart1O.getSeriesDefaults().getPointLabels().setShow(true);

    chart1O.getAxes().getXaxis().setRenderer(JQPlotCategoryAxisRenderer.get());
    chart1O.getAxes().getXaxis().setTicks("a", "b", "c", "d");

    chart1O.getHighlighter().setShow(false);

    add(chart1);

    final WebMarkupContainer info1 = new WebMarkupContainer("info1");
    info1.setOutputMarkupId(true);
View Full Code Here

    JQPlot chart2 =
      new JQPlot("chart2", new ListModel<SimpleNumberSeries<Integer>>(Arrays.asList(
        new SimpleNumberSeries<Integer>(2, 6, 7, 10), new SimpleNumberSeries<Integer>(7, 5,
          3, 2))));

    PlotOptions chart2O = chart2.getOptions();
    chart2O.getSeriesDefaults().setRenderer(JQPlotBarRenderer.get());
    chart2O.getSeriesDefaults().getPointLabels().setShow(true);

    chart2O.getAxes().getXaxis().setRenderer(JQPlotCategoryAxisRenderer.get());
    chart2O.getAxes().getXaxis().setTicks("a", "b", "c", "d");

    add(chart2);

    final WebMarkupContainer info2 = new WebMarkupContainer("info2");
    info2.setOutputMarkupId(true);
View Full Code Here

    series.add(l3);

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

    PlotOptions chart2bO = chart2b.getOptions();
    chart2bO.getSeriesDefaults().setRenderer(JQPlotBarRenderer.get());
    chart2bO.getSeriesDefaults().getPointLabels().setShow(true);
    chart2bO.getSeriesDefaults().getPointLabels().setLocation(PlotPointLabelLocation.e);
    chart2bO.getSeriesDefaults().getPointLabels().setEdgeTolerance(-15d);
    chart2bO.getSeriesDefaults().setShadowAngle(135d);
    chart2bO.getSeriesDefaults().setRendererOptions(
      new PlotBarRendererOptions().setBarDirection(PlotBarDirection.horizontal));

    chart2bO.getAxes().getYaxis().setRenderer(JQPlotCategoryAxisRenderer.get());

    add(chart2b);

    final WebMarkupContainer info2b = new WebMarkupContainer("info2b");
    info2b.setOutputMarkupId(true);
View Full Code Here

    JQPlot chart3 =
      new JQPlot("chart3", new ListModel<SimpleNumberSeries<Integer>>(Arrays.asList(
        new SimpleNumberSeries<Integer>(2, 6, 7, 10), new SimpleNumberSeries<Integer>(7, 5,
          3, 2), new SimpleNumberSeries<Integer>(14, 9, 3, 8))));

    PlotOptions chart3O = chart3.getOptions();
    chart3O.setStackSeries(true);
    chart3O.setCaptureRightClick(true);

    chart3O.getSeriesDefaults().setRenderer(JQPlotBarRenderer.get());
    chart3O.getSeriesDefaults().setRendererOptions(
      new PlotBarRendererOptions().setHighlightMouseDown(true));
    chart3O.getSeriesDefaults().getPointLabels().setShow(true);

    chart3O.getLegend().setShow(true);
    chart3O.getLegend().setLocation(PlotLegendLocation.e);
    chart3O.getLegend().setPlacement(PlotLegendPlacement.outside);

    add(chart3);

    final WebMarkupContainer info3 = new WebMarkupContainer("info3");
    info3.setOutputMarkupId(true);
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.