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

Kendo for angular - Chart (Panning and Zooming) date format

1 Answer 239 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Petr
Top achievements
Rank 1
Petr asked on 10 May 2018, 05:45 AM

Hello.

Can you help me how to change date format (Axis X) here: https://plnkr.co/edit/EPwdv2nEPtaqlwbzrGqB?p=preview ?

Format: DD/MM/YYYY.

Thanks.

Regards.

1 Answer, 1 is accepted

Sort by
1
Svet
Telerik team
answered on 11 May 2018, 12:19 PM
Hi Petr,

We can set the format of the categories by using the [format] property of the [labels] input property of the CategoryAxis. Check the following updated sample plunker demonstrating this feature:

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

public categoryAxis: any = {
    max: new Date(2000, 1, 0),
    maxDivisions: 10,
    labels: {
      format: '{0:dd/MM/yyyy}'
    }
};

I hope this helps.

Regards,
Svetlin
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
Petr
Top achievements
Rank 1
Answers by
Svet
Telerik team
Share this question
or