why points donot display

2 posts, 0 answers
  1. Wpf
    Wpf avatar
    1 posts
    Member since:
    Nov 2012

    Posted 24 Dec 2014 Link to this post

    here is the xaml:
    <telerik:RadCartesianChart x:Name="Chart">
                    <telerik:ScatterPointSeries XValueBinding="Category" YValueBinding="Value" ItemsSource="{Binding}">
                                <Ellipse Width="10" Height="10" Fill="{Binding DataItem.Color}"/>

    the binding code is:
    public MainWindow()
                DataContext = GetData(12);
            }        public static List<ChartData> GetData(int dataSize)
                Random rnd = new Random();
                var result = new List<ChartData>();            for (int i = 0; i <= dataSize; i++)
                    result.Add(new ChartData()
                        Category = i,
                        Value = rnd.Next(1, 100),
                        Color = new SolidColorBrush(
                            Color.FromArgb(255, (byte)rnd.Next(0, 256), (byte)rnd.Next(0, 256), (byte)rnd.Next(0, 256)))
                }            return result;

    but when running app. the points is not show. pls Help.
  2. Petar Marchev
    Petar Marchev avatar
    996 posts

    Posted 25 Dec 2014 Link to this post


    As explained here the scatter series require two numeric axes. So you need to either use a LineSeries instead of the scatter line series or you need to use a numeric (LinearAxis or LogarithmicAxis) instead of the CategoricalAxis.

    Here are some valuable links:
    online qsf examples
    sdk samples

    Petar Marchev

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top