Class JfcPlotUtils

java.lang.Object
com.illumon.iris.db.plot.builders.jfreechart.JfcPlotUtils

public class JfcPlotUtils
extends Object
Plotting utilities for JFreeChart.
  • Constructor Details

  • Method Details

    • getItemPaint

      public static Paint getItemPaint​(CategoryDataSetCollection series, int row, int col, Paint defaultPaint)
      Gets the color of the specified data point. The defaultPaint is used if null.
      Parameters:
      series - data
      row - series index
      col - item index
      defaultPaint - default paint
      Returns:
      color of the data point
    • getItemPaint

      public static Paint getItemPaint​(DataSetCollection<? extends XYDataSeriesInternal> collection, int row, int col, Paint defaultPaint)
      Gets the color of the specified data point. The defaultPaint is used if null.
      Parameters:
      collection - data
      row - series index
      col - item index
      defaultPaint - default paint
      Returns:
      color of the data point
    • getItemPaint

      public static Paint getItemPaint​(XYDataSeriesInternal s, int col, Paint defaultPaint)
      Gets the color of the specified data point. The defaultPaint is used if null.
      Parameters:
      s - data series
      col - item index
      defaultPaint - default paint
      Returns:
      color of the data point
    • getItemShape

      public static Shape getItemShape​(DataSetCollection<? extends XYDataSeriesInternal> collection, int row, int col, Shape defaultShape)
      Gets the shape of the specified data point. The defaultShape is used if null.
      Parameters:
      collection - data
      row - series index
      col - item index
      defaultShape - default shape
      Returns:
      shape of the data point
    • getXYToolTipGenerator

      public static org.jfree.chart.labels.StandardXYToolTipGenerator getXYToolTipGenerator​(AxisFormat xAxisFormat, AxisFormat yAxisFormat, String pointLabelFormat, String xToolTipPattern, String yToolTipPattern)
      Gets a StandardXYToolTipGenerator suitable for the given inputs.

      If an AxisFormat is a NanosAxisFormat, the generator will use a NanosAxisFormat.NanosFormat for that axis. Otherwise, a DecimalFormat is used.

      Parameters:
      xAxisFormat - AxisFormat for the x-axis
      yAxisFormat - AxisFormat for the y-axis
      pointLabelFormat - point label format String
      xToolTipPattern - tooltip format String for x-values
      yToolTipPattern - tooltip format String for y-values
      Returns:
      StandardXYToolTipGenerator suitable for the given inputs.
    • getNumberFormat

      public static NumberFormat getNumberFormat​(AxisFormat axisFormat, String toolTipPattern)
    • getCategoryToolTipGenerator

      public static org.jfree.chart.labels.StandardCategoryToolTipGenerator getCategoryToolTipGenerator​(AxisFormat yAxisFormat, String pointLabelFormat, String yToolTipPattern)
    • isNormalizedRange

      public static boolean isNormalizedRange​(com.orsoncharts.Range range)
    • isNormalizedRange

      public static boolean isNormalizedRange​(org.jfree.data.Range range)
    • getStackedRangeBounds

      public static org.jfree.data.Range getStackedRangeBounds​(org.jfree.data.xy.TableXYDataset dataset)
      Computes stacked range for TableXYDataset by considering visible points only
      Parameters:
      dataset - Dataset for which the range needs to be computed
      Returns:
      stacked org.jfree.data.Range for the dataset
    • getStackedRangeBounds

      public static org.jfree.data.Range getStackedRangeBounds​(org.jfree.data.category.CategoryDataset dataset)
      Computes stacked range for CategoryDataset by considering visible points only
      Parameters:
      dataset - Dataset for which the range needs to be computed
      Returns:
      stacked org.jfree.data.Range for the dataset
    • getStackedRangeBounds

      public static org.jfree.data.Range getStackedRangeBounds​(org.jfree.data.category.CategoryDataset dataset, org.jfree.data.KeyToGroupMap map)
      Computes stacked range for CategoryDataset by considering visible points only
      Parameters:
      dataset - Dataset for which the range needs to be computed
      Returns:
      stacked org.jfree.data.Range for the dataset