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

RadCartesianChart - Lines outside the chart

11 Answers 204 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Olivier
Top achievements
Rank 1
Olivier asked on 17 Aug 2017, 07:06 PM

We are trying to plot a simple chart with a Y axis that goes from -5 to 5. The lines are drawn outside of the chart. See image in attachement.

Here is the code : 

           <telerikChart:RadCartesianChart Height="300" Margin="0,16,0,0">
              <telerikChart:RadCartesianChart.HorizontalAxis>
                <telerikChart:CategoricalAxis ShowLabels="False"/>
              </telerikChart:RadCartesianChart.HorizontalAxis>
              <telerikChart:RadCartesianChart.VerticalAxis>
                <telerikChart:LinearAxis x:Uid="TtsCalibrationChartVerticalAxis" Minimum="-5" Maximum="5"/>
              </telerikChart:RadCartesianChart.VerticalAxis>
              <telerikChart:LineSeries x:Name="Chart" ItemsSource="{x:Bind ViewModel.LaserThicknessesSampled, Mode=OneWay}" />
            </telerikChart:RadCartesianChart>

11 Answers, 1 is accepted

Sort by
0
Lance | Senior Manager Technical Support
Telerik team
answered on 21 Aug 2017, 03:36 PM
Hello Olivier,

The series can only render data points within the cartesian plot area. If you need to show those points, you'll want to remove the Minimum restriction on the vertical axis so that it is allowed to automatically account for data points.

For example, using your code, this would make your chart work automatically for all your data:

<telerikChart:RadCartesianChart Height="300" Margin="0,16,0,0">
    <telerikChart:RadCartesianChart.HorizontalAxis>
        <telerikChart:CategoricalAxis ShowLabels="False"/>
    </telerikChart:RadCartesianChart.HorizontalAxis>
 
    <telerikChart:RadCartesianChart.VerticalAxis>
        <telerikChart:LinearAxis x:Uid="TtsCalibrationChartVerticalAxis" />
    </telerikChart:RadCartesianChart.VerticalAxis>
 
    <telerikChart:LineSeries x:Name="Chart"
                ItemsSource="{x:Bind ViewModel.LaserThicknessesSampled, Mode=OneWay}" />
</telerikChart:RadCartesianChart>

This will allow the Chart to determine the highest/lowest values and properly set the LinearAxis Minimum and Maximum appropriately.

Regards,
Lance | Tech Support Engineer, Sr.
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
0
Jean-Noel Voirol
Top achievements
Rank 1
answered on 23 May 2018, 05:41 AM

Hello Lance,

I was trying to use a linear series but in my case it is a routine case to have point outside the plot area but I can't get it to work. I tried to limit the plotting area of your application sample and it doesn't work too.

Is it linked with: https://www.telerik.com/forums/uwp-c-windows-10-redstone-2-chart-issues-a417e24408bf?

Am I doing something wrong or is it not implemented?

Regards

0
Lance | Senior Manager Technical Support
Telerik team
answered on 23 May 2018, 02:45 PM
Hi Jean-Noel Voirol,

Data points can only be rendered inside the plat area. If you have a data point that has a value larger than the available values in the axis's maximum, the axis will automatically set its maximum to appropriately set the plot area.

However, if you've manually defined the max/min of the axis, then the Chart will respect those values and only render a plot area according to your max/min values.

To solve your issue, let the axis automatically determine the range and all data points will be visible in the plot area. In the case that you have large amounts of space between values and rending a large plot area is not practical, try using the Logarithmic axis instead of the Linear axis.

See the Axis documentation for a list of available axis types.

Regards,
Lance | Tech Support Engineer, Sr.
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
0
Jean-Noel Voirol
Top achievements
Rank 1
answered on 29 May 2018, 12:53 PM

Hello Lance,

Thank you for your answer.

Unfortunately our application allow the user to set the maximum and minimum values of the axes, I cannot limit it to plot every points. In some cases it is useful to see if a data is completely out of range.

Have you planned to implement this feature? I tried the Wpf and Xamarin charts components and it worked as expected in those platforms.

Regards

0
Jean-Noel Voirol
Top achievements
Rank 1
answered on 29 May 2018, 12:55 PM

Hello Lance,

Thank you for your answer.

Unfortunately our application allow the user to set the maximum and minimum values of the axes, I cannot limit it to plot every points. In some cases it is useful to see if a data is completely out of range.

Have you planned to implement this feature? I tried the Wpf and Xamarin charts components and it did work as expected in those platforms.

Regards

0
Lance | Senior Manager Technical Support
Telerik team
answered on 29 May 2018, 07:08 PM
Hi Oliver,

I don't see any feature requests for it in the backlog right now, so I've gone ahead and created one for you. Go to the following URL to up-vote and follow the feature request. Chart: Render points outside plot area

Regards,
Lance | Tech Support Engineer, Sr.
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
0
Jean-Noel Voirol
Top achievements
Rank 1
answered on 30 May 2018, 07:09 AM

Hi Lance,

I am sorry but the Xamarin version of your chart works perfectly, it is the UWP that doesn't.

By the way it seems to be more a bug than a feature. To explain more clearly my problem, I join you three screenshots of your different chart components.

All of them have the vertical axis range [40...70] and horizontal [30.04.2018 ... 30.05.208] set. As you can see the uwp one doesn't display the line from the first outside point and one point at [20.05.2018, 35] is skipped.

wpf: RadCartesianChar, LinearAxis,  DateTimeContinuousAxis

xamarin: RadCartesianChart, NumericalAxis, DateTimeContinuousAxis

uwp: RadCartesianChart, LinearAxis, DateTimeContinuousAxis

 

Regards

 

0
Lance | Senior Manager Technical Support
Telerik team
answered on 30 May 2018, 12:18 PM
Hi Oliver,

Thank you for providing screenshots, it helped clarify the problem. I mistakenly thought you were referring to the vertical axis and now understand you're speaking about the first point in the line series being off the left side of the plot area.

The UI for Xamarin Chart uses the UWP ChartView and should be rendering the same as the Xamarin screenshot (which platform did you take the Xamarin screenshot with?).

I'm investigating this further and will get back to you as soon as I know more.

Regards,
Lance | Tech Support Engineer, Sr.
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
0
Lance | Senior Manager Technical Support
Telerik team
answered on 30 May 2018, 05:58 PM
Hello Oliver,

I have completed my investigation and updated the backlog item to reflect m findings. I have updated your Telerik points for bringing this to our attention.

Please take a moment to follow the item in order to be notified of status changes (i.e. if the item gets approved, starts development, or gets completed): https://feedback.telerik.com/Project/168/Feedback/Details/250626-chart-render-points-outside-plot-area

Note that this also happens with both Xamarin.Forms as well as UI for UWP because they both use the same native Chart control.

Regards,
Lance | Tech Support Engineer, Sr.
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
0
Jean-Noel Voirol
Top achievements
Rank 1
answered on 31 May 2018, 08:49 AM

Hi Lance,

It was on Android, thank you for your investigation.

I will follow the item status.

By the way I am not Oliver :p

Regards

0
Lance | Senior Manager Technical Support
Telerik team
answered on 01 Jun 2018, 03:53 PM
Hi Jean-Noel,

My apologies for the name mix-up! I accidentally used the original thread owner.

Priority Resources

I checked your account and noticed that you have a DevCraft Ultimate license and can open priority support tickets under your account, you can do that here (you even have access to Telerik Developer Phone Assistance, I'm one of the engineers that answers Xamarin, WPF, UWP and other XAML support calls).

While we do try to monitor forum threads and respond, but this is limited to available resources and can take longer to reply (sometimes a couple days). Whereas Priority Tickets have a guaranteed turnaround time (usually <24hrs) and if you call Phone Assistance we will try to resolve the problem within a few hours.. 

Since this issue investigation is completed for now, we don't need a ticket to your account for this issue. However, if you have any future issues, I just wanted you to be aware of the resources available to you.

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