Package com.illumon.iris.db.plot
Class ChartImpl
java.lang.Object
com.illumon.iris.db.plot.ChartImpl
- All Implemented Interfaces:
Chart
,PlotExceptionCause
,Serializable
public class ChartImpl extends Object implements Chart, PlotExceptionCause
Represents a graph. Contains
Axes
objects.- See Also:
- Serialized Form
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ChartImpl.PlotOrientation
Possible plot orientations. -
Method Summary
Modifier and Type Method Description Axes
axes(int id)
Gets an axes.Axes
axes(String name)
Gets an axes.ChartImpl
chartRemoveSeries(String... names)
Removes the series with the specifiednames
from this Chart.ChartImpl
chartTitle(String title)
Sets the title of this Chart.ChartImpl
chartTitle(String titleFormat, SelectableDataSet sds, String... titleColumns)
Sets the title of this Chart.ChartImpl
chartTitle(String titleFormat, Table t, String... titleColumns)
Sets the title of this Chart.ChartImpl
chartTitleColor(Paint color)
Sets the color of this Chart's title.ChartImpl
chartTitleColor(String color)
Sets the color of this Chart's title.ChartImpl
chartTitleFont(Font font)
Sets the font of this Chart's title.ChartImpl
chartTitleFont(String family, String style, int size)
Sets the font of this Chart's title.int
colSpan()
Gets the width of this Chart inside theBaseFigure
ChartImpl
colSpan(int n)
Sets the size of this Chart within the grid of the figure.int
column()
int
dimension()
BaseFigureImpl
figure()
Gets theBaseFigure
this Chart is in.void
freezeSnapshots()
List<AxesImpl>
getAxes()
Gets theAxesImpl
s in this Chart.List<AxisImpl>[]
getAxis()
Gets theAxisImpl
s in this Chart.ChartTitle
getChartTitle()
Gets the ChartTitle instanceChartType
getChartType()
Gets theChartType
of this Chart.Paint
getLegendColor()
Gets thePaint
of this Chart's legend.Font
getLegendFont()
Gets theFont
of this Chart's legend.PlotInfo
getPlotInfo()
ChartImpl.PlotOrientation
getPlotOrientation()
Gets theChartImpl.PlotOrientation
of this Chart.String
getTitle()
Gets the title of this Chart.Paint
getTitleColor()
Gets thePaint
of this Chart's title.Font
getTitleFont()
Gets theFont
of this Chart's title.Chart
gridLinesVisible(boolean visible)
Sets whether the Chart has grid lines.InitializationGate
initializationGate()
Boolean
isDisplayXGridLines()
Whether the grid lines in the x direction will be drawn.Boolean
isDisplayYGridLines()
Whether the grid lines in the y direction will be drawn.boolean
isShowLegend()
Whether this Chart's legend will be drawn.ChartImpl
legendColor(Paint color)
Sets the color of the text inside the Chart's legend.ChartImpl
legendColor(String color)
Sets the color of the text inside the Chart's legend.ChartImpl
legendFont(Font font)
Sets the font of this Chart's legend.ChartImpl
legendFont(String family, String style, int size)
Sets the font of this Chart's legend.ChartImpl
legendVisible(boolean visible)
Sets whether the Chart's legend is shown or hidden.Chart
maxRowsInTitle(int maxRowsCount)
Sets the maximum row values that will be shown in title.AxesImpl
newAxes()
Creates newAxes
on this Chart.AxesImpl
newAxes(int dim)
Creates newAxes
on this Chart.AxesImpl
newAxes(String name)
Creates newAxes
on this Chart.AxesImpl
newAxes(String name, int dim)
Creates newAxes
on this Chart.void
onClose()
Tear down once figure is closed.void
onInflate()
Set up after serialization.ChartImpl
plotOrientation(ChartImpl.PlotOrientation orientation)
ChartImpl
plotOrientation(String orientation)
Sets the orientation of plots in this Chart.int
row()
int
rowSpan()
Gets the height of this Chart inside theBaseFigure
ChartImpl
rowSpan(int n)
Sets the size of this Chart within the grid of the figure.void
setupInitializationGate()
ChartImpl
span(int rowSpan, int colSpan)
Sets the size of this Chart within the grid of the figure.void
startDraw()
void
stopDraw()
void
thawSnapshots()
Theme
theme()
Gets theTheme
of theBaseFigure
containing this Chart.Chart
xGridLinesVisible(boolean visible)
Sets whether the Chart has grid lines in the x direction.Chart
yGridLinesVisible(boolean visible)
Sets whether the Chart has grid lines in the y directionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.illumon.iris.db.plot.Chart
chartTitle, chartTitle, chartTitle, chartTitle
-
Method Details
-
figure
Gets theBaseFigure
this Chart is in.- Returns:
- the
BaseFigure
containing this Chart
-
theme
Gets theTheme
of theBaseFigure
containing this Chart.- Returns:
BaseFigure
containing this Chart'sTheme
-
colSpan
public int colSpan()Gets the width of this Chart inside theBaseFigure
- Returns:
- width of this Chart inside the
BaseFigure
-
rowSpan
public int rowSpan()Gets the height of this Chart inside theBaseFigure
- Returns:
- height of this Chart inside the
BaseFigure
-
column
public int column() -
row
public int row() -
dimension
public int dimension() -
getAxis
Gets theAxisImpl
s in this Chart.- Returns:
AxisImpl
in this Chart
-
getAxes
Gets theAxesImpl
s in this Chart.- Returns:
AxesImpl
s in this Chart
-
getChartType
Gets theChartType
of this Chart.- Returns:
ChartType
of this Chart
-
getTitle
Gets the title of this Chart.- Returns:
- this Chart's title
-
getTitleFont
Gets theFont
of this Chart's title.- Returns:
- this Chart's title's
Font
-
getTitleColor
Gets thePaint
of this Chart's title.- Returns:
- this Chart's title's
Paint
-
getLegendFont
Gets theFont
of this Chart's legend.- Returns:
- this Chart's legend's
Font
-
getLegendColor
Gets thePaint
of this Chart's legend.- Returns:
- this Chart's legend's
Paint
-
isDisplayXGridLines
Whether the grid lines in the x direction will be drawn.- Returns:
- true if this Chart's x grid lines will be drawn, else false
-
isDisplayYGridLines
Whether the grid lines in the y direction will be drawn.- Returns:
- true if this Chart's y grid lines will be drawn, else false
-
isShowLegend
public boolean isShowLegend()Whether this Chart's legend will be drawn.- Returns:
- true if this Chart's legend will be drawn, false otherwise
-
getPlotOrientation
Gets theChartImpl.PlotOrientation
of this Chart.- Returns:
ChartImpl.PlotOrientation
of this Chart.
-
onInflate
public void onInflate()Set up after serialization. -
onClose
public void onClose()Tear down once figure is closed. -
getPlotInfo
- Specified by:
getPlotInfo
in interfacePlotExceptionCause
-
startDraw
public void startDraw() -
stopDraw
public void stopDraw() -
freezeSnapshots
public void freezeSnapshots() -
thawSnapshots
public void thawSnapshots() -
setupInitializationGate
public void setupInitializationGate() -
initializationGate
-
getChartTitle
Gets the ChartTitle instance- Returns:
- ChartTitle instance
-
chartRemoveSeries
Description copied from interface:Chart
Removes the series with the specifiednames
from this Chart.- Specified by:
chartRemoveSeries
in interfaceChart
- Parameters:
names
- series names- Returns:
- this Chart
-
chartTitle
Description copied from interface:Chart
Sets the title of this Chart.- Specified by:
chartTitle
in interfaceChart
- Parameters:
title
- title- Returns:
- this
Chart
-
chartTitle
Description copied from interface:Chart
Sets the title of this Chart.- Specified by:
chartTitle
in interfaceChart
- Parameters:
titleFormat
- aMessageFormat
format string for the chart titlet
- tabletitleColumns
- columns to include in the chart title- Returns:
- this
Chart
with the title set to display values from the table
-
chartTitle
Description copied from interface:Chart
Sets the title of this Chart.- Specified by:
chartTitle
in interfaceChart
- Parameters:
titleFormat
- aMessageFormat
format string for the chart titlesds
- selectable data set (e.g. OneClick table)titleColumns
- columns to include in the chart title- Returns:
- this
Chart
with the title set to display values from the table
-
maxRowsInTitle
Description copied from interface:Chart
Sets the maximum row values that will be shown in title.If total rows <
maxRowsCount
, then all the values will be shown separated by comma, otherwise justmaxRowsCount
values will be shown along with ellipsis.if
maxRowsCount
is < 0, all values will be shown.if
maxRowsCount
is 0, then just first value will be shown without ellipsis.The default is 0.
- Specified by:
maxRowsInTitle
in interfaceChart
- Parameters:
maxRowsCount
- maximum number of row values to show in chart title- Returns:
- this Chart
-
chartTitleFont
Description copied from interface:Chart
Sets the font of this Chart's title.- Specified by:
chartTitleFont
in interfaceChart
- Parameters:
font
- font- Returns:
- this Chart
-
chartTitleFont
Description copied from interface:Chart
Sets the font of this Chart's title.- Specified by:
chartTitleFont
in interfaceChart
- Parameters:
family
- font family; if null, set to Arialstyle
- font style; if null, set toFont.FontStyle
PLAINsize
- the point size of the Font- Returns:
- this Chart
-
chartTitleColor
Description copied from interface:Chart
Sets the color of this Chart's title.- Specified by:
chartTitleColor
in interfaceChart
- Parameters:
color
- color- Returns:
- this Chart
-
chartTitleColor
Description copied from interface:Chart
Sets the color of this Chart's title.- Specified by:
chartTitleColor
in interfaceChart
- Parameters:
color
- color- Returns:
- this Chart
-
gridLinesVisible
Description copied from interface:Chart
Sets whether the Chart has grid lines.- Specified by:
gridLinesVisible
in interfaceChart
- Parameters:
visible
- whether the Chart's grid lines are drawn- Returns:
- this Chart
-
xGridLinesVisible
Description copied from interface:Chart
Sets whether the Chart has grid lines in the x direction.- Specified by:
xGridLinesVisible
in interfaceChart
- Parameters:
visible
- whether the Chart's x grid lines are drawn- Returns:
- this Chart
-
yGridLinesVisible
Description copied from interface:Chart
Sets whether the Chart has grid lines in the y direction- Specified by:
yGridLinesVisible
in interfaceChart
- Parameters:
visible
- whether the Chart's y grid lines are drawn- Returns:
- this Chart
-
legendVisible
Description copied from interface:Chart
Sets whether the Chart's legend is shown or hidden.- Specified by:
legendVisible
in interfaceChart
- Parameters:
visible
- whether the Chart's legend is shown or hidden- Returns:
- this Chart
-
legendFont
Description copied from interface:Chart
Sets the font of this Chart's legend.- Specified by:
legendFont
in interfaceChart
- Parameters:
font
- font- Returns:
- this Chart
-
legendFont
Description copied from interface:Chart
Sets the font of this Chart's legend.- Specified by:
legendFont
in interfaceChart
- Parameters:
family
- font family; if null, set to Arialstyle
- font style; if null, set toFont.FontStyle
PLAINsize
- the point size of the Font- Returns:
- this Chart
-
legendColor
Description copied from interface:Chart
Sets the color of the text inside the Chart's legend.- Specified by:
legendColor
in interfaceChart
- Parameters:
color
- color- Returns:
- this Chart
-
legendColor
Description copied from interface:Chart
Sets the color of the text inside the Chart's legend.- Specified by:
legendColor
in interfaceChart
- Parameters:
color
- color- Returns:
- this Chart
-
span
Description copied from interface:Chart
Sets the size of this Chart within the grid of the figure. -
colSpan
Description copied from interface:Chart
Sets the size of this Chart within the grid of the figure. -
rowSpan
Description copied from interface:Chart
Sets the size of this Chart within the grid of the figure. -
newAxes
Description copied from interface:Chart
Creates newAxes
on this Chart. -
newAxes
Description copied from interface:Chart
Creates newAxes
on this Chart. -
newAxes
Description copied from interface:Chart
Creates newAxes
on this Chart. -
newAxes
Description copied from interface:Chart
Creates newAxes
on this Chart. -
axes
Description copied from interface:Chart
Gets an axes. -
axes
Description copied from interface:Chart
Gets an axes. -
plotOrientation
-
plotOrientation
Description copied from interface:Chart
Sets the orientation of plots in this Chart.- Specified by:
plotOrientation
in interfaceChart
- Parameters:
orientation
- plot orientation- Returns:
- this Chart
-