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
close icon

Handling null or empty values in Date Chart

Hi Team,

I have a chart that has the following y-axis setting below and it is showing an error of "Bad number format specifier m ". I suspect that it's due to some records that doesn't have dates. How should empty or null data be handled? Thanks


//Initializing Primary Y Axis
               primaryYAxis:
               {
                   range: { min: new Date(new Date().getFullYear(), 0, 1), max: new Date(new Date().getFullYear(), 11, 31), interval: 1 },
                   intervalType: 'Months',
                   valueType: 'datetime',
                   labelFormat: 'MMM dd',
                   title: { text: 'Year' }
               },
  //Initializing Common Properties for all the series
               commonSeriesOptions:
               {
                   type: 'bar',
                   enableAnimation: true,
                   tooltip: { visible: true, format: "#series.name# - #point.x# <br/> Date : #point.y#" },
                   marker:
                   {
                       dataLabel:
                       {
                           font: { size: '10px', fontFamily: 'Segoe UI', fontStyle: 'Normal', fontWeight: 'regular' },
                           textPosition: 'top',
                           angle: -90,
                           visible: false
                       },
                   }
               },





1 Reply

SK Saravana Kumar Kanagavel Syncfusion Team May 24, 2016 12:44 PM UTC

 
Thank you for using Syncfusion products. 
 
We have analyzed your query and the sample code provided by you, we noticed you have set datetime type for Y-Axis(vertical axis) and thus the issue, chart doesn’t support datetime type for Y-Axis. Also we noticed that you have used the Bar chart type in that case the Y-Axis will be Horizontal. Do you want to show the datetime value horizontally or vertically? 
 
Can you please let us know your exact requirement, so that we can provide you a solution sooner.  
  
Regards, 
Saravana Kumar K. 


Loader.
Live Chat Icon For mobile
Up arrow icon