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

Change step size after setting axis maximum?

3 Answers 62 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Karl B
Top achievements
Rank 1
Karl B asked on 31 Jan 2020, 05:36 PM

After changing the axis maximum here I want to have the step size change so I can see a label for 130.  How can I accomplish this? 

 

<telerik:RadCartesianChart    ClipToBounds="False"  Margin="20">
    <telerik:RadCartesianChart.HorizontalAxis  >
        <telerik:LinearAxis  Maximum="130" LastLabelVisibility="Visible" >
        </telerik:LinearAxis>
    </telerik:RadCartesianChart.HorizontalAxis>
    <telerik:RadCartesianChart.VerticalAxis >
        <telerik:LinearAxis />
    </telerik:RadCartesianChart.VerticalAxis>
    <telerik:RadCartesianChart.Series>
        <telerik:ScatterAreaSeries >
            <telerik:ScatterAreaSeries.DataPoints>
                <telerik:ScatterDataPoint XValue="30" YValue="1"/>
                <telerik:ScatterDataPoint XValue="130" YValue="1"/>
            </telerik:ScatterAreaSeries.DataPoints>
        </telerik:ScatterAreaSeries>
    </telerik:RadCartesianChart.Series>
</telerik:RadCartesianChart>

3 Answers, 1 is accepted

Sort by
0
Dinko | Tech Support Engineer
Telerik team
answered on 05 Feb 2020, 08:17 AM

Hello Karl,

Thank you for the provided code snippet.

You can set the MajorStep property of the LinearAxis. You can find this and other properties of the axis described in the Axis help article.

Regards,
Dinko
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Karl B
Top achievements
Rank 1
answered on 05 Feb 2020, 02:48 PM
Is there no way to have this calculated automatically? It will calculate automatically on zoom with IsStepRecalculationOnZoomEnabled. Why can I not do the same through other means?
0
Dinko | Tech Support Engineer
Telerik team
answered on 10 Feb 2020, 11:50 AM

Hi Karl B,

We do not have an API that you can use to force the axis to show the last label. However, you can achieve this by using CartesianCustomAnnotation and manually place a label on top of the axis. I have prepared a sample project which demonstrates this approach. You can find it attached to this reply. I hope this approach will work for you.

Regards,
Dinko
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
ChartView
Asked by
Karl B
Top achievements
Rank 1
Answers by
Dinko | Tech Support Engineer
Telerik team
Karl B
Top achievements
Rank 1
Share this question
or