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

Position of chart axis

4 Answers 1244 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Torben
Top achievements
Rank 1
Torben asked on 05 Mar 2018, 10:06 AM
How do you position e.g. the Y-Axis to the right?

4 Answers, 1 is accepted

Sort by
0
Dimiter Topalov
Telerik team
answered on 06 Mar 2018, 10:03 AM
Hello Torben,

You can use the kendo-chart-category-axis-item and the kendo-chart-value-axis-item's properties to configure various axis options:

https://www.telerik.com/kendo-angular-ui/components/charts/chart/elements/axes/#toc-categorical-chart-axes

The point(s) at which a given axis is intersecting its perpendicular counterpart(s) can be configured by providing an array of value(s) to the axisCrossingValue property. To put the vertical (value) axis on the right-hand side of the chart, provide a value that is greater than the biggest index in the "categories" array to the category axis item's axisCrossingValue property, e.g.:

https://plnkr.co/edit/uZn0gCzPsRuXuX80ORt7?p=preview

I hope this helps.

Regards,
Dimiter Topalov
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Torben
Top achievements
Rank 1
answered on 06 Mar 2018, 11:57 AM

It helps with a subset of my charts.

But... I also have to show paretos, having both a left side Y-Axis and a right side Y-Axis. Using the axisCrossingValue put all axis either to the left or to the right.

Also, it seems kind of weird to have the CategoryAxis determine the position of the Y-Axis?

 

0
Dimiter Topalov
Telerik team
answered on 07 Mar 2018, 10:46 AM
Hello Torben,

You can configure multiple vertical (or horizontal) axes by providing the respective number of kendo-chart-{{axis type}}axis-item components, and set each of the crossing points for these axes, e.g.:

<kendo-chart-category-axis>
              <kendo-chart-category-axis-item [axisCrossingValue]="[0, 1e6]"></kendo-chart-category-axis-item>
            </kendo-chart-category-axis>
            <kendo-chart-value-axis>
              <kendo-chart-value-axis-item></kendo-chart-value-axis-item>
              <kendo-chart-value-axis-item></kendo-chart-value-axis-item>
            </kendo-chart-value-axis>

The reasoning behind the category axis component's axisCrossingValue property to control the crossing points for the value axis(axes) is that these are points on the category axis, determining where the other (perpendicular) axes will cross the horizontal axis. I hope this makes sense.

Regards,
Dimiter Topalov
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Accepted
Dimiter Topalov
Telerik team
answered on 07 Mar 2018, 10:48 AM
Hello Torben,

Here is the updated example, demonstrating the described approach:

https://plnkr.co/edit/Sa3mD7LVpQkp6x4UqQwh?p=preview

Regards,
Dimiter Topalov
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
General Discussions
Asked by
Torben
Top achievements
Rank 1
Answers by
Dimiter Topalov
Telerik team
Torben
Top achievements
Rank 1
Share this question
or