Plot a date in x-axis in dhtmlxChart



while trying to plot the date in x-axis

I tried implementing the below method:
return dhtmlx.Date.date_to_str("%d/%m/%Y")(obj.$unit);
return obj.$unit.valueOf() == (new Date(2016,1,1)).valueOf()?"#737373":"#cfcfcf"
return dhtmlx.Date.str_to_date("%d/%m/%Y")(obj.date);
start:new Date(2016,7,1),
end:new Date(2016,7,20),
return dhtmlx.Date.add(d, 1, “day”);

Uncaught TypeError: date.split is not a function is the error displayed. I am not able to understand the reason for this error

and when I gave the end date lesser than start date, I am able to view the graph but no values on x-axis and the values are not being plotted.
Kindly help me display the values in x-axis and display the line’s in x-axis.


Could someone please reply


Apparently DhtmlxChart acceps inpput only as “02/07/2016” the quotes are important.


Unfortunately the problem cannot be reproduced locally.
Your code works well for me.

If the problem still occurs for you please, share with a demo link or provide with a complete demo, where the problem can be reconstructed.


I was able to fix it when I converted date to String I didn’t add Quotes, once the date input was displayed in quotes, it worked.