Class JfcPlotUtils
java.lang.Object
com.illumon.iris.db.plot.builders.jfreechart.JfcPlotUtils
public class JfcPlotUtils extends Object
Plotting utilities for JFreeChart.
-
Constructor Summary
Constructors Constructor Description JfcPlotUtils()
-
Method Summary
Modifier and Type Method Description static org.jfree.chart.labels.StandardCategoryToolTipGenerator
getCategoryToolTipGenerator(AxisFormat yAxisFormat, String pointLabelFormat, String yToolTipPattern)
static Paint
getItemPaint(CategoryDataSetCollection series, int row, int col, Paint defaultPaint)
Gets the color of the specified data point.static Paint
getItemPaint(DataSetCollection<? extends XYDataSeriesInternal> collection, int row, int col, Paint defaultPaint)
Gets the color of the specified data point.static Paint
getItemPaint(XYDataSeriesInternal s, int col, Paint defaultPaint)
Gets the color of the specified data point.static Shape
getItemShape(DataSetCollection<? extends XYDataSeriesInternal> collection, int row, int col, Shape defaultShape)
Gets the shape of the specified data point.static NumberFormat
getNumberFormat(AxisFormat axisFormat, String toolTipPattern)
static org.jfree.data.Range
getStackedRangeBounds(org.jfree.data.category.CategoryDataset dataset)
Computes stacked range forCategoryDataset
by considering visible points onlystatic org.jfree.data.Range
getStackedRangeBounds(org.jfree.data.category.CategoryDataset dataset, org.jfree.data.KeyToGroupMap map)
Computes stacked range forCategoryDataset
by considering visible points onlystatic org.jfree.data.Range
getStackedRangeBounds(org.jfree.data.xy.TableXYDataset dataset)
Computes stacked range forTableXYDataset
by considering visible points onlystatic org.jfree.chart.labels.StandardXYToolTipGenerator
getXYToolTipGenerator(AxisFormat xAxisFormat, AxisFormat yAxisFormat, String pointLabelFormat, String xToolTipPattern, String yToolTipPattern)
Gets aStandardXYToolTipGenerator
suitable for the given inputs.static boolean
isNormalizedRange(com.orsoncharts.Range range)
static boolean
isNormalizedRange(org.jfree.data.Range range)
-
Constructor Details
-
JfcPlotUtils
public JfcPlotUtils()
-
-
Method Details
-
getItemPaint
public static Paint getItemPaint(CategoryDataSetCollection series, int row, int col, Paint defaultPaint)Gets the color of the specified data point. ThedefaultPaint
is used if null.- Parameters:
series
- datarow
- series indexcol
- item indexdefaultPaint
- 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. ThedefaultPaint
is used if null.- Parameters:
collection
- datarow
- series indexcol
- item indexdefaultPaint
- default paint- Returns:
- color of the data point
-
getItemPaint
Gets the color of the specified data point. ThedefaultPaint
is used if null.- Parameters:
s
- data seriescol
- item indexdefaultPaint
- 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. ThedefaultShape
is used if null.- Parameters:
collection
- datarow
- series indexcol
- item indexdefaultShape
- 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 aStandardXYToolTipGenerator
suitable for the given inputs.If an
AxisFormat
is aNanosAxisFormat
, the generator will use aNanosAxisFormat.NanosFormat
for that axis. Otherwise, aDecimalFormat
is used.- Parameters:
xAxisFormat
-AxisFormat
for the x-axisyAxisFormat
-AxisFormat
for the y-axispointLabelFormat
- point label format StringxToolTipPattern
- tooltip format String for x-valuesyToolTipPattern
- tooltip format String for y-values- Returns:
StandardXYToolTipGenerator
suitable for the given inputs.
-
getNumberFormat
-
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 forTableXYDataset
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 forCategoryDataset
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 forCategoryDataset
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
-