ScatterLineSeries currently has properties for conveniently setting the MarkerType, MarkerOutline, and MarkerBrush. There isn't a MarkerSize property, so how should you go about changing the marker size? Since it's apparently not as simple as setting a single property like for type, outline, or brush, can you please submit an enhancement request to add a MarkerSize property for ScatterLineSeries?
Thanks!
Hi dsvaughan,
I've submitted this issue for a MarkerSize property and it is currently being looked into for our 11.1 release. In the mean time, if you'd like to change the size of your makers on your ScatterLine series, you can change the CircleMarkerTemplate's MinWidth and MinHeight properties to achieve this. Here's what I did:
CircleMarkerTemplate in my Window.Resources
<DataTemplate x:Key="CircleMarkerTemplate"> <Ellipse Stretch="Fill" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Fill="{Binding ActualItemBrush}" Stroke="{Binding Series.ActualMarkerOutline}" StrokeThickness="0.5" MinWidth="35" MinHeight="35"/> </DataTemplate>
I then assigned this template to the CircleMarkerTemplate property of my XamDataChart:
<igChart:XamDataChart CircleMarkerTemplate="{StaticResource CircleMarkerTemplate}" x:Name="Chart1" DataContext="{StaticResource data}"> <igChart:XamDataChart.Axes> <igChart:NumericXAxis x:Name="xAxis"/> <igChart:NumericYAxis x:Name="yAxis"/> </igChart:XamDataChart.Axes> <igChart:XamDataChart.Series> <igChart:ScatterLineSeries XAxis="{Binding ElementName=xAxis}" YAxis="{Binding ElementName=yAxis}" ItemsSource="{StaticResource data}" XMemberPath="xmapping" YMemberPath="ymapping"/> </igChart:XamDataChart.Series> </igChart:XamDataChart>
Hope this helps!
Marisa
Hi Marisa,
Thanks for the quick response. So I guess that we'd have to do the same thing for each of the marker templates if we're using more than just the circle markers (circle, pentagon, hexagon, etc.). And without a series property for marker size to support binding like you're using for Stroke, I'm not sure how we'd be able to use this approach for having the marker size be series-specific rather than using the same size for all circle markers on the chart. Hopefully this request will get picked up for 11.1.
Thanks,
Darcy
Hi Darcy,
Yes, unfortuantely with this approach you would have to do this with each of the different markers outside of circle. However, as for the part about having this approach be series specific, you can set the MarkerTemplate property of a series to the template you've created in your resources. This way you can have several different templates and apply them to different series as necessary. This may make you have to create extra templates, but unfortunately for now that's the best solution.