We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Label template problem with a date field

Thread ID:





121562 Jan 1,2016 01:29 PM UTC Jan 4,2016 12:19 PM UTC JavaScript 1
Tags: ejChart
Jean-Philippe Balivet
Asked On January 1, 2016 01:29 PM UTC


I'm trying to use this label template in a colum chart :

<div id="template" style="display:none">
    <div id="right" style="text-align:center; color: white; font-size: 0.8em">
        <div>#point.y# km</div>

The x axis data is a date and instead of diplaying the date itself or the date label, I see "Nan/Nan" on the chart (I've attached a screen capture).

Here is a sample of my data:
[ { Date: "2015-12-01T17:02:16.458+01:00", Distance: 297, Elevation: 2728, Speed: 297}, ...]

And the chart definition:
    canResize: true,
    title: { text: 'Bike Summary' },
    primaryXAxis: { valueType: 'datetime', labelFormat: "MM/yy", intervalType: 'months' },
    primaryYAxis: { title: { text: "Distance" }, labelFormat: '{value} km', rangePadding: 'round' },
    commonSeriesOptions: { type: 'column', tooltip: { visible: true }, points: [] },
    series: [
         { name: 'Distance', xName: 'Date', yName: 'Distance',
           marker: { dataLabel: { visible: true, textPosition: "bottom", template: "template" } } }

Any idea why the display in incorrect and if it's possible to format the date field in the template (displaying the name of the month) ?

Thanks !

Attachment: Capture_ea311cbb.zip

Sanjith Kesavan [Syncfusion]
Replied On January 4, 2016 12:19 PM UTC

Hi Jean-Philippe,

Thanks for contacting syncfusion support. We have analyzed your query and replicated the scenario in our sample. We can able to reproduce the reported issue. We have logged issue report on this. For your better follow-up we have created the new branched incident in your account.

Please let us know if you have any concern.

Sanjith K.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon