aspnet-devexpress-dot-xtracharts-dot-web-dot-webchartcontrol-6ef695eb.md
Occurs every time a chart control generates its series points from the data source.
Namespace : DevExpress.XtraCharts.Web
Assembly : DevExpress.XtraCharts.v25.2.Web.dll
NuGet Package : DevExpress.Web.Visualization
public event BoundDataChangedEventHandler BoundDataChanged
Public Event BoundDataChanged As BoundDataChangedEventHandler
The BoundDataChanged event's data class is EventArgs.
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:
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.
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;
}
}
}
Private Sub WebChartControl_BoundDataChanged(ByVal sender As Object, ByVal e As EventArgs)
Dim series As Series = TryCast(webChartControl.Series.Where(Function(s) s.Name = "2015").FirstOrDefault(), Series)
If series IsNot Nothing Then
Dim view As SideBySideBarSeriesView = TryCast(series.View, SideBySideBarSeriesView)
If view IsNot Nothing Then
view.Color = System.Drawing.Color.Orange
view.FillStyle.FillMode = FillMode.Solid
End If
End If
End Sub
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the BoundDataChanged event.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
webChartControl.SeriesTemplate.View = new SideBySideBarSeriesView();
webChartControl.BoundDataChanged += WebChartControl_BoundDataChanged;
}
webChartControl.SeriesTemplate.View = New SideBySideBarSeriesView()
AddHandler webChartControl.BoundDataChanged, AddressOf WebChartControl_BoundDataChanged
End Sub
See Also
How to: Individually Change the View Type of Automatically Created Series