Change wpf scatter series chart plot marker style RRS feed

  • Question

  •  i have created the scattered series chart and want to change the marker style as circle or some other shapes and by default it is represented as rectangle.can any one tell me how to change the plot marker.

    thanks in advance.

    Sudhesh. G <br/> <a href="" target="_blank"></a><br/>

    Thursday, October 24, 2013 5:17 PM


  • Hi,

    As far as I know, it is difficult to use WPF to create a scatter series chart directly. We should use WPF Toolkit or other 3<sup>rd</sup> part toolkit to achieve this function. If you use WPF Toolkit, I am afraid that we cannot change scatter plot shapes. Here is a basic sample about how to create scatter series chart using WPF Toolkit.

    XAML Code:

    <Window x:Class="WpfScatterSeriesChart.MainWindow"
            Title="ChartTypeScatter" Height="350" Width="525">
            <!-- Scatter Chart -->
            <DVC:Chart Name="mcChart"
               Background="LightSteelBlue" Margin="10">
                    <DVC:ScatterSeries Title="Dots" IndependentValueBinding="{Binding Path=Key}"
        		        DependentValueBinding="{Binding Path=Value}">

    C# Code:

    public partial class MainWindow : Window
    	public MainWindow()
    	private void LoadScatterChartData()
    		((ScatterSeries)mcChart.Series[0]).ItemsSource =
    			new KeyValuePair<DateTime, int>[]{
    			new KeyValuePair<DateTime, int>(DateTime.Now, 100),
    			new KeyValuePair<DateTime, int>(DateTime.Now.AddMonths(1), 130),
    			new KeyValuePair<DateTime, int>(DateTime.Now.AddMonths(2), 150),
    			new KeyValuePair<DateTime, int>(DateTime.Now.AddMonths(3), 125)

    The result is shown in the following figure,

    BTW, I suggested you to post a new thread on WPF Toolkit Discussion. Maybe you can get a better response there.

    Have a nice time!


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by Yang,Chenfei Friday, November 1, 2013 2:51 AM
    Friday, October 25, 2013 11:40 AM