Hi Folks,
I upgraded from 19.2 to 21.2 version of Ultimate for WPF. All good but suddenly I'm missing markers on my legends (see below) when I revert references back to 19.2 all seems to work again.
What could be the issue? I only changed references in the project. Should I do something more to upgrade to the new version?
Thanks
Michal
I now ran Version Utility over the entire solution and got same result i.e. no markers on legend, only series name.
Hello Michal,
My team and I have done an initial review of this forum thread, and I would like to get some more information regarding your scenario to see if we can figure out why the markers are not showing for you in your legend. Can you please provide some information on the following?
1. What series type(s) are you using for your different legend entries?
2. Are you creating a MarkerTemplate for your series? If so, can you please provide this template?
3. It looks like your legend is in a popup of sorts. As a test, does the legend work normally if it is placed on the page with the chart?
4. Do you have an isolated sample project that you can share that demonstrates the behavior you are seeing?
Please let me know if you have any other questions or concerns on this matter.
Hello Michal and Dean,
My apologies, when I originally answered this thread, I missed a property that was added semi-recently. I would recommend setting the LegendItemBadgeMode property of your series that are plotted in the chart to “MatchSeries.” This should allow the marker to reappear.
Hi Dean, that worked. Thanks!
Hi Michal,
Just set the LegendItemBadgeMode property in the series to 'MatchSeries'.
Then it will behave like before.
Hope this can help you.
Hi Andrew, sorry for late response, here are my answers:
1. Scatter Series
2. Yes, code:
DataTemplate CreateMarkerTemplate(ISeriesViewModel seriesVm) { var seriesLabelFactory = new FrameworkElementFactory(typeof(TextBlock)); var titleBinding = CreateBinding(seriesVm, nameof(seriesVm.Title)); seriesLabelFactory.SetBinding(TextBlock.TextProperty, titleBinding); var foregroundBinding = CreateBinding(seriesVm.Style, nameof(seriesVm.Style.Colour)); foregroundBinding.Converter = _seriesColourConverter; seriesLabelFactory.SetBinding(TextBlock.ForegroundProperty, foregroundBinding); seriesLabelFactory.SetValue(TextBlock.BackgroundProperty, _labelBackgroundBrush); return new DataTemplate { VisualTree = seriesLabelFactory }; }3. not working. 4. Unfortunately not.
code here:
<ig:XamDataChart x:Name="TheChart" Legend="{Binding ElementName=Legend}"> <ig:XamDataChart.Axes> <ig:CategoryXAxis x:Name="CategoryXAxis" Title="CategoryXAxis" Visibility="Visible" ItemsSource="{Binding Data2}" /> <ig:NumericXAxis x:Name="NumericXAxis" Title="NumericX" MinimumValue="0" Visibility="Visible" MaximumValue="30" /> <ig:NumericYAxis x:Name="YAxis" MinimumValue="609" MaximumValue="611" /> </ig:XamDataChart.Axes> <ig:XamDataChart.Series> <ig:ScatterSplineSeries Visibility="Visible" Stiffness="0.1" XAxis="{Binding ElementName=NumericXAxis}" YAxis="{Binding ElementName=YAxis}" ItemsSource="{Binding Data}" YMemberPath="Y" XMemberPath="X" ShowDefaultTooltip="True" MarkerType="Pentagon" DashArray="5 5" Title="ScatterSplineSeries" Legend="{Binding ElementName=Legend}"/> <ig:SplineSeries Visibility="Visible" XAxis="{Binding ElementName=CategoryXAxis}" YAxis="{Binding ElementName=YAxis}" MarkerType="None" ItemsSource="{Binding Data2}" ValueMemberPath="Y" ShowDefaultTooltip="True" DashArray="5 5" Title="SplineSeries" /> </ig:XamDataChart.Series></ig:XamDataChart><ig:Legend x:Name="Legend" Content="Legend" />