The issue is highchart is not able to render dates which is stored in monogdb. My date format is 2019-03-15T12:58:02. And below is the code what I am rendering in my javascript/highchart
Below is the date which is being stored in my mongodb
{'setnumlow': 6.0, 'setnum': 11.8, 'setnumdate': u'2019-03-15T12:58:02', 'setnumhigh': 18.0}
And My javascript code is shown below:
var ranges = [
{% for i in mobu %}
[{{ i.setnumdate }},{{ i.setnumlow }},{{ i.setnumhigh }}],
{% endfor %}
],
My knowledge on javascript/highchart is less, so I am not sure how should I render it. Is there a way to convert the date to javascript format (on which highchart understands)
My flask code
for i in set2:
mobu.append({
"setnumdate":(i['date']),
"setnum":(i['setnum']),
"setnumhigh":(i['setnumhigh']),
"setnumlow":(i['setnumlow'])
})
Below is the output which I am getting from "Inspect Element"
So without touching the mongodb database, how can i convert the date to understandable javascript/highchart format