This is a migrated thread and some comments may be shown as answers.

Does Form Charts support negative axis values?

3 Answers 53 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Hakan
Top achievements
Rank 1
Hakan asked on 13 Dec 2016, 11:23 AM

Hey everyone,

Does Xamarin Form Charts support negative chart values? (Especially -y axis) It says it does not supports for Xamarin forms but I'm not quite sure about this info. Does anybody knows? Thanks in advance.

 

 

ps. added sample chart to the attachment

3 Answers, 1 is accepted

Sort by
0
Lance | Manager Technical Support
Telerik team
answered on 14 Dec 2016, 04:14 PM
Hello Hakan,

This is indeed supported, see the attached screenshot (you'll see that Oranges has a value of -3).

Here is the code I used to generate that chart.

XAML: 

<telerikChart:RadCartesianChart>
      <telerikChart:RadCartesianChart.HorizontalAxis>
        <telerikChart:CategoricalAxis />
      </telerikChart:RadCartesianChart.HorizontalAxis>
      <telerikChart:RadCartesianChart.VerticalAxis>
        <telerikChart:NumericalAxis />
      </telerikChart:RadCartesianChart.VerticalAxis>
      <telerikChart:RadCartesianChart.Series>
        <telerikChart:LineSeries x:Name="MyLineSeries">
          <telerikChart:LineSeries.CategoryBinding>
            <telerikChart:PropertyNameDataPointBinding PropertyName="Category"/>
          </telerikChart:LineSeries.CategoryBinding>
          <telerikChart:LineSeries.ValueBinding>
            <telerikChart:PropertyNameDataPointBinding PropertyName="Value"/>
          </telerikChart:LineSeries.ValueBinding>
        </telerikChart:LineSeries>
      </telerikChart:RadCartesianChart.Series>
</telerikChart:RadCartesianChart>


Code-behind or ViewModel:

MyLineSeries.ItemsSource = new ObservableCollection<ChartData>
{
    new ChartData { Category = $"Apples", Value = 2 },
    new ChartData { Category = $"Oranges", Value = -3 },
    new ChartData { Category = $"Peaches", Value = 1 }
};


Please let us know if you have any further questions or concerns. Thank you for contacting Support and for choosing Telerik by Progress.

Regards,
Lance | Tech Support Engineer, Sr.
Telerik by Progress
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
0
Hakan
Top achievements
Rank 1
answered on 14 Dec 2016, 04:25 PM

Wow thanks for the answer! :) I was suspicious about this according to the comparison table on http://www.telerik.com/xamarin-ui/chart 

 

 it says 'Support for Negative Axis Values' not available for xamarin forms. I dont know why :S

0
Lance | Manager Technical Support
Telerik team
answered on 14 Dec 2016, 06:45 PM
Hello Hakan,

Thank you for letting us know about the comparison chart. I will have the team review and update the chart on the product page.

Regards,
Lance | Tech Support Engineer, Sr.
Telerik by Progress
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
Tags
Chart
Asked by
Hakan
Top achievements
Rank 1
Answers by
Lance | Manager Technical Support
Telerik team
Hakan
Top achievements
Rank 1
Share this question
or