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
465
How can you change the marker size for ScatterLineSeries?
posted

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!

 

Parents
No Data
Reply
  • 1134
    posted

    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

Children