Data Visualization and Analysis — Tips and Tricks (August - September 2022)

This post includes a series of interesting support tickets answered throughout August and September. We hope you find the contents of this post interesting and of business value. Should you have any questions about a particular support ticket, feel free to post a comment in the DevExpress Support Center.

Tips & Tricks

BI Dashboard

BI Dashboard for Web Forms

BI Dashboard for WPF

  • T1117647 - How to add custom template to Series Labels of the Chart dashboard item

    You can override ChartItemStyle to customize nested instances of the ChartControl and associated series options. The folowing code snippet modifies the SeriesLabel.ResolveOverlappingMode option:

    private void ChartControl_BoundDataChanged(object sender, RoutedEventArgs e) {
        var chart = (ChartControl)sender;
        var d = (XYDiagram2D)chart.Diagram;
        for (int i = 0; i < d.Series.Count; i++) {
            var label = new SeriesLabel();
            label.ResolveOverlappingMode = ResolveOverlappingMode.HideOverlapped;
            label.ElementTemplate = (DataTemplate)this.FindResource("labelTemplate");
            d.Series[i].Label = label;
        <DataTemplate x:Key="labelTemplate">
            <Label Content="{Binding Path=Text}" Background="LightYellow" BorderThickness="0"/>
        <DataTemplate x:Key="chartTemplate">
            <dxc:ChartControl Style="{Binding Path=(dxdash:DashboardLayoutItem.ViewStyle), 
            	RelativeSource={RelativeSource TemplatedParent}}"
        <dxdash:DashboardControl x:Name="dashboardControl1">
                <Style TargetType="dxdash:ChartDashboardLayoutItem">
                    <Setter Property="ContentTemplate" Value="{StaticResource chartTemplate}"/>

Chart for WinForms

Chart for WPF

  • T1116213 - How to get the position of a point via a click event on a 2DChart using MVVM patterns

    The correct MVVM approach is to use EventToCommand behavior. Event argument conversion is implemented in the CustomMouseButtonEventArgsConverter.Convert method.

        	Command="{Binding ClickCommand}"
    public ICommand ClickCommand { get; } = new DelegateCommand(OnClick);
    private static void OnClick(Point coordinates) {
  • T1115869 - How to get selected item info on XYDiagram2D

  • T1112366 - How to display custom labels for logarithmic x-axis

    To customize the display of axis labels, define Custom Labels as follows:

    var label = new CustomAxisLabel(d.sieb, d.sieb.ToString());

Chart for Web Forms

Map for WPF

Pivot Grid for WinForms


Chart for WinForms and WPF

Free DevExpress Products - Get Your Copy Today

The following free DevExpress product offers remain available. Should you have any questions about the free offers below, please submit a ticket via the DevExpress Support Center at your convenience. We'll be happy to follow-up.