Point with Categorical and Numerical Values

4 posts, 0 answers
  1. Ingrid
    Ingrid avatar
    3 posts
    Member since:
    Sep 2018

    Posted 14 Oct 2018 Link to this post

    Hello,

    1. Can anyone tell me how could I get to make Points on my chart for every data point with Numerical as Y-Value and Categorical as X-Value?

    I tried to make it with ScatterPointSeries. It worked on iOS, but crash on android. Because originally ScatterPointSeries uses numerical for both X & Y Values (Code below)

     

    2. And , kindly check my RadLegend on my code as well, it does not show.

    Thank you.

    var hAxis = new CategoricalAxis();
    hAxis.LabelFontSize = 6;
     
    var vAxis = new NumericalAxis();
    vAxis.LabelFontSize = 7;
    vAxis.LabelFormat = "#,#.#";
     
    chart = new RadCartesianChart
    {
             HorizontalAxis = hAxis,
             VerticalAxis = vAxis,
             VerticalOptions = LayoutOptions.FillAndExpand,
             HorizontalOptions = LayoutOptions.FillAndExpand
    };
     
     
    ScatterPointSeries point = new ScatterPointSeries();
    point.SetBinding(ChartSeries.ItemsSourceProperty, new Binding(itemSource));
    point.YValueBinding = new PropertyNameDataPointBinding(valueBinding);
    point.XValueBinding = new PropertyNameDataPointBinding(categoryBinding);
    point.ShowLabels = true;
    point.LabelBinding = new PropertyNameDataPointBinding(labelBinding);
    chart.Series.Add(point);
     
     
    var legend = new RadLegend
    {
            LegendProvider = chart,
            HeightRequest = 100,
            LegendItemFontColor = Color.DarkGreen,
            Orientation = LegendOrientation.Horizontal,
    };
     
    stacklayoutView.Children.Add(chart); //usual stacklayout on absolute layout

     

  2. Yana
    Admin
    Yana avatar
    5044 posts

    Posted 18 Oct 2018 Link to this post

    Hello Ingrid,

    1. The ScatterPointSeries require both axes of the chart to be of type NumericalAxis, so I am afraid it  will not be possible to use it in the concrete case. You would need to choose among the other series that support CategoricalAxis.

    2. The provided code seems correct, so I cannot tell what could be the reason for RadLegend not to be shown.  Is it possible to send us a runnable sample project where the issue could be reproduced? You will need to open a support ticket and attach it there.

    Regards,
    Yana
    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. Ingrid
    Ingrid avatar
    3 posts
    Member since:
    Sep 2018

    Posted 18 Oct 2018 Link to this post

    Hi Yana,

    So, is there any Series supports CategoricalAxis that can produce "point" on Chart?

    Thanks !

  4. Yana
    Admin
    Yana avatar
    5044 posts

    Posted 18 Oct 2018 Link to this post

    Hello Ingrid,

    I am sorry for missing that - currently we do not provide such kind of series, however, we have it logged as a feature request in our Ideas&Feedback Portal, you could cast your vote and subscribe on status changes at the link below:
    https://feedback.telerik.com/Project/168/Feedback/Details/228848-cartesianchart-introduce-pointseries

    We're keeping an eye on this item and will plan it if there is demand.

    Regards,
    Yana
    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top