WebChartControl.BoundDataChanged Event
Occurs every time a chart control generates its series points from the data source.
Namespace: DevExpress.XtraCharts.Web
Assembly: DevExpress.XtraCharts.v18.2.Web.dll
Declaration
public event BoundDataChangedEventHandler BoundDataChanged
Public Event BoundDataChanged As BoundDataChangedEventHandler
Event Data
The BoundDataChanged event's data class is EventArgs.
Remarks
Use the BoundDataChanged event to change a series's SeriesBase.Visible property, or to change any properties of series labels or a series view.
NOTE
The following property values cannot be changed in the BoundDataChanged event handler:
Examples
This example demonstrates how to access the auto-created series appearance settings at runtime.
Handle the WebChartControl.BoundDataChanged event to access an individual series' settings.
NOTE
A complete sample project is available at https://github.com/DevExpress-Examples/webchartcontrol-how-to-change-auto-created-series-appearance
private void WebChartControl_BoundDataChanged(object sender, EventArgs e) {
Series series = webChartControl.Series.Where(s => s.Name == "2015").FirstOrDefault() as Series;
if(series != null) {
SideBySideBarSeriesView view = series.View as SideBySideBarSeriesView;
if(view != null) {
view.Color = System.Drawing.Color.Orange;
view.FillStyle.FillMode = FillMode.Solid;
}
}
}