Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
325
"Series Title" in Legend when using GroupBy and StackedColumnSeries
posted

This is the same problem someone else was having with the Silverlight chart controls: https://es.infragistics.com/community/forums/f/retired-products-and-controls/64311/is-any-way-of-creating-dynamically-stackedfragmentseries-of-a-stackedcolumnseries/327909#327909

My code is the same, except I'm using the WPF version of the controls. Can anyone help me out?

I'm using Graham Murray's workaround found at the bottom of page one of the above thread. Like the other poster, I can confirm that the converter is not being used even though it is referenced in the LegendItemTemplate.

I'm on version 11.2.20112.2046.

Thanks!

Parents
No Data
Reply
  • 325
    Verified Answer
    posted

    I have found a workaround. I attached an event handler to the StackedColumnSeries' SeriesCreated event:

    private void stack_SeriesCreated(object sender, Infragistics.Controls.Charts.StackedSeriesCreatedEventArgs e)
            {
                StackedFragmentSeries series = (StackedFragmentSeries)sender;

                if (series != null)
                {
                    series.Title = series.ValueMemberPath.Replace("_Count", string.Empty);
                }
            }

    Replace "Count" with the ValueMemberPath of your datasource (GroupBy in my case).

Children