Package org.jfree.chart.plot

Examples of org.jfree.chart.plot.Plot


    return svgImage;
  }

 
  public void updateSettings(JFreeChart chart, ChartConfig chartConfig){
    Plot plot = chart.getPlot();
   
    Visibility   visibility   = chartConfig.getVisibility();
    Colors     colors     = chartConfig.getColors();
   
    // Chart level visible items
    chart.setBorderVisible(visibility.isBorder());
    plot.setOutlineVisible(visibility.isOutline());
   
    // chart level colors
    final Color  BACKGROUND  = new Color(colors.getBg());
    plot.setBackgroundPaint(BACKGROUND);
    chart.setBackgroundPaint(BACKGROUND);
   
    // Chart level title
    if(chart.getTitle() != null){
      TextTitle title = chart.getTitle();
      title.setVisible(visibility.isTitle());
      title.setBackgroundPaint(new Color(colors.getTitleBg()));
      title.setPaint(new Color(colors.getTitle()));
      title.setExpandToFitSpace(true);
    }
   
    // In case of multiple plot read and update child level chart
    if(plot instanceof MultiplePiePlot){
      MultiplePiePlot multiplePiePlot = (MultiplePiePlot)plot;
      chart  = multiplePiePlot.getPieChart();
      plot   = chart.getPlot();
     
      chart.setBorderVisible(visibility.isBorder());
      plot.setOutlineVisible(visibility.isOutline());
     
      chart.setBackgroundPaint(BACKGROUND);
      plot.setBackgroundPaint(BACKGROUND);
    }
   
    if(plot instanceof CategoryPlot){
      CategoryPlot   categoryPlot   = (CategoryPlot)chart.getPlot();
      categoryPlot.setRangeGridlinesVisible(visibility.isRangeGridLines());
View Full Code Here


  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

        }
      }

    }

    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

      {
        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

  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

  {
    // 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

    // 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

      {
        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

  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

  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

TOP

Related Classes of org.jfree.chart.plot.Plot

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.