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

Bar chart not plotted properly

Hello,
Please see the attachment.
syncfusion bar chart yearly with range navigator not working properly.

Attachment: BarChart_d4facfcd.rar

3 Replies

PR Praveen Syncfusion Team April 13, 2015 12:33 PM UTC

Hi Kalpa serashiya,

We have analyzed your sample and we found that you are setting range for primaryXaxis in below format.

range: {
min: new Date(2007), max: new Date(2008),
interval: 1
},

Using new Date(number), creates a new date object as zero time plus the number. So the range falls from “Jan 1 1970”.
If you want to create date object with specified date and time. Please pass the year in string as below.

range: {
min: new Date("2007"), max: new Date("2008"),
interval: 1
},
For your convenience we are modified the sample. Find the modified sample under the following location

Sample:
BarChart.zip



Please let us know if you need more information.

Thanks,
Praveenkumar.



PR Praveen Syncfusion Team April 13, 2015 12:33 PM UTC

Hi Kalpa serashiya,

We have analyzed your sample and we found that you are setting range for primaryXaxis in below format.

range: {
min: new Date(2007), max: new Date(2008),
interval: 1
},

Using new Date(number), creates a new date object as zero time plus the number. So the range falls from “Jan 1 1970”.
If you want to create date object with specified date and time. Please pass the year in string as below.

range: {
min: new Date("2007"), max: new Date("2008"),
interval: 1
},
For your convenience we are modified the sample. Find the modified sample under the following location

Sample:
BarChart.zip



Please let us know if you need more information.

Thanks,
Praveenkumar.



PR Praveen Syncfusion Team April 13, 2015 12:33 PM UTC

Hi Kalpa serashiya,

We have analyzed your sample and we found that you are setting range for primaryXaxis in below format.

range: {
min: new Date(2007), max: new Date(2008),
interval: 1
},

Using new Date(number), creates a new date object as zero time plus the number. So the range falls from “Jan 1 1970”.
If you want to create date object with specified date and time. Please pass the year in string as below.

range: {
min: new Date("2007"), max: new Date("2008"),
interval: 1
},
For your convenience we are modified the sample. Find the modified sample under the following location

Sample:
BarChart.zip



Please let us know if you need more information.

Thanks,
Praveenkumar.


Loader.
Live Chat Icon For mobile
Up arrow icon