OnRender()

View as Markdown

Definition

An event driven method used to render content to a ChartStyle. The OnRender() method is called every time the chart values are updated. These updates are driven by incoming data to the chart bars or by a user manually interacting with the chart control or chart scale.

Method Return Value

This method does not return a value.

Syntax

You must override the method in your ChartStyle with the following syntax:

protected override void OnRender(ChartControl chartControl, ChartScale chartScale, ChartBars chartBars) \{ \}

Method Parameters

ParameterDescription
chartControlA ChartControl representing the x-axis
chartScaleA ChartScale representing the y-axis
chartBarsA ChartBars representing the Bars series for the chart

Examples

1protected override void OnRender(ChartControl chartControl, ChartScale chartScale, ChartBars chartBars)
2{
3 // Rendering logic for our chart style
4}