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

how do you center y axis on a specific x axis vlue

1 Answer 87 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
steven
Top achievements
Rank 1
steven asked on 15 Mar 2017, 04:56 PM

How does on transform the yaxis?

I need to center the y axis on a certain x value?

You can email directly at stevensrf@mail.com if you have answers , or better yet link me to source that does this.

1 Answer, 1 is accepted

Sort by
0
Dinko | Tech Support Engineer
Telerik team
answered on 20 Mar 2017, 01:25 PM
Hi Steven, 

RadChartView doesn't support center the position of its axis. To achieve such requirement you can hide the VerticalAxis and use annotation to draw a custom one in the center of the plot area. You can take a look at the following steps.
  • Use the Visibility or the ElementBrush property of the Axis to hide it.
  • Create a new CartesianGridLineAnnotation and position it at the center of the plot area. This will be the new axis line.
  • Decide (or calculate) how many labels you want to display on the axis and where. Then use CartesianCustomAnnotation to draw the ticks and the labels.
For your convenience, we have created sample project demonstrating the approach described above. Keep in mind that this custom code is not fully tested and we cannot guarantee that it will work properly in all expected scenarios. You can further test and modify the project to fit the desired scenario. 

Regards,
Dinko
Telerik by Progress
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
ChartView
Asked by
steven
Top achievements
Rank 1
Answers by
Dinko | Tech Support Engineer
Telerik team
Share this question
or