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

Lines along minimum or maximum values of axis are not visible

4 Answers 291 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Philip
Top achievements
Rank 1
Philip asked on 24 Jun 2016, 03:27 PM

Hi, I have used a ScatterLineSeries inside a RadCartesianChart with both HorizontalAxis and VerticalAxis set to LinearAxis.

The y-value shows probability of something for an elapsed time, so the only meaningful range for y-axis is 0 to 1, thus i set Minimum=0 and Maximum=1

Multiple consecutive points have y=1, so there should be a horizontal line at the very top of the graph. But is seems it will be completely cut away and not visible. I guess it makes sense if thickness is based on (Maximum - y).

I've tried working around by setting those values to y=0.99 and that work. I've also tried setting Maximum=1.01 and that also work.

However the first workaround gives big problems if i want to display the actual data, and the second workaround does not work well with minimum value.

I could set minimum value to -0.01, but then the first label will show value -0.01, and second label will show 0.09, and then 0.19 etc.

Any idea how I can solve this?

 

4 Answers, 1 is accepted

Sort by
0
Accepted
Peshito
Telerik team
answered on 28 Jun 2016, 11:14 AM
Hello Philip,

In order to have your series thickness fully visible, try using the series' ClipToPlotArea property set to False. For example:
<telerik:RadCartesianChart x:Name="chart" ClipToBounds="False">
           <telerik:RadCartesianChart.HorizontalAxis>
               <telerik:LinearAxis />
           </telerik:RadCartesianChart.HorizontalAxis>
           <telerik:RadCartesianChart.VerticalAxis>
               <telerik:LinearAxis Minimum="0" Maximum="1"/>
           </telerik:RadCartesianChart.VerticalAxis>
           <telerik:RadCartesianChart.Series>
               <telerik:ScatterLineSeries ClipToPlotArea="False">
                   <telerik:ScatterLineSeries.DataPoints>
                       <telerik:ScatterDataPoint XValue="1" YValue="0.5"/>
                       <telerik:ScatterDataPoint XValue="2" YValue="0.6"/>
                       <telerik:ScatterDataPoint XValue="3" YValue="0.7"/>
                       <telerik:ScatterDataPoint XValue="4" YValue="0.8"/>
                       <telerik:ScatterDataPoint XValue="5" YValue="0.9"/>
                       <telerik:ScatterDataPoint XValue="6" YValue="1.0"/>
                       <telerik:ScatterDataPoint XValue="7" YValue="1.0"/>
                       <telerik:ScatterDataPoint XValue="8" YValue="1.0"/>
                       <telerik:ScatterDataPoint XValue="9" YValue="1.0"/>
                   </telerik:ScatterLineSeries.DataPoints>
               </telerik:ScatterLineSeries>
           </telerik:RadCartesianChart.Series>
       </telerik:RadCartesianChart>
Hope this helps.

Regards,
Peshito
Telerik
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
0
Philip
Top achievements
Rank 1
answered on 29 Jun 2016, 01:38 PM

Thank you, that worked :)

But I feel it's a bit strange that this is the default behaviour. My values are in the given range to the graph (of course including the boundary), so I think they should get displayed by default.

0
Peshito
Telerik team
answered on 01 Jul 2016, 10:22 AM
Hi Philip,

I am glad this worked well.

This is the default behavior and the series is being clipped in order to be in the bounds of the plot area. Thank you for the feedback on the matter. I will forward it to our developers for further consideration.

Regards,
Peshito
Telerik
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
0
Philip
Top achievements
Rank 1
answered on 01 Jul 2016, 10:33 AM

Yeah, but the data is in the range [Minimum, Maximum], so I don't think it should be clipped away.

Anyways, thanks for the good support :)

Tags
Chart
Asked by
Philip
Top achievements
Rank 1
Answers by
Peshito
Telerik team
Philip
Top achievements
Rank 1
Share this question
or