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. Image for the cookie policy date

Date Time on Y Axis

Hi Team,
I am new in using the Syncfusion Chart and have created it using the code below. However the label format for the Y axis only displays "MMM dd" instead of the actual Month and date.
Also if I uncomment the tooltip under commonSeriesOptions, it would cause a Javascript runtime error: Bad number format specified: M. I am using 13.3.0.12 version. I also tried it in the most current version 13.3.0.7 in the JS playground but still had the same error.
$("#container").ejChart(
{
//Initializing Primary X Axis
primaryXAxis:
{
title: { text: 'Facilities' },
},
//Initializing Primary Y Axis
primaryYAxis:
{
range: {min: new Date(2015, 0, 1), max: new Date(2015,11,31), interval: 1},
intervalType: 'Months',
valueType: 'datetime',
labelFormat: 'MMM dd',
title: { text: 'Year 2015' }
},
//Initializing Common Properties for all the series
commonSeriesOptions:
{
type: 'bar',
enableAnimation: true,
//tooltip: { visible: true, format: "#series.name# - #point.x#
Date : #point.y#" },
marker:
{
dataLabel:
{
font: { size:'11px',fontFamily:'Segoe UI',fontStyle:'Normal',fontWeight:'regular'},
textPosition: 'top',
angle: -20,
visible: true
},
}
},
//Initializing Series
series:
[
{
points: [{ x: "Faci 1", y: new Date(2015,7,5) }, { x: "Faci 2", y: new Date(2015, 11, 17) }
, { x: "Faci 3", y: new Date(2015,6,8) }, { x: "Faci 4", y: new Date(2015, 10,7) },
{ x: "Faci 5", y: new Date(2015,10,8) }, { x: "Faci 6", y: new Date(2015,9,8)}
],
name: 'Part A'
},
{
points: [{ x: "Faci 1", y: new Date(2015, 4, 8) }, { x: "Faci 2", y: new Date(2015, 4, 6) }
, { x: "Faci 3", y: new Date(2015,7,2)}, { x: "Faci 4", y: new Date(2015,9,3) },
{ x: "Faci 5", y: new Date(2015,9,7)}, { x: "Faci 6", y: new Date(2015,9,1) }
],
name: 'Part B'
}
],
load:"loadTheme",
canResize:true,
showTooltip: true,
title:{text: 'Billing'},
size: { height: "600" },
legend: { visible: true, position: 'right', alignment:"near" }
});

Please advice. Thanks

1 Reply

SK Sanjith Kesavan Syncfusion Team December 8, 2015 12:38 PM UTC

Hi Lory,

Sorry for the inconvenience caused. We have analyzed your code and code example. While analyzing your code example we found that you are binding datetime value for the Y-Axis. This causes the reported issue. Currently we are not having support for setting datetime value for Y-Axis. So we have logged feature request on this. And also we have created the branch incident under your account for the better follow-up.

Please let us know if you have any concern.

Regards,
Sanjith K.

Loader.
Up arrow icon