eu.webtoolkit.jwt.chart
Class WCartesianChart

java.lang.Object
  extended by eu.webtoolkit.jwt.WObject
      extended by eu.webtoolkit.jwt.WWidget
          extended by eu.webtoolkit.jwt.WWebWidget
              extended by eu.webtoolkit.jwt.WInteractWidget
                  extended by eu.webtoolkit.jwt.WPaintedWidget
                      extended by eu.webtoolkit.jwt.chart.WAbstractChart
                          extended by eu.webtoolkit.jwt.chart.WCartesianChart

public class WCartesianChart
extends WAbstractChart

A cartesian chart.

A cartesian chart is a chart that uses X and Y axes. It can display one or multiple data series, which each may be rendered using bars, lines, areas, or points.

To use a cartesian chart, the minimum you need to do is set a model using WAbstractChart#setModel(), set the model column that holds the X data using setXSeriesColumn(), and add one or more series using addSeries(). Each series corresponds to one data column that holds Y data.

A cartesian chart is either a CategoryChart or a ScatterPlot.

In a CategoryChart, the X series represent different categories, which are listed consecutively in model row order. The X axis scale is set to CategoryScale.

A category chart with bar series

A category chart with bar series

Each series may be rendered differently, and this is configured in the data series (see WDataSeries for more information).

In a ScatterPlot, the X series data are interpreted as numbers on a numerical scale. The scale for the X axis defaults to a LinearScale, but this may be changed to a DateScale when the X series contains dates (of type WDate) to create a time series chart, or to a LogScale. A ScatterPlot supports the same types of data series as a CategoryChart, but does not support stacking. In a scatter plot, the X series do not need to be ordered in increasing values, and may be set differently for each dataseries using WDataSeries#setXSeriesColumn().

A time series scatter plot with line series

A time series scatter plot with line series

Missing data in a model series Y values is interpreted as a break. For curve-like series, this breaks the curve (or line).

The cartesian chart has support for dual Y axes. Each data series may be bound to one of the two Y axes. By default, only the first Y axis is displayed. To show the second Y axis you will need to call:

By default a chart has a horizontal X axis and a vertical Y axis, which corresponds to a Vertical orientation. The orientation may be changed to Horizontal using setOrientation().

The styling of the series data are dictated by a palette which may be set using WAbstractChart#setPalette(), but may be overridden by settings in each data series.

CSS

Styling through CSS is not applicable.

See Also:
WDataSeries, WAxis, WPieChart

Nested Class Summary
 
Nested classes/interfaces inherited from class eu.webtoolkit.jwt.WPaintedWidget
WPaintedWidget.Method
 
Constructor Summary
WCartesianChart()
          Creates a new cartesian chart.
WCartesianChart(ChartType type)
          Creates a new cartesian chart.
WCartesianChart(ChartType type, WContainerWidget parent)
          Creates a new cartesian chart.
WCartesianChart(WContainerWidget parent)
          Creates a new cartesian chart.
 
Method Summary
 void addDataPointArea(WDataSeries series, WModelIndex xIndex, WAbstractArea area)
          Adds a data point area (used for displaying e.g.
 void addSeries(WDataSeries series)
          Adds a data series.
 WWidget createLegendItemWidget(int index)
          Creates a widget which renders the a legend item.
protected  WChart2DRenderer createRenderer(WPainter painter, WRectF rectangle)
          Creates a renderer which renders the chart.
 void drawMarker(WDataSeries series, WPainterPath result)
          Draws the marker for a given data series.
 WAxis getAxis(Axis axis)
          Returns a chart axis.
 double getBarMargin()
          Returns the margin between bars of different series.
 AlignmentFlag getLegendAlignment()
          Returns the legend alignment.
 WBrush getLegendBackground()
          Returns the legend background brush.
 WPen getLegendBorder()
          Returns the legend border pen.
 int getLegendColumns()
          Returns the legend columns.
 WLength getLegendColumnWidth()
          Returns the legend column width.
 WFont getLegendFont()
          Returns the legend font.
 LegendLocation getLegendLocation()
          Returns the legend location.
 Side getLegendSide()
          Returns the legend side.
 Orientation getOrientation()
          Returns the chart orientation.
 java.util.List<WDataSeries> getSeries()
          Returns a list with the current data series.
 WDataSeries getSeries(int modelColumn)
          Returns a data series corresponding to a data column.
 ChartType getType()
          Returns the chart type.
 void initLayout()
          Initializes the chart layout.
 void initLayout(WRectF rectangle)
          Initializes the chart layout.
 boolean isLegendEnabled()
          Returns whether the legend is enabled.
 WPointF mapFromDevice(WPointF point)
          Maps from device coordinates to model coordinates.
 WPointF mapFromDevice(WPointF point, Axis ordinateAxis)
          Maps from device coordinates to model coordinates.
 WPointF mapToDevice(java.lang.Object xValue, java.lang.Object yValue)
          Maps model values onto chart coordinates.
 WPointF mapToDevice(java.lang.Object xValue, java.lang.Object yValue, Axis ordinateAxis)
          Maps model values onto chart coordinates.
 WPointF mapToDevice(java.lang.Object xValue, java.lang.Object yValue, Axis ordinateAxis, int xSegment)
          Maps model values onto chart coordinates.
 WPointF mapToDevice(java.lang.Object xValue, java.lang.Object yValue, Axis ordinateAxis, int xSegment, int ySegment)
          Maps model values onto chart coordinates.
protected  void modelChanged()
          Method called whenever the entire model was changed.
protected  void modelColumnsInserted(WModelIndex parent, int start, int end)
          Method called when colums have been inserted in the model.
protected  void modelColumnsRemoved(WModelIndex parent, int start, int end)
          Method called when colums have been removed from the model.
protected  void modelDataChanged(WModelIndex topLeft, WModelIndex bottomRight)
          Method called when data has been changed in the model.
protected  void modelReset()
          Method called whenever the entire model was reset.
protected  void modelRowsInserted(WModelIndex parent, int start, int end)
          Method called when rows have been inserted from the model.
protected  void modelRowsRemoved(WModelIndex parent, int start, int end)
          Method called when rows have been removed from the model.
 void paint(WPainter painter, WRectF rectangle)
          Paint the chart in a rectangle of the given painter.
protected  void paintEvent(WPaintDevice paintDevice)
          Paints the widget.
 void removeSeries(int modelColumn)
          Removes a data series.
 void renderLegendIcon(WPainter painter, WPointF pos, WDataSeries series)
          Renders the legend icon for a given data series.
 void renderLegendItem(WPainter painter, WPointF pos, WDataSeries series)
          Renders the legend item for a given data series.
 void setBarMargin(double margin)
          Sets the margin between bars of different series.
 void setLegendColumns(int columns, WLength columnWidth)
          Configures multiple legend columns.
 void setLegendEnabled(boolean enabled)
          Enables the legend.
 void setLegendLocation(LegendLocation location, Side side, AlignmentFlag alignment)
          Configures the legend location.
 void setLegendStyle(WFont font, WPen border, WBrush background)
          Configures the legend decoration.
 void setOrientation(Orientation orientation)
          Sets the chart orientation.
 void setSeries(java.util.List<WDataSeries> series)
          Sets all data series.
 void setType(ChartType type)
          Sets the chart type.
 void setXSeriesColumn(int modelColumn)
          Sets the the model column for the X series.
 int XSeriesColumn()
          Returns the model column for the X series.
 
Methods inherited from class eu.webtoolkit.jwt.chart.WAbstractChart
getBackground, getModel, getPalette, getPlotAreaPadding, getTitle, getTitleFont, paint, remove, setBackground, setModel, setPalette, setPlotAreaPadding, setPlotAreaPadding, setPlotAreaPadding, setTitle, setTitleFont
 
Methods inherited from class eu.webtoolkit.jwt.WPaintedWidget
addArea, enableAjax, getArea, getAreas, getMethod, getPreferredMethod, insertArea, layoutSizeChanged, removeArea, resize, setPreferredMethod, update, update, update
 
Methods inherited from class eu.webtoolkit.jwt.WInteractWidget
clicked, doubleClicked, enterPressed, escapePressed, gestureChanged, gestureEnded, gestureStarted, isEnabled, keyPressed, keyWentDown, keyWentUp, load, mouseDragged, mouseMoved, mouseWentDown, mouseWentOut, mouseWentOver, mouseWentUp, mouseWheel, propagateSetEnabled, setDraggable, setDraggable, setDraggable, setDraggable, touchEnded, touchMoved, touchStarted
 
Methods inherited from class eu.webtoolkit.jwt.WWebWidget
addStyleClass, callJavaScriptMember, childrenChanged, doJavaScript, domCanBeSaved, escapeText, escapeText, escapeText, escapeText, find, getAttributeValue, getChildren, getClearSides, getDecorationStyle, getFloatSide, getHeight, getId, getJavaScriptMember, getLineHeight, getMargin, getMaximumHeight, getMaximumWidth, getMinimumHeight, getMinimumWidth, getOffset, getPositionScheme, getStyleClass, getTabIndex, getToolTip, getVerticalAlignment, getVerticalAlignmentLength, getWidth, isDisabled, isHidden, isHiddenKeepsGeometry, isInline, isLoaded, isPopup, isRendered, isVisible, jsStringLiteral, jsStringLiteral, refresh, removeScript, removeStyleClass, render, setAttributeValue, setClearSides, setDecorationStyle, setDisabled, setFloatSide, setHidden, setHiddenKeepsGeometry, setId, setInline, setJavaScriptMember, setLineHeight, setLoadLaterWhenInvisible, setMargin, setMaximumSize, setMinimumSize, setOffsets, setPopup, setPositionScheme, setSelectable, setStyleClass, setTabIndex, setToolTip, setVerticalAlignment, updateSignalConnection
 
Methods inherited from class eu.webtoolkit.jwt.WWidget
acceptDrops, acceptDrops, addCssRule, addCssRule, addStyleClass, animateHide, animateShow, boxBorder, boxPadding, containsExposed, disable, dropEvent, enable, getDrop, getJsRef, getParent, hide, htmlText, isLayoutSizeAware, positionAt, positionAt, removeStyleClass, resize, setClearSides, setHeight, setHidden, setLayoutSizeAware, setMargin, setMargin, setMargin, setMargin, setMargin, setOffsets, setOffsets, setOffsets, setOffsets, setOffsets, setToolTip, setVerticalAlignment, setWidth, show, stopAcceptDrops, toggleStyleClass, toggleStyleClass, tr
 
Methods inherited from class eu.webtoolkit.jwt.WObject
addChild, getObjectName, setObjectName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WCartesianChart

public WCartesianChart(WContainerWidget parent)
Creates a new cartesian chart.

Creates a cartesian chart of type CategoryChart.


WCartesianChart

public WCartesianChart()
Creates a new cartesian chart.

Calls this((WContainerWidget)null)


WCartesianChart

public WCartesianChart(ChartType type,
                       WContainerWidget parent)
Creates a new cartesian chart.

Creates a cartesian chart of the indicated type.


WCartesianChart

public WCartesianChart(ChartType type)
Creates a new cartesian chart.

Calls this(type, (WContainerWidget)null)

Method Detail

setType

public void setType(ChartType type)
Sets the chart type.

The chart type determines how (x,y) data are interpreted. In a CategoryChart, the X values are categories, and these are plotted consecutively, evenly spaced, and in row order. In a ScatterPlot, the X values are interpreted numerically (as for Y values).

The default chart type is a CategoryChart.

See Also:
getType(), WAxis.setScale(AxisScale scale), getAxis(Axis axis)

getType

public ChartType getType()
Returns the chart type.

See Also:
setType(ChartType type)

setOrientation

public void setOrientation(Orientation orientation)
Sets the chart orientation.

Sets the chart orientation, which corresponds to the orientation of the Y axis: a Orientation.Vertical orientation corresponds to the conventional way of a horizontal X axis and vertical Y axis. A Orientation.Horizontal orientation is the other way around.

The default orientation is Orientation.Vertical.

See Also:
getOrientation()

getOrientation

public Orientation getOrientation()
Returns the chart orientation.

See Also:
setOrientation(Orientation orientation)

setXSeriesColumn

public void setXSeriesColumn(int modelColumn)
Sets the the model column for the X series.

Use this method to specify the data for the X series. For a ScatterPlot this is mandatory, while for a CategoryChart, if not specified, an increasing series of integer numbers will be used (1, 2, ...).

Scatterplot dataseries may each individually be given its own X series data using WDataSeries#setXSeriesColumn()

The default value is -1 (not specified).

The series column is reset to -1 when the model is set (or changed). Thus you need to set a model before configuring the series.

See Also:
XSeriesColumn()

XSeriesColumn

public int XSeriesColumn()
Returns the model column for the X series.

See Also:
setXSeriesColumn(int modelColumn)

addSeries

public void addSeries(WDataSeries series)
Adds a data series.

A single chart may display one or more data series. Each data series displays data from a single model column in the chart. Series are plotted in the order that they have been added to the chart.

The series column is reset to -1 when the model is set (or changed). Thus you need to set a model before configuring the series.

See Also:
removeSeries(int modelColumn), setSeries(List series)

removeSeries

public void removeSeries(int modelColumn)
Removes a data series.

This removes the first data series which plots the given modelColumn.

See Also:
addSeries(WDataSeries series), setSeries(List series)

setSeries

public void setSeries(java.util.List<WDataSeries> series)
Sets all data series.

Replaces the current list of series with the new list.

See Also:
getSeries(int modelColumn), addSeries(WDataSeries series), removeSeries(int modelColumn)

getSeries

public WDataSeries getSeries(int modelColumn)
Returns a data series corresponding to a data column.

Returns a reference to the first data series that plots data from modelColumn.


getSeries

public java.util.List<WDataSeries> getSeries()
Returns a list with the current data series.

Returns the complete list of current data series.

See Also:
setSeries(List series)

getAxis

public WAxis getAxis(Axis axis)
Returns a chart axis.

Returns a reference to the specified axis.


setBarMargin

public void setBarMargin(double margin)
Sets the margin between bars of different series.

Use this method to change the margin that is set between bars of different series. The margin is specified as a fraction of the width. For example, a value of 0.1 adds a 10% margin between bars of each series. Negative values are also allowed. For example, use a margin of -1 to plot the bars of different series on top of each other.

The default value is 0.


getBarMargin

public double getBarMargin()
Returns the margin between bars of different series.

See Also:
setBarMargin(double margin)

setLegendEnabled

public void setLegendEnabled(boolean enabled)
Enables the legend.

The location of the legend can be configured using setLegendLocation(). Only series for which the legend is enabled or included in this legend.

The default value is false.

See Also:
WDataSeries.isLegendEnabled(), setLegendLocation(LegendLocation location, Side side, AlignmentFlag alignment)

isLegendEnabled

public boolean isLegendEnabled()
Returns whether the legend is enabled.

See Also:
setLegendEnabled(boolean enabled)

setLegendLocation

public void setLegendLocation(LegendLocation location,
                              Side side,
                              AlignmentFlag alignment)
Configures the legend location.

The legend can be renderd either inside or outside of the chart area. When location is Chart::LegendInside, the legend will be rendered inside the chart. When location is Chart::Legendoutside, the legend is rendered outside the chart, in the chart padding area.

The provided side can either be Side.Left, Side.Right, Side.Top, Side.Bottom and configures the side of the chart at which the legend is displayed.

The alignment specifies how the legend is aligned. This can be a horizontal alignment flag (AlignmentFlag.AlignLeft, AlignmentFlag.AlignCenter, or AlignmentFlag.AlignRight), when the side is Bottom or Top, or a vertical alignment flag (AlignmentFlag.AlignTop, AlignmentFlag.AlignMiddle, or AlignmentFlag.AlignBottom) when the side is Left or Right.

The default location is Chart::LegendOutside, Side.Right and AlignmentFlag.AlignMiddle.

To have more control over the legend, you could reimplement the renderLegendItem() method to customize how one item in the legend is rendered, or, alternatively you can disable the legend generated by the chart itself, and reimplement the paint() method in which you use the renderLegendItem() method repeatedly to render a customized legend.

See Also:
WDataSeries.setLegendEnabled(boolean enabled)

setLegendStyle

public void setLegendStyle(WFont font,
                           WPen border,
                           WBrush background)
Configures the legend decoration.

This configures the font, border and background for the legend.

The default font is a 10pt sans serif font (the same as the default axis label font), the default border is NoPen and the default background is NoBrush.

See Also:
setLegendEnabled(boolean enabled)

getLegendLocation

public LegendLocation getLegendLocation()
Returns the legend location.

See Also:
setLegendLocation(LegendLocation location, Side side, AlignmentFlag alignment)

getLegendSide

public Side getLegendSide()
Returns the legend side.

See Also:
setLegendLocation(LegendLocation location, Side side, AlignmentFlag alignment)

getLegendAlignment

public AlignmentFlag getLegendAlignment()
Returns the legend alignment.

See Also:
setLegendLocation(LegendLocation location, Side side, AlignmentFlag alignment)

getLegendColumns

public int getLegendColumns()
Returns the legend columns.

See Also:
setLegendColumns(int columns, WLength columnWidth)

getLegendColumnWidth

public WLength getLegendColumnWidth()
Returns the legend column width.

See Also:
setLegendColumns(int columns, WLength columnWidth)

getLegendFont

public WFont getLegendFont()
Returns the legend font.

See Also:
setLegendStyle(WFont font, WPen border, WBrush background)

getLegendBorder

public WPen getLegendBorder()
Returns the legend border pen.

See Also:
setLegendStyle(WFont font, WPen border, WBrush background)

getLegendBackground

public WBrush getLegendBackground()
Returns the legend background brush.

See Also:
setLegendStyle(WFont font, WPen border, WBrush background)

setLegendColumns

public void setLegendColumns(int columns,
                             WLength columnWidth)
Configures multiple legend columns.

Multiple columns are typically useful when placing the legend at the top or at the bottom of the chart.

The default value is a single column, 100 pixels wide.


paint

public void paint(WPainter painter,
                  WRectF rectangle)
Description copied from class: WAbstractChart
Paint the chart in a rectangle of the given painter.

Paints the chart inside the painter, in the area indicated by rectangle. When rectangle is a null rectangle, the entire painter window is used.

Specified by:
paint in class WAbstractChart

drawMarker

public void drawMarker(WDataSeries series,
                       WPainterPath result)
Draws the marker for a given data series.

Draws the marker for the indicated series in the result. This method is called while painting the chart, and you may want to reimplement this method if you wish to provide a custom marker for a particular data series.

See Also:
setLegendEnabled(boolean enabled)

renderLegendIcon

public void renderLegendIcon(WPainter painter,
                             WPointF pos,
                             WDataSeries series)
Renders the legend icon for a given data series.

Renders the legend icon for the indicated series in the painter at position pos.

This method is called while rendering a legend item, and you may want to reimplement this method if you wish to provide a custom legend icon for a particular data series.

See Also:
renderLegendItem(WPainter painter, WPointF pos, WDataSeries series)

renderLegendItem

public void renderLegendItem(WPainter painter,
                             WPointF pos,
                             WDataSeries series)
Renders the legend item for a given data series.

Renders the legend item for the indicated series in the painter at position pos. The default implementation draws the marker, and the series description to the right. The series description is taken from the model's header data for that series' data column.

This method is called while painting the chart, and you may want to reimplement this method if you wish to provide a custom marker for a particular data series.

See Also:
setLegendEnabled(boolean enabled)

mapFromDevice

public WPointF mapFromDevice(WPointF point,
                             Axis ordinateAxis)
Maps from device coordinates to model coordinates.

Maps a position in the chart back to model coordinates.

This uses the axis dimensions that are based on the latest chart rendering. If you have not yet rendered the chart, or wish to already the mapping reflect model changes since the last rendering, you should call initLayout() first.

See Also:
mapToDevice(Object xValue, Object yValue, Axis ordinateAxis, int xSegment, int ySegment)

mapFromDevice

public final WPointF mapFromDevice(WPointF point)
Maps from device coordinates to model coordinates.

Returns mapFromDevice(point, Axis.OrdinateAxis)


mapToDevice

public WPointF mapToDevice(java.lang.Object xValue,
                           java.lang.Object yValue,
                           Axis ordinateAxis,
                           int xSegment,
                           int ySegment)
Maps model values onto chart coordinates.

This returns the chart device coordinates for a (x,y) pair of model values.

This uses the axis dimensions that are based on the latest chart rendering. If you have not yet rendered the chart, or wish to already the mapping reflect model changes since the last rendering, you should call initLayout() first.

The xSegment and ySegment arguments are relevant only when the corresponding axis is broken using WAxis#setBreak(). Then, its possible values may be 0 (below the break) or 1 (above the break).

See Also:
mapFromDevice(WPointF point, Axis ordinateAxis)

mapToDevice

public final WPointF mapToDevice(java.lang.Object xValue,
                                 java.lang.Object yValue)
Maps model values onto chart coordinates.

Returns mapToDevice(xValue, yValue, Axis.OrdinateAxis, 0, 0)


mapToDevice

public final WPointF mapToDevice(java.lang.Object xValue,
                                 java.lang.Object yValue,
                                 Axis ordinateAxis)
Maps model values onto chart coordinates.

Returns mapToDevice(xValue, yValue, ordinateAxis, 0, 0)


mapToDevice

public final WPointF mapToDevice(java.lang.Object xValue,
                                 java.lang.Object yValue,
                                 Axis ordinateAxis,
                                 int xSegment)
Maps model values onto chart coordinates.

Returns mapToDevice(xValue, yValue, ordinateAxis, xSegment, 0)


initLayout

public void initLayout(WRectF rectangle)
Initializes the chart layout.

A cartesian chart delegates the rendering and layout of the chart and its axes to a WChart2DRenderer. As a consequence, the mapping between model and device coordinates is also established by this class, which is only created on-demand when painging.

If you wish to establish the layout, in order to use the mapFromDevice() and mapToDevice() methods before the chart has been rendered, you should call this method.

Unless a specific chart rectangle is specified, the entire widget area is assumed.


initLayout

public final void initLayout()
Initializes the chart layout.

Calls initLayout(new WRectF())


createLegendItemWidget

public WWidget createLegendItemWidget(int index)
Creates a widget which renders the a legend item.

The legend item widget will contain a text and a WPaintedWidget which draws the series' symbol.


addDataPointArea

public void addDataPointArea(WDataSeries series,
                             WModelIndex xIndex,
                             WAbstractArea area)
Adds a data point area (used for displaying e.g. tooltips).

You may want to specialize this is if you wish to modify (or delete) the area.

Note: Currently, an area is only created if the ItemDataRole.ToolTipRole data at the data point is not empty.


paintEvent

protected void paintEvent(WPaintDevice paintDevice)
Description copied from class: WPaintedWidget
Paints the widget.

You should reimplement this method to paint the contents of the widget, using the given paintDevice.

Specified by:
paintEvent in class WPaintedWidget

createRenderer

protected WChart2DRenderer createRenderer(WPainter painter,
                                          WRectF rectangle)
Creates a renderer which renders the chart.

The rendering of the chart is delegated to a WChart2DRenderer class, which will render the chart within the rectangle of the painter.

You may want to reimplement this method if you wish to override one or more aspects of the rendering, by returning an new instance of a specialized WChart2DRenderer class.

After rendering, the renderer is deleted.

See Also:
WChart2DRenderer.render()

modelColumnsInserted

protected void modelColumnsInserted(WModelIndex parent,
                                    int start,
                                    int end)
Description copied from class: WAbstractChart
Method called when colums have been inserted in the model.

Specified by:
modelColumnsInserted in class WAbstractChart
See Also:
WAbstractItemModel.columnsInserted()

modelColumnsRemoved

protected void modelColumnsRemoved(WModelIndex parent,
                                   int start,
                                   int end)
Description copied from class: WAbstractChart
Method called when colums have been removed from the model.

Specified by:
modelColumnsRemoved in class WAbstractChart
See Also:
WAbstractItemModel.columnsRemoved()

modelRowsInserted

protected void modelRowsInserted(WModelIndex parent,
                                 int start,
                                 int end)
Description copied from class: WAbstractChart
Method called when rows have been inserted from the model.

Specified by:
modelRowsInserted in class WAbstractChart
See Also:
WAbstractItemModel.rowsInserted()

modelRowsRemoved

protected void modelRowsRemoved(WModelIndex parent,
                                int start,
                                int end)
Description copied from class: WAbstractChart
Method called when rows have been removed from the model.

Specified by:
modelRowsRemoved in class WAbstractChart
See Also:
WAbstractItemModel.rowsRemoved()

modelDataChanged

protected void modelDataChanged(WModelIndex topLeft,
                                WModelIndex bottomRight)
Description copied from class: WAbstractChart
Method called when data has been changed in the model.

Specified by:
modelDataChanged in class WAbstractChart
See Also:
WAbstractItemModel.dataChanged()

modelChanged

protected void modelChanged()
Description copied from class: WAbstractChart
Method called whenever the entire model was changed.

Overrides:
modelChanged in class WAbstractChart
See Also:
WAbstractChart.setModel(WAbstractItemModel model)

modelReset

protected void modelReset()
Description copied from class: WAbstractChart
Method called whenever the entire model was reset.

Bound to the WAbstractItemModel#modelReset() and WAbstractItemModel#layoutChanged() signals.

Overrides:
modelReset in class WAbstractChart