Vishal Gund
Vishal Gund

Reputation: 39

how to show x-axis values at top instead of bottom in kendo chart

I want to move x axis at the top for range bar chart in kendo chart for angular 2

sample chart

I am using https://www.telerik.com/kendo-angular-ui/components/charts/series-types/range-bar/

Upvotes: 2

Views: 2258

Answers (1)

Angela Amarapala
Angela Amarapala

Reputation: 1052

Add <kendo-chart-category-axis-item-labels> inside the <kendo-chart-category-axis-item>. Then set the position to end. The position parameter value must be of type AxisLabelsPosition. So import it from the @progress/kendo-angular-charts package.

For example:

<kendo-chart-category-axis-item-labels [rotation]="-60" [position]="position"></kendo-chart-category-axis-item-labels>

public position: AxisLabelsPosition = "end";

Also the label rotation will be affected by setting the position. To get the correct rotation of labels, remove [labels]="{ rotation: 'auto' } from kendo-chart-category-axis-item and set [rotation] inside the kendo-chart-category-axis-item-labels.

Refer this example.

Upvotes: 2

Related Questions