Examples of Plot


Examples of org.jfree.chart.plot.Plot

        }
      }

    }

    final Plot plot = chart.getPlot();
    plot.setNoDataMessageFont(Font.decode(getLabelFont()));

    final String message = getNoDataMessage();
    if (message != null)
    {
      plot.setNoDataMessage(message);
    }

    if (!isChartSectionOutline())
    {
      plot.setOutlineStroke(EMPTY_STROKE);
    }

    if (backgroundImage != null)
    {
      if (plotImageCache != null)
      {
        plot.setBackgroundImage(plotImageCache);
      }
      else
      {
        final ExpressionRuntime expressionRuntime = getRuntime();
        final ProcessingContext context = expressionRuntime.getProcessingContext();
        final ResourceKey contentBase = context.getContentBase();
        final ResourceManager manager = context.getResourceManager();
        try
        {
          final ResourceKey key = createKeyFromString(manager, contentBase, backgroundImage);
          final Resource resource = manager.create(key, null, Image.class);
          final Image image = (Image) resource.getResource();
          plot.setBackgroundImage(image);
          plotImageCache = image;
        }
        catch (Exception e)
        {
          logger.error("ABSTRACTCHARTEXPRESSION.ERROR_0007_ERROR_RETRIEVING_PLOT_IMAGE", e); //$NON-NLS-1$
View Full Code Here

Examples of org.jfree.chart.plot.Plot

      {
        chLegend.setItemPaint(getLegendTextColor());
      }
    }

    final Plot plot = chart.getPlot();
    plot.setNoDataMessageFont(Font.decode(getLabelFont()));

    final String pieNoData = getPieNoDataMessage();
    if (pieNoData != null)
    {
      plot.setNoDataMessage(pieNoData);
    }
    else
    {
      final String message = getNoDataMessage();
      if (message != null)
      {
        plot.setNoDataMessage(message);
      }
    }
  }
View Full Code Here

Examples of org.jfree.chart.plot.Plot

  protected void configureChart(final JFreeChart chart)
  {
    super.configureChart(chart);

    final Plot plot = chart.getPlot();
    final MultiplePiePlot mpp = (MultiplePiePlot) plot;
    final JFreeChart pc = mpp.getPieChart();
    configureSubChart(pc);

    final PiePlot pp = (PiePlot) pc.getPlot();
View Full Code Here

Examples of org.jfree.chart.plot.Plot

  {
    // A multi axis chart has to have at least one axis and chart specified.
    // Create the first axis as the base plot, and then go ahead and create the
    // charts for any additional axes.  Just take the renderer and data series
    // from those charts and add them to the first one.
    Plot mainPlot = null;

    JRFillMultiAxisPlot jrPlot = (JRFillMultiAxisPlot)getPlot();
   
    // create a multi axis hyperlink provider
    MultiAxisChartHyperlinkProvider multiHyperlinkProvider = new MultiAxisChartHyperlinkProvider();
View Full Code Here

Examples of org.jfree.chart.plot.Plot

    // transparent background
    chart.setBackgroundPaint(WidgetUtils.BG_COLOR_BRIGHTEST);
    chart.setBorderVisible(false);

    final Plot plot = chart.getPlot();
    plot.setInsets(new RectangleInsets(UnitType.ABSOLUTE, 0d, 0d, 0d, 0d));
    plot.setBackgroundPaint(WidgetUtils.BG_COLOR_BRIGHTEST);
    plot.setOutlinePaint(WidgetUtils.BG_COLOR_BRIGHTEST);
    plot.setOutlineVisible(true);

    if (plot instanceof PiePlot) {
      // tweaks for pie charts
      final PiePlot piePlot = (PiePlot) plot;
      piePlot.setBaseSectionOutlinePaint(WidgetUtils.BG_COLOR_DARK);
View Full Code Here

Examples of org.jfree.chart.plot.Plot

      {
        chLegend.setItemPaint(getLegendTextColor());
      }
    }

    final Plot plot = chart.getPlot();
    plot.setNoDataMessageFont(Font.decode(getLabelFont()));

    final String pieNoData = getPieNoDataMessage();
    if (pieNoData != null)
    {
      plot.setNoDataMessage(pieNoData);
    }
    else
    {
      final String message = getNoDataMessage();
      if (message != null)
      {
        plot.setNoDataMessage(message);
      }
    }
  }
View Full Code Here

Examples of org.jfree.chart.plot.Plot

  protected void configureChart(final JFreeChart chart)
  {
    super.configureChart(chart);

    final Plot plot = chart.getPlot();
    final MultiplePiePlot mpp = (MultiplePiePlot) plot;
    final JFreeChart pc = mpp.getPieChart();
    configureSubChart(pc);

    final PiePlot pp = (PiePlot) pc.getPlot();
View Full Code Here

Examples of org.jfree.chart.plot.Plot

  protected void configureChart(final JFreeChart chart)
  {
    super.configureChart(chart);

    final Plot plot = chart.getPlot();
    final PiePlot pp = (PiePlot)plot;
    final PieDataset pieDS = pp.getDataset();
    pp.setDirection(rotationClockwise ? Rotation.CLOCKWISE : Rotation.ANTICLOCKWISE);
    if ((explodeSegment != null) && (explodePct != null))
    {
View Full Code Here

Examples of org.jfree.chart.plot.Plot

        }
      }

    }

    final Plot plot = chart.getPlot();
    plot.setNoDataMessageFont(Font.decode(getLabelFont()));

    final String message = getNoDataMessage();
    if (message != null)
    {
      plot.setNoDataMessage(message);
    }

    plot.setOutlineVisible(isChartSectionOutline());

    if (backgroundImage != null)
    {
      if (plotImageCache != null)
      {
        plot.setBackgroundImage(plotImageCache);
      }
      else
      {
        final ExpressionRuntime expressionRuntime = getRuntime();
        final ProcessingContext context = expressionRuntime.getProcessingContext();
        final ResourceKey contentBase = context.getContentBase();
        final ResourceManager manager = context.getResourceManager();
        try
        {
          final ResourceKey key = createKeyFromString(manager, contentBase, backgroundImage);
          final Resource resource = manager.create(key, null, Image.class);
          final Image image = (Image) resource.getResource();
          plot.setBackgroundImage(image);
          plotImageCache = image;
        }
        catch (Exception e)
        {
          logger.error("ABSTRACTCHARTEXPRESSION.ERROR_0007_ERROR_RETRIEVING_PLOT_IMAGE", e); //$NON-NLS-1$
View Full Code Here

Examples of org.jfree.chart.plot.Plot

     * Test that the chart is using an xy plot with time as the domain axis.
     *
     * @param chart  the chart.
     */
    private void checkChart(JFreeChart chart) {
        Plot plot = chart.getPlot();
        if (!(plot instanceof PolarPlot)) {
            throw new IllegalArgumentException("plot is not a PolarPlot");
       }
    }
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.