Hi,
The marker size behavior is broken in 17.2 (as compared to 16.1). In the following sample, 16.1 correctly sets the radius of the circular marker. In 17.2, the bubbles show up in some arbitrary size (not the radius given in RadiusMemberPath), and changes when the chart is resized. Is there anyway the 16.1 behavior can be replicated in 17.2 XamDataChart?
<Window x:Class="DataChartAxisLabels.BubbleSeriesWindow" xmlns="">schemas.microsoft.com/.../presentation" xmlns:x="">schemas.microsoft.com/.../xaml" xmlns:ig="">schemas.infragistics.com/xaml" xmlns:local="clr-namespace:DataChartAxisLabels" Title="MainWindow" Height="700" Width="500"> <ig:XamDataChart > <ig:XamDataChart.Resources><local:BubbleDataSample x:Key="BubbleDataSample"/>
</ig:XamDataChart.Resources> <ig:XamDataChart.Axes> <ig:NumericXAxis x:Name="numericXAxis" MinimumValue="0" MaximumValue="200" Interval="20" /> <ig:NumericYAxis x:Name="numericYAxis" MinimumValue="0" MaximumValue="200" Interval="20" /> </ig:XamDataChart.Axes> <ig:XamDataChart.Series> <!-- ========================================================================== --> <ig:BubbleSeries ItemsSource="{StaticResource BubbleDataSample}" XAxis="{Binding ElementName=numericXAxis}" YAxis="{Binding ElementName=numericYAxis}" XMemberPath="X" YMemberPath="Y" RadiusMemberPath="Radius" > </ig:BubbleSeries> <!-- ========================================================================== --> </ig:XamDataChart.Series> </ig:XamDataChart></Window>
The same code above results
16.1
17.2
Regards,
Anu
Hi Andrew,
For 1, I ended up overriding the MarkerTemplate and as this bubble series has no connecting lines, used the Series Thickness for the Marker's Stroke Thickness
For 2, as suggested supplying the Series's MarkerBrush worked to get the color as it used to show in 16.1.
And there was another small issue which came up in the LegendItemBadge. In 16.1 (and it hasn't been fixed in 17.2 either), if the ScatterLineSeries has DashArray, the legend doesn't reflect it. To correctly show the legend, I have to override the LegendItemBadge. This is also the same for the Overlays. The new issue is that the margin for Overlay's legend is different than other legends (Margin 1 vs 4).
Regards, Anu
Hello Anu,
Thank you for your update. I will answer your new questions in the order they were asked:
1. I am glad that you were able to resolve this using a Style for the chart. The best recommendation I can make in this case is usage of a MarkerTemplate for your series, as we do not currently have any sort of "Marker Stroke Thickness" property available on the BubbleSeries. You can read further about usage of a MarkerTemplate here.
2. As far as I am aware, the Legend brush was never tied to the ValueBrushScale that was provided, unless you use an ItemLegend and set the LabelMemberPath property of the BubbleSeries, which will show each item and the fill used for the bubble. I rebuilt the sample project above that I had sent you against the latest version of 16.1 (16.1.20161.2231), and the ActualMarkerBrush property is what is shown in the Legend, even when a ValueBrushScale is used.
In order to have a marker item in the Legend that is a gradient, I would recommend setting the MarkerBrush property of your BubbleSeries to a LinearGradientBrush made up of the colors in your ValueBrushScale's Brushes collection. The ValueBrushScale will override this in the UI as long as the FillMemberPath is set, but the Legend will take the marker brush that you assign.
I am attaching a modified version of the original sample project I sent to demonstrate. I hope this helps.
If you would like to see a gradient legend item or a marker outline thickness feature implemented in a future version of the XamDataChart, I would recommend suggesting new product ideas for these at our WPF ideas site. This will place you in direct communication with our product management teams who plan and prioritize upcoming features and development based on community and user feedback.
Please let me know if you have any other questions or concerns on this matter.
3125.XamDataChartBubbleSeriesCase.zip
This works, thanks!
Now, There are two more XamDataChart changes which I am trying to revert -
1. The marker stroke thickness which changed from .5 to 2. I have been able to fix this by providing an updated style to the chart (not ideal, would prefer this use the Series thickness rather than yet another arbitrary value).
2. The legend template for a marker with FillScale set to a ValueBrushScale with provided BrushCollection. In 16.1, the legend's brush was a blend of the given brushes. Now it looks blank / white.
I have been investigating into your requirement in this case, and between versions 16.1 and 17.2, the behavior of the BubbleSeries in the XamDataChart changed. In 16.1, the BubbleSeries would scale the sizes of your bubbles directly from the radius values, but in version 17.2, it is more of a "relative" scaling to each of the data values, instead.
In order to change the behavior back to the way it was in 16.1, I would recommend setting the RadiusScale property of the BubbleSeries. This property takes a SizeScale object, which has a MaximumValue and a MinimumValue property. If you set these MaximumValue and MinimumValue properties to your minimum and maximum radius value from your data item, respectively, the BubbleSeries will act as it did in 16.1.
I am attaching a sample project to demonstrate usage of the SizeScale object with a BubbleSeries. I hope this helps.
XamDataChartBubbleSeriesCase.zip