Package org.jfree.chart.plot

Examples of org.jfree.chart.plot.XYPlot


        isShowLegend()
        );

    configureChart(jfreeChart);

    XYPlot xyPlot = (XYPlot) jfreeChart.getPlot();
    JRCandlestickPlot candlestickPlot = (JRCandlestickPlot)getPlot();
    CandlestickRenderer candlestickRenderer = (CandlestickRenderer) xyPlot.getRenderer();
    boolean isShowVolume = candlestickPlot.getShowVolume() == null ? true : candlestickPlot.getShowVolume().booleanValue();
    candlestickRenderer.setDrawVolume(isShowVolume);

    // Handle the axis formating for the category axis
    configureAxis(xyPlot.getDomainAxis(), candlestickPlot.getTimeAxisLabelFont(),
        candlestickPlot.getTimeAxisLabelColor(), candlestickPlot.getTimeAxisTickLabelFont(),
        candlestickPlot.getTimeAxisTickLabelColor(), candlestickPlot.getTimeAxisTickLabelMask(), candlestickPlot.getTimeAxisVerticalTickLabels(),
        candlestickPlot.getTimeAxisLineColor(), false,
        (Comparable)evaluateExpression(candlestickPlot.getDomainAxisMinValueExpression()),
        (Comparable)evaluateExpression(candlestickPlot.getDomainAxisMaxValueExpression()));

    // Handle the axis formating for the value axis
    configureAxis(xyPlot.getRangeAxis(), candlestickPlot.getValueAxisLabelFont(),
        candlestickPlot.getValueAxisLabelColor(), candlestickPlot.getValueAxisTickLabelFont(),
        candlestickPlot.getValueAxisTickLabelColor(), candlestickPlot.getValueAxisTickLabelMask(), candlestickPlot.getValueAxisVerticalTickLabels(),
        candlestickPlot.getValueAxisLineColor(), true,
        (Comparable)evaluateExpression(candlestickPlot.getRangeAxisMinValueExpression()),
        (Comparable)evaluateExpression(candlestickPlot.getRangeAxisMaxValueExpression()));
View Full Code Here


        isShowLegend()
        );

    configureChart(jfreeChart);

    XYPlot xyPlot = (XYPlot) jfreeChart.getPlot();
    JRHighLowPlot highLowPlot = (JRHighLowPlot)getPlot();
    HighLowRenderer hlRenderer = (HighLowRenderer) xyPlot.getRenderer();
    boolean isShowOpenTicks = highLowPlot.getShowOpenTicks() == null ? false : highLowPlot.getShowOpenTicks().booleanValue();
    boolean isShowCloseTicks = highLowPlot.getShowCloseTicks() == null ? false : highLowPlot.getShowCloseTicks().booleanValue();
   
    hlRenderer.setDrawOpenTicks(isShowOpenTicks);
    hlRenderer.setDrawCloseTicks(isShowCloseTicks);

    // Handle the axis formating for the category axis
    configureAxis(xyPlot.getDomainAxis(), highLowPlot.getTimeAxisLabelFont(),
        highLowPlot.getTimeAxisLabelColor(), highLowPlot.getTimeAxisTickLabelFont(),
        highLowPlot.getTimeAxisTickLabelColor(), highLowPlot.getTimeAxisTickLabelMask(), highLowPlot.getTimeAxisVerticalTickLabels(),
        highLowPlot.getTimeAxisLineColor(), false,
        (Comparable)evaluateExpression(highLowPlot.getDomainAxisMinValueExpression()),
        (Comparable)evaluateExpression(highLowPlot.getDomainAxisMaxValueExpression()));

    // Handle the axis formating for the value axis
    configureAxis(xyPlot.getRangeAxis(), highLowPlot.getValueAxisLabelFont(),
        highLowPlot.getValueAxisLabelColor(), highLowPlot.getValueAxisTickLabelFont(),
        highLowPlot.getValueAxisTickLabelColor(), highLowPlot.getValueAxisTickLabelMask(), highLowPlot.getValueAxisVerticalTickLabels(),
        highLowPlot.getValueAxisLineColor(), true,
        (Comparable)evaluateExpression(highLowPlot.getRangeAxisMinValueExpression()),
        (Comparable)evaluateExpression(highLowPlot.getRangeAxisMaxValueExpression()));
View Full Code Here

        false
        );

    configureChart(jfreeChart);

    XYPlot xyPlot = (XYPlot)jfreeChart.getPlot();
    //plot.setNoDataMessage("No data to display");
//    ((XYPlot)plot.getDomainAxis()).setTickMarksVisible(
//      ((JRFillBarPlot)getPlot()).isShowTickMarks()
//      );
//    ((CategoryAxis)plot.getDomainAxis()).setTickLabelsVisible(
//        ((JRFillBarPlot)getPlot()).isShowTickLabels()
//        );
//    ((NumberAxis)plot.getRangeAxis()).setTickMarksVisible(
//        ((JRFillBarPlot)getPlot()).isShowTickMarks()
//        );
//    ((NumberAxis)plot.getRangeAxis()).setTickLabelsVisible(
//        ((JRFillBarPlot)getPlot()).isShowTickLabels()
//        );


    XYBarRenderer itemRenderer = (XYBarRenderer)xyPlot.getRenderer();
    itemRenderer.setBaseItemLabelGenerator((XYItemLabelGenerator)getLabelGenerator() );
    itemRenderer.setShadowVisible(false);
   

    JRBarPlot barPlot = (JRBarPlot)getPlot();
    boolean isShowLabels = barPlot.getShowLabels() == null ? false : barPlot.getShowLabels().booleanValue();
   
    itemRenderer.setBaseItemLabelsVisible( isShowLabels );

    // Handle the axis formating for the category axis
    configureAxis(xyPlot.getDomainAxis(), barPlot.getCategoryAxisLabelFont(),
        barPlot.getCategoryAxisLabelColor(), barPlot.getCategoryAxisTickLabelFont(),
        barPlot.getCategoryAxisTickLabelColor(), barPlot.getCategoryAxisTickLabelMask(), barPlot.getCategoryAxisVerticalTickLabels(),
        barPlot.getCategoryAxisLineColor(), false,
        (Comparable)evaluateExpression(barPlot.getDomainAxisMinValueExpression()),
        (Comparable)evaluateExpression(barPlot.getDomainAxisMaxValueExpression()));

    // Handle the axis formating for the value axis
    configureAxis(xyPlot.getRangeAxis(), barPlot.getValueAxisLabelFont(),
        barPlot.getValueAxisLabelColor(), barPlot.getValueAxisTickLabelFont(),
        barPlot.getValueAxisTickLabelColor(), barPlot.getValueAxisTickLabelMask(), barPlot.getValueAxisVerticalTickLabels(),
        barPlot.getValueAxisLineColor(), true,
        (Comparable)evaluateExpression(barPlot.getRangeAxisMinValueExpression()),
        (Comparable)evaluateExpression(barPlot.getRangeAxisMaxValueExpression()));
View Full Code Here

        true,
        false );

    configureChart(jfreeChart);

    XYPlot xyPlot = (XYPlot)jfreeChart.getPlot();
    JRTimeSeriesPlot timeSeriesPlot = (JRTimeSeriesPlot)getPlot();

    XYLineAndShapeRenderer lineRenderer = (XYLineAndShapeRenderer)xyPlot.getRenderer();
   
    boolean isShowShapes = timeSeriesPlot.getShowShapes() == null ? true : timeSeriesPlot.getShowShapes().booleanValue();
    boolean isShowLines = timeSeriesPlot.getShowLines() == null ? true : timeSeriesPlot.getShowLines().booleanValue();
    lineRenderer.setBaseLinesVisible(isShowLines);
    lineRenderer.setBaseShapesVisible(isShowShapes);

    // Handle the axis formating for the category axis
    configureAxis(xyPlot.getDomainAxis(), timeSeriesPlot.getTimeAxisLabelFont(),
        timeSeriesPlot.getTimeAxisLabelColor(), timeSeriesPlot.getTimeAxisTickLabelFont(),
        timeSeriesPlot.getTimeAxisTickLabelColor(), timeSeriesPlot.getTimeAxisTickLabelMask(), timeSeriesPlot.getTimeAxisVerticalTickLabels(),
        timeSeriesPlot.getTimeAxisLineColor(), false,
        (Comparable)evaluateExpression(timeSeriesPlot.getDomainAxisMinValueExpression()),
        (Comparable)evaluateExpression(timeSeriesPlot.getDomainAxisMaxValueExpression()));

    // Handle the axis formating for the value axis
    configureAxis(xyPlot.getRangeAxis(), timeSeriesPlot.getValueAxisLabelFont(),
        timeSeriesPlot.getValueAxisLabelColor(), timeSeriesPlot.getValueAxisTickLabelFont(),
        timeSeriesPlot.getValueAxisTickLabelColor(), timeSeriesPlot.getValueAxisTickLabelMask(), timeSeriesPlot.getValueAxisVerticalTickLabels(),
        timeSeriesPlot.getValueAxisLineColor(), true,
        (Comparable)evaluateExpression(timeSeriesPlot.getRangeAxisMinValueExpression()),
        (Comparable)evaluateExpression(timeSeriesPlot.getRangeAxisMaxValueExpression()));
View Full Code Here

      categoryPlot.setDomainGridlinesVisible(false);
      categoryPlot.getDomainAxis().setCategoryLabelPositions(CategoryLabelPositions.UP_45);
    }
    else if(plot instanceof XYPlot)
    {
      XYPlot xyPlot = (XYPlot)plot;
      XYItemRenderer xyItemRenderer = xyPlot.getRenderer();
      XYDataset xyDataset = xyPlot.getDataset();
      if(xyDataset != null)
      {
        for(int i = 0; i < xyDataset.getSeriesCount(); i++)
        {
          xyItemRenderer.setSeriesOutlinePaint(i, ChartThemesConstants.TRANSPARENT_PAINT);
        }
      }
      xyPlot.setRangeGridlinePaint(ChartThemesConstants.GRAY_PAINT_217);
      xyPlot.setRangeGridlineStroke(new BasicStroke(0.5f));
      xyPlot.setDomainGridlinesVisible(false);
      xyPlot.setRangeZeroBaselineVisible(true);
    }
  }
View Full Code Here

  }

  protected JFreeChart createScatterChart() throws JRException
  {
    JFreeChart jfreeChart = super.createScatterChart();
    XYPlot xyPlot = (XYPlot) jfreeChart.getPlot();
    xyPlot.setDomainGridlinesVisible(false);
    XYLineAndShapeRenderer plotRenderer = (XYLineAndShapeRenderer) ((XYPlot)jfreeChart.getPlot()).getRenderer();
    plotRenderer.setBaseShapesFilled(false);
    plotRenderer.setBaseStroke(new BasicStroke(1f));
    return jfreeChart;
  }
View Full Code Here

   */
  protected JFreeChart createBubbleChart() throws JRException
  {
    JFreeChart jfreeChart = super.createBubbleChart();

    XYPlot xyPlot = (XYPlot)jfreeChart.getPlot();
    XYBubbleRenderer bubbleRenderer = (XYBubbleRenderer)xyPlot.getRenderer();
    XYDataset xyDataset = xyPlot.getDataset();
    if(xyDataset != null)
    {
      for(int i = 0; i < xyDataset.getSeriesCount(); i++)
      {
        bubbleRenderer.setSeriesOutlinePaint(i, ChartThemesConstants.TRANSPARENT_PAINT);
View Full Code Here

   *
   */
  protected JFreeChart createCandlestickChart() throws JRException
  {
    JFreeChart jfreeChart = super.createCandlestickChart();
    XYPlot xyPlot = (XYPlot) jfreeChart.getPlot();
    CandlestickRenderer renderer = (CandlestickRenderer)xyPlot.getRenderer();
    DefaultHighLowDataset dataset = (DefaultHighLowDataset)xyPlot.getDataset();
    List seriesPaints = (List)getDefaultValue(defaultChartPropertiesMap, ChartThemesConstants.SERIES_COLORS);

    for(int i = 0; i < dataset.getSeriesCount(); i++)
    {
     
View Full Code Here

         true,
         false);

    configureChart(jfreeChart, getPlot());

    XYPlot xyPlot = (XYPlot)jfreeChart.getPlot();
    JRBubblePlot bubblePlot = (JRBubblePlot)getPlot();
    int scaleType = bubblePlot.getScaleTypeValue() == null ? ScaleTypeEnum.ON_RANGE_AXIS.getValue() : bubblePlot.getScaleTypeValue().getValue();
    XYBubbleRenderer bubbleRenderer = new XYBubbleRenderer( scaleType );
    xyPlot.setRenderer( bubbleRenderer );

    // Handle the axis formating for the category axis
    configureAxis(xyPlot.getDomainAxis(), bubblePlot.getXAxisLabelFont(),
        bubblePlot.getXAxisLabelColor(), bubblePlot.getXAxisTickLabelFont(),
        bubblePlot.getXAxisTickLabelColor(), bubblePlot.getXAxisTickLabelMask(), bubblePlot.getXAxisVerticalTickLabels(),
        bubblePlot.getOwnXAxisLineColor(), getDomainAxisSettings(),
        (Comparable)evaluateExpression(bubblePlot.getDomainAxisMinValueExpression()),
        (Comparable)evaluateExpression(bubblePlot.getDomainAxisMaxValueExpression())
        );

    // Handle the axis formating for the value axis
    configureAxis(xyPlot.getRangeAxis(), bubblePlot.getYAxisLabelFont(),
        bubblePlot.getYAxisLabelColor(), bubblePlot.getYAxisTickLabelFont(),
        bubblePlot.getYAxisTickLabelColor(), bubblePlot.getYAxisTickLabelMask(), bubblePlot.getYAxisVerticalTickLabels(),
        bubblePlot.getOwnYAxisLineColor(), getRangeAxisSettings(),
        (Comparable)evaluateExpression(bubblePlot.getRangeAxisMinValueExpression()),
        (Comparable)evaluateExpression(bubblePlot.getRangeAxisMaxValueExpression())
View Full Code Here

        isShowLegend()
        );

    configureChart(jfreeChart, getPlot());

    XYPlot xyPlot = (XYPlot) jfreeChart.getPlot();
    JRCandlestickPlot candlestickPlot = (JRCandlestickPlot)getPlot();
    CandlestickRenderer candlestickRenderer = (CandlestickRenderer) xyPlot.getRenderer();
    boolean isShowVolume = candlestickPlot.getShowVolume() == null ? true : candlestickPlot.getShowVolume().booleanValue();
    candlestickRenderer.setDrawVolume(isShowVolume);

    // Handle the axis formating for the category axis
    configureAxis(xyPlot.getDomainAxis(), candlestickPlot.getTimeAxisLabelFont(),
        candlestickPlot.getTimeAxisLabelColor(), candlestickPlot.getTimeAxisTickLabelFont(),
        candlestickPlot.getTimeAxisTickLabelColor(), candlestickPlot.getTimeAxisTickLabelMask(), candlestickPlot.getTimeAxisVerticalTickLabels(),
        candlestickPlot.getOwnTimeAxisLineColor(), getDomainAxisSettings(),
        (Comparable)evaluateExpression(candlestickPlot.getDomainAxisMinValueExpression()),
        (Comparable)evaluateExpression(candlestickPlot.getDomainAxisMaxValueExpression())
        );


    // Handle the axis formating for the value axis
    configureAxis(xyPlot.getRangeAxis(), candlestickPlot.getValueAxisLabelFont(),
        candlestickPlot.getValueAxisLabelColor(), candlestickPlot.getValueAxisTickLabelFont(),
        candlestickPlot.getValueAxisTickLabelColor(), candlestickPlot.getValueAxisTickLabelMask(), candlestickPlot.getValueAxisVerticalTickLabels(),
        candlestickPlot.getOwnValueAxisLineColor(), getRangeAxisSettings(),
        (Comparable)evaluateExpression(candlestickPlot.getRangeAxisMinValueExpression()),
        (Comparable)evaluateExpression(candlestickPlot.getRangeAxisMaxValueExpression())
View Full Code Here

TOP

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

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.