Package org.zkoss.zul

## Class AbstractChartModel

- java.lang.Object
- - org.zkoss.zul.AbstractChartModel

- All Implemented Interfaces:
    `java.io.Serializable`, `ChartModel`
  Direct Known Subclasses:
    `DialModel`, `GanttModel`, `SimpleCategoryModel`, `SimpleHiLoModel`, `SimpleSingleValueCategoryModel`, `SimpleXYModel`, `WaferMapModel`

      public abstract class AbstractChartModel
      extends java.lang.Object
      implements ChartModel, java.io.Serializable

  A skeletal implementation for `ChartModel`.
  Author:
    henrichen
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected java.util.List<ChartDataListener>` | `_listeners` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `AbstractChartModel()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `addChartDataListener​(ChartDataListener l)` | Adds a listener to the chart that's notified each time a change to the data model occurs.
    `java.lang.Object` | `clone()` |
    `protected void` | `fireEvent​(int type, java.lang.Comparable<?> series, java.lang.Comparable<?> category, int seriesIndex, int categoryIndex, java.lang.Object data)` | Fires a `ChartDataEvent` for all registered listener (thru `addChartDataListener(org.zkoss.zul.event.ChartDataListener)`.
    `void` | `removeChartDataListener​(ChartDataListener l)` | Removes a listener from the chart that's notified each time a change to the data model occurs.

    - ### Methods inherited from class java.lang.Object

      `equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### _listeners

          protected java.util.List<ChartDataListener> _listeners

  - ### Constructor Detail

    - #### AbstractChartModel

          public AbstractChartModel()

  - ### Method Detail

    - #### fireEvent

          protected void fireEvent​(int type,
                                   java.lang.Comparable<?> series,
                                   java.lang.Comparable<?> category,
                                   int seriesIndex,
                                   int categoryIndex,
                                   java.lang.Object data)

      Fires a `ChartDataEvent` for all registered listener (thru `addChartDataListener(org.zkoss.zul.event.ChartDataListener)`.

      Note: you can invoke this method only in an event listener.

      Since:
        7.0.1

    - #### addChartDataListener

          public void addChartDataListener​(ChartDataListener l)

      Description copied from interface: `ChartModel`
      Adds a listener to the chart that's notified each time a change to the data model occurs.
      Specified by:
        `addChartDataListener` in interface `ChartModel`

    - #### removeChartDataListener

          public void removeChartDataListener​(ChartDataListener l)

      Description copied from interface: `ChartModel`
      Removes a listener from the chart that's notified each time a change to the data model occurs.
      Specified by:
        `removeChartDataListener` in interface `ChartModel`

    - #### clone

          public java.lang.Object clone()

      Overrides:
        `clone` in class `java.lang.Object`