How to apply gradient color for OLAP Chart series in WPF?
You can apply gradient colour for OLAP Chart series by using the following codes.
C#
this.olapchart1.Loaded += new RoutedEventHandler(olapchart1_Loaded); void olapchart1_Loaded(object sender, RoutedEventArgs e) { LinearGradientBrush linearGradiBrush = new LinearGradientBrush(Colors.Red,Colors.Blue, 45.00); foreach (var series in olapchart1.OlapChartArea.Series) { foreach (var seg in series.Segments) { seg.Interior = linearGradiBrush; } } }
VB
Me.olapchart1.Loaded += New RoutedEventHandler(olapchart1_Loaded) Private Sub olapchart1_Loaded(ByVal sender As Object, ByVal e As RoutedEventArgs) Dim linearGradiBrush As LinearGradientBrush = New LinearGradientBrush(Colors.Red, Colors.Blue, 45.0) Dim series As var For Each series In olapchart1.OlapChartArea.Series Dim seg As var For Each seg In series.Segments seg.Interior = linearGradiBrush Next Next End Sub
Conclusion
I hope you enjoyed learning about how to add controls like TextBox in GroupDropArea in WPF DataGrid.
You can refer to our WPF OlapChart feature tour page to know about its other groundbreaking feature representations. You can also explore our WPF OlapChart documentation to understand how to create and manipulate data.
For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other controls.
If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!