Chart events overview
A chart is a graphical representation of data. A chart event occurs before, during, or after the drawing of a chart. Table 39‑1 lists the chart event handler methods and identifies when these methods are called.
Table 39‑1 Chart event handler methods
Method
Called
afterDataSetFilled(Series series, DataSet dataSet, IChartScriptContext icsc)
After populating a series data set
afterDrawAxisLabel(Axis axis, Label label, IChartScriptContext icsc)
After rendering each label on a given axis
afterDrawAxisTitle(Axis axis, Label label, IChartScriptContext icsc)
After rendering the title of an axis
afterDrawBlock(Block block, IChartScriptContext icsc)
After drawing each block
afterDrawDataPoint(DataPointHints dph, Fill fill, IChartScriptContext icsc)
After drawing the graphical representation or marker for each data point
afterDrawDataPointLabel(DataPointHints dph, Label label, IChartScriptContext icsc)
After rendering the label for each data point
afterDrawFittingCurve(CurveFitting cf, IChartScriptContext icsc)
After rendering a point‑fitting curve
afterDrawLegendItem(LegendEntryRenderingHints lerh, Bounds bounds, IChartScriptContext icsc)
After drawing each entry in the legend
afterDrawMarkerLine(Axis axis, MarkerLine mLine, IChartScriptContext icsc)
After drawing each marker line in an axis
afterDrawMarkerRange(Axis axis, MarkerRange mRange, IChartScriptContext icsc)
After drawing each marker range in an axis
afterDrawSeries(Series series, ISeriesRenderer isr, IChartScriptContext icsc)
After rendering a series
afterDrawSeriesTitle(Series series, Label label, IChartScriptContext icsc)
After rendering the title of a series
afterGeneration(GeneratedChartState gcs, IChartScriptContext icsc)
After generating a chart model to GeneratedChartState
afterRendering(GeneratedChartState gcs, IChartScriptContext icsc)
After the chart renders
beforeDataSetFilled(Series series, IDataSetProcessor idsp, IChartScriptContext icsc)
Before populating a series data set using the DataSetProcessor
beforeDrawAxisLabel(Axis axis, Label label, IChartScriptContext icsc)
Before rendering each label on a given axis
beforeDrawAxisTitle(Axis axis, Label label, IChartScriptContext icsc)
Before rendering the title of an axis
beforeDrawBlock(Block block, IChartScriptContext icsc)
Before drawing each block
beforeDrawDataPoint(DataPointHints dph, Fill fill, IChartScriptContext icsc)
Before drawing each data point graphical representation or marker
beforeDrawDataPointLabel(DataPointHints dph, Label label, IChartScriptContext icsc)
Before rendering the label for each data point
beforeDrawFittingCurve(CurveFitting cf, IChartScriptContext icsc)
Before rendering a point‑fitting curve
beforeDrawLegendItem(LegendEntryRenderingHints lerh, Bounds bounds, IChartScriptContext icsc)
Before drawing each entry in the legend
beforeDrawMarkerLine(Axis axis, MarkerLine mLine, IChartScriptContext icsc)
Before drawing each marker line in an axis
beforeDrawMarkerRange(Axis axis, MarkerRange mRange, IChartScriptContext icsc)
Before drawing each marker range in an axis
beforeDrawSeries(Series series, ISeriesRenderer isr, IChartScriptContext icsc)
Before rendering a series
beforeDrawSeriesTitle(Series series, Label label, IChartScriptContext icsc)
Before rendering the title of a series
beforeGeneration(Chart cm, IChartScriptContext icsc)
Before generating a chart model to GeneratedChartState
beforeRendering(GeneratedChartState gcs, IChartScriptContext icsc)
Before the chart renders
The following sections describe how to implement the chart events based on the event handler model for the BIRT chart engine.