Page 1 of 1

Flask HighChart from MongodB

Posted: Mon Sep 04, 2017 1:47 pm
by niceseb38
https://jsfiddle.net/larsac07/t0r8qz9p/

This uses hardcoded start and end date, but have Python-Flask with Mongodb read in via pandas

import pandas as pd
from pymongo import MongoClient
client = MongoClient()
db = client.get_database("testing_flask")
collection = db.my_collections
df = pd.DataFrame(list(collection.find()))

df
_id date_real name
0 59a2ea17aa4bb088e4385d35 2017-06-08 ProjectX GUI Preview
1 59a2ea17aa4bb088e4385d36 2017-07-26 ProjectX GUI Evaluation
2 59a2ea17aa4bb088e4385d37 2017-08-09 ProjectX GUI Customer
3 59a2ea17aa4bb088e4385d38 2017-06-08 ProjectX ChipZ Preview
4 59a2ea17aa4bb088e4385d39 2017-05-04 ProjectX ChipZ FPGA
5 59a2ea17aa4bb088e4385d3a 2017-06-29 ProjectX ChipZ Initial
6 59a2ea17aa4bb088e4385d3b 2017-06-08 LakeA GUI Preview
7 59a2ea17aa4bb088e4385d3c 2017-07-26 LakeA GUI Evaluation
8 59a2ea17aa4bb088e4385d3d 2017-08-09 LakeA GUI Customer
How to extract my df and replace the hardcoded example with these dynamic data from MongodB
i.e 'date_real' and 'name' specifically

Thanks

Re: Flask HighChart from MongodB

Posted: Mon Sep 04, 2017 1:49 pm
by MisterNeutron
Posted in the wrong forum section.

Re: Flask HighChart from MongodB

Posted: Mon Sep 04, 2017 2:14 pm
by niceseb38
Hi @MisterNeutron, which section should I remove to, thanks

Re: Flask HighChart from MongodB

Posted: Mon Sep 04, 2017 2:20 pm
by MisterNeutron
Well, this is the section for Highslide JS, not Highcharts. Maybe one of the moderators will straighten things out. Threads in the wrong place tend to get ignored, especially since there's no official support for Highslide JS any longer.

I've flagged it for the mods, so just let it ride for the moment.

Re: Flask HighChart from MongodB

Posted: Wed Sep 06, 2017 10:28 pm
by MisterNeutron
Looks like no one's paying attention. I suggest you re-post your question in the Highcharts section, above.