Class WAbstractChartModel
- Direct Known Subclasses:
WStandardChartProxyModel
This abstract model is used by WAbstractChart
as data model.
-
Nested Class Summary
Nested classes/interfaces inherited from class eu.webtoolkit.jwt.WObject
WObject.FormData
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionchanged()
A signal that notifies of any change to the model.flags
(int row, int column) Returns the item flags for the given row and column.getBarBrushColor
(int row, int column) Returns the bar brush color to use for a given row and column.getBarPenColor
(int row, int column) Returns the bar pen color to use for a given row and column.abstract int
Returns the number of columns.abstract double
getData
(int row, int column) Returns data at a given row and column.getDisplayData
(int row, int column) Returns display data at a given row and column.getHeaderData
(int column) Returns the given column's header data.getMarkerBrushColor
(int row, int column) Returns the marker brush color to use for a given row and column.getMarkerPenColor
(int row, int column) Returns the marker pen color to use for a given row and column.getMarkerScaleFactor
(int row, int column) Returns the marker scale factor to use for a given row and column.abstract int
Returns the number of rows.getToolTip
(int row, int column) Returns the tooltip text to use on a given row and column.link
(int row, int column) Returns the link for a given row and column.markerType
(int row, int column) Returns the marker type to use for a given row and column.Methods inherited from class eu.webtoolkit.jwt.WObject
getId, getObjectName, remove, setFormData, setObjectName, tr
-
Constructor Details
-
WAbstractChartModel
public WAbstractChartModel()Creates a new chart model.
-
-
Method Details
-
getData
public abstract double getData(int row, int column) Returns data at a given row and column.This value determines the position of a data point on the chart.
-
getDisplayData
-
getHeaderData
Returns the given column's header data.This is used as the name in the legend for a data series.
Defaults to an empty string.
-
getToolTip
Returns the tooltip text to use on a given row and column.Defaults to an empty string, signifying that no tooltip should be shown.
-
flags
Returns the item flags for the given row and column.Only the ItemIsXHTMLText and ItemHasDeferredTooltip flags are supported for charts.
ItemIsXHTMLText determines whether the tooltip text should be rendered as XHTML or as plain text, and ItemHasDeferredTooltip makes it so that tooltips are only loaded on demand.
Note: An XHTML text tooltip will be forced to be deferred. Non-deferred XHTML tooltips are not supported.
Note: When not using deferred tooltips, the HTML <area> tag will be used. If there are many tooltips and the chart is interactive this may cause client-side performance issues. If deferred tooltips are used, this will cause some load on the server, as it calculates server-side what marker or bar the user is hovering over.
Note: If the chart is interactive, and tooltips are not deferred, they will be scaled according to the first Y axis, and thus multiple Y axes will not be supported in combination with plain tooltips.
-
link
Returns the link for a given row and column.Defaults to an empty link, signifying that no link should be shown.
-
getMarkerPenColor
Returns the marker pen color to use for a given row and column.This is used as the color of the outline of markers when drawing a
SeriesType.Point
. The default is null, indicating that the default color, as determined byWDataSeries.getMarkerPen()
, should be used.- See Also:
-
getMarkerBrushColor
Returns the marker brush color to use for a given row and column.This is used as the color of the brush used when drawing a
SeriesType.Point
. The default is null, indicating that the default color, as determined byWDataSeries.getMarkerBrush()
, should be used.- See Also:
-
markerType
Returns the marker type to use for a given row and column.This is used as the shape of the marker used when drawing a PointSeries. The default is null, indicating that the default marker, as determined by
WDataSeries.getMarker()
, should be used.- See Also:
-
getBarPenColor
Returns the bar pen color to use for a given row and column.This is used as the color of the outline of bars when drawing a
SeriesType.Bar
. The default is null, indicating that the default color, as determined byWDataSeries.getPen()
, should be used.- See Also:
-
getBarBrushColor
Returns the bar brush color to use for a given row and column.This is used as the color of the brush used when drawing a
SeriesType.Bar
. The default is null, indicating that the default color, as determined byWDataSeries.getBrush()
, should be used.- See Also:
-
getMarkerScaleFactor
Returns the marker scale factor to use for a given row and column.This is used to scale the size of the marker when drawing a
SeriesType.Point
. The default is null, indicating that the default scale should be used. -
getColumnCount
public abstract int getColumnCount()Returns the number of columns.- See Also:
-
getRowCount
public abstract int getRowCount()Returns the number of rows.- See Also:
-
changed
A signal that notifies of any change to the model.Implementations should trigger this signal in order to update the chart.
-