line chart start at y axis

1 Answer 417 Views
Charts
Susanne
Top achievements
Rank 1
Susanne asked on 26 Jul 2021, 10:26 AM

How can I get ride of the space between the first data point and the y-axis of a line chart.  

Or in other words how can the category axis start exactly at the value axis?

1 Answer, 1 is accepted

Sort by
1
Hetali
Telerik team
answered on 26 Jul 2021, 03:55 PM

Hi Susanne,

In order to remove the space between the first data point and the Y-axis of the Kendo UI Line Chart, set the justified property of the CategoryAxisItemComponent to 'true' as seen below:

<kendo-chart>
  <kendo-chart-category-axis>
    <kendo-chart-category-axis-item
      [categories]="['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul']"
      [justified]="true"
    >
    </kendo-chart-category-axis-item>
  </kendo-chart-category-axis>
</kendo-chart>

In this StackBlitz example, there is no space between the first data point and the Y-axis.

I hope this helps. Please let me know if I can further assist you.

Regards,
Hetali
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Charts
Asked by
Susanne
Top achievements
Rank 1
Answers by
Hetali
Telerik team
Share this question
or