Adding charts to a Flask webapp [closed]












1















I created a web app with Flask where I'll be showing data, so I need charts for it.



The problem is that I don't really know how to do that, so I'm trying to find the best way to do that. I tried to use a Javascript charting library on my frontend and send the data to the chart using SocketIO, but the problem is that I need to send that data frequently and at a certain point I'll be having a lot of data, so sending each time a huge load of data through AJAX/SocketIO would not be the best thing to do.



To solve this, I had this idea: could I generate the chart from my backend, instead of sending data to the frontend? I think it would be the better thing to do, since I won't have to send the data to the frontend each time and there won't be a need to generate a ton of data each time the page is loaded, since the chart will be processed on the frontend.



So would it be possible to generate a chart from my Flask code in Python and visualize it on my webpage? Is there a good library do that?










share|improve this question















closed as off-topic by jwodder, EdChum, davidism, lagom, CozyAzure Nov 26 '18 at 2:34


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." – jwodder, EdChum, davidism, lagom, CozyAzure

If this question can be reworded to fit the rules in the help center, please edit the question.

















  • Have a look at Bokeh or Plotly packages, both support graph and charts.

    – gittert
    Nov 25 '18 at 21:09











  • Yes, plotly does but it's hard to use it on Python, since the library had been built for Javascript

    – Jack022
    Nov 25 '18 at 21:17











  • Yeah well, I gave more than 1 suggestion in my first comment ;)

    – gittert
    Nov 25 '18 at 21:27
















1















I created a web app with Flask where I'll be showing data, so I need charts for it.



The problem is that I don't really know how to do that, so I'm trying to find the best way to do that. I tried to use a Javascript charting library on my frontend and send the data to the chart using SocketIO, but the problem is that I need to send that data frequently and at a certain point I'll be having a lot of data, so sending each time a huge load of data through AJAX/SocketIO would not be the best thing to do.



To solve this, I had this idea: could I generate the chart from my backend, instead of sending data to the frontend? I think it would be the better thing to do, since I won't have to send the data to the frontend each time and there won't be a need to generate a ton of data each time the page is loaded, since the chart will be processed on the frontend.



So would it be possible to generate a chart from my Flask code in Python and visualize it on my webpage? Is there a good library do that?










share|improve this question















closed as off-topic by jwodder, EdChum, davidism, lagom, CozyAzure Nov 26 '18 at 2:34


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." – jwodder, EdChum, davidism, lagom, CozyAzure

If this question can be reworded to fit the rules in the help center, please edit the question.

















  • Have a look at Bokeh or Plotly packages, both support graph and charts.

    – gittert
    Nov 25 '18 at 21:09











  • Yes, plotly does but it's hard to use it on Python, since the library had been built for Javascript

    – Jack022
    Nov 25 '18 at 21:17











  • Yeah well, I gave more than 1 suggestion in my first comment ;)

    – gittert
    Nov 25 '18 at 21:27














1












1








1


1






I created a web app with Flask where I'll be showing data, so I need charts for it.



The problem is that I don't really know how to do that, so I'm trying to find the best way to do that. I tried to use a Javascript charting library on my frontend and send the data to the chart using SocketIO, but the problem is that I need to send that data frequently and at a certain point I'll be having a lot of data, so sending each time a huge load of data through AJAX/SocketIO would not be the best thing to do.



To solve this, I had this idea: could I generate the chart from my backend, instead of sending data to the frontend? I think it would be the better thing to do, since I won't have to send the data to the frontend each time and there won't be a need to generate a ton of data each time the page is loaded, since the chart will be processed on the frontend.



So would it be possible to generate a chart from my Flask code in Python and visualize it on my webpage? Is there a good library do that?










share|improve this question
















I created a web app with Flask where I'll be showing data, so I need charts for it.



The problem is that I don't really know how to do that, so I'm trying to find the best way to do that. I tried to use a Javascript charting library on my frontend and send the data to the chart using SocketIO, but the problem is that I need to send that data frequently and at a certain point I'll be having a lot of data, so sending each time a huge load of data through AJAX/SocketIO would not be the best thing to do.



To solve this, I had this idea: could I generate the chart from my backend, instead of sending data to the frontend? I think it would be the better thing to do, since I won't have to send the data to the frontend each time and there won't be a need to generate a ton of data each time the page is loaded, since the chart will be processed on the frontend.



So would it be possible to generate a chart from my Flask code in Python and visualize it on my webpage? Is there a good library do that?







python flask data-visualization






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 26 '18 at 0:31









Dinko Pehar

1,5333425




1,5333425










asked Nov 25 '18 at 19:22









Jack022Jack022

11211




11211




closed as off-topic by jwodder, EdChum, davidism, lagom, CozyAzure Nov 26 '18 at 2:34


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." – jwodder, EdChum, davidism, lagom, CozyAzure

If this question can be reworded to fit the rules in the help center, please edit the question.







closed as off-topic by jwodder, EdChum, davidism, lagom, CozyAzure Nov 26 '18 at 2:34


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." – jwodder, EdChum, davidism, lagom, CozyAzure

If this question can be reworded to fit the rules in the help center, please edit the question.













  • Have a look at Bokeh or Plotly packages, both support graph and charts.

    – gittert
    Nov 25 '18 at 21:09











  • Yes, plotly does but it's hard to use it on Python, since the library had been built for Javascript

    – Jack022
    Nov 25 '18 at 21:17











  • Yeah well, I gave more than 1 suggestion in my first comment ;)

    – gittert
    Nov 25 '18 at 21:27



















  • Have a look at Bokeh or Plotly packages, both support graph and charts.

    – gittert
    Nov 25 '18 at 21:09











  • Yes, plotly does but it's hard to use it on Python, since the library had been built for Javascript

    – Jack022
    Nov 25 '18 at 21:17











  • Yeah well, I gave more than 1 suggestion in my first comment ;)

    – gittert
    Nov 25 '18 at 21:27

















Have a look at Bokeh or Plotly packages, both support graph and charts.

– gittert
Nov 25 '18 at 21:09





Have a look at Bokeh or Plotly packages, both support graph and charts.

– gittert
Nov 25 '18 at 21:09













Yes, plotly does but it's hard to use it on Python, since the library had been built for Javascript

– Jack022
Nov 25 '18 at 21:17





Yes, plotly does but it's hard to use it on Python, since the library had been built for Javascript

– Jack022
Nov 25 '18 at 21:17













Yeah well, I gave more than 1 suggestion in my first comment ;)

– gittert
Nov 25 '18 at 21:27





Yeah well, I gave more than 1 suggestion in my first comment ;)

– gittert
Nov 25 '18 at 21:27












1 Answer
1






active

oldest

votes


















2














Try to use dash is a python library for web charts






share|improve this answer
























  • Yeah, Dash is good, only problem is that at a certain point i'll need to have authentication on my app, and Dash only provides basic authentication

    – Jack022
    Nov 25 '18 at 22:18











  • I didn't work so much with Dash but for more informations you can look on youtube( on setdex) .He is explaining very well how is working.That guy has 12 tutorials about dash

    – Bogdan Bibina
    Nov 25 '18 at 22:26













  • Yeah, i actually discovered Dash 1 year ago from Sentdex :)

    – Jack022
    Nov 25 '18 at 22:31











  • Please vote if you consider that i helped you

    – Bogdan Bibina
    Nov 25 '18 at 22:36




















1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









2














Try to use dash is a python library for web charts






share|improve this answer
























  • Yeah, Dash is good, only problem is that at a certain point i'll need to have authentication on my app, and Dash only provides basic authentication

    – Jack022
    Nov 25 '18 at 22:18











  • I didn't work so much with Dash but for more informations you can look on youtube( on setdex) .He is explaining very well how is working.That guy has 12 tutorials about dash

    – Bogdan Bibina
    Nov 25 '18 at 22:26













  • Yeah, i actually discovered Dash 1 year ago from Sentdex :)

    – Jack022
    Nov 25 '18 at 22:31











  • Please vote if you consider that i helped you

    – Bogdan Bibina
    Nov 25 '18 at 22:36


















2














Try to use dash is a python library for web charts






share|improve this answer
























  • Yeah, Dash is good, only problem is that at a certain point i'll need to have authentication on my app, and Dash only provides basic authentication

    – Jack022
    Nov 25 '18 at 22:18











  • I didn't work so much with Dash but for more informations you can look on youtube( on setdex) .He is explaining very well how is working.That guy has 12 tutorials about dash

    – Bogdan Bibina
    Nov 25 '18 at 22:26













  • Yeah, i actually discovered Dash 1 year ago from Sentdex :)

    – Jack022
    Nov 25 '18 at 22:31











  • Please vote if you consider that i helped you

    – Bogdan Bibina
    Nov 25 '18 at 22:36
















2












2








2







Try to use dash is a python library for web charts






share|improve this answer













Try to use dash is a python library for web charts







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 25 '18 at 22:08









Bogdan BibinaBogdan Bibina

786




786













  • Yeah, Dash is good, only problem is that at a certain point i'll need to have authentication on my app, and Dash only provides basic authentication

    – Jack022
    Nov 25 '18 at 22:18











  • I didn't work so much with Dash but for more informations you can look on youtube( on setdex) .He is explaining very well how is working.That guy has 12 tutorials about dash

    – Bogdan Bibina
    Nov 25 '18 at 22:26













  • Yeah, i actually discovered Dash 1 year ago from Sentdex :)

    – Jack022
    Nov 25 '18 at 22:31











  • Please vote if you consider that i helped you

    – Bogdan Bibina
    Nov 25 '18 at 22:36





















  • Yeah, Dash is good, only problem is that at a certain point i'll need to have authentication on my app, and Dash only provides basic authentication

    – Jack022
    Nov 25 '18 at 22:18











  • I didn't work so much with Dash but for more informations you can look on youtube( on setdex) .He is explaining very well how is working.That guy has 12 tutorials about dash

    – Bogdan Bibina
    Nov 25 '18 at 22:26













  • Yeah, i actually discovered Dash 1 year ago from Sentdex :)

    – Jack022
    Nov 25 '18 at 22:31











  • Please vote if you consider that i helped you

    – Bogdan Bibina
    Nov 25 '18 at 22:36



















Yeah, Dash is good, only problem is that at a certain point i'll need to have authentication on my app, and Dash only provides basic authentication

– Jack022
Nov 25 '18 at 22:18





Yeah, Dash is good, only problem is that at a certain point i'll need to have authentication on my app, and Dash only provides basic authentication

– Jack022
Nov 25 '18 at 22:18













I didn't work so much with Dash but for more informations you can look on youtube( on setdex) .He is explaining very well how is working.That guy has 12 tutorials about dash

– Bogdan Bibina
Nov 25 '18 at 22:26







I didn't work so much with Dash but for more informations you can look on youtube( on setdex) .He is explaining very well how is working.That guy has 12 tutorials about dash

– Bogdan Bibina
Nov 25 '18 at 22:26















Yeah, i actually discovered Dash 1 year ago from Sentdex :)

– Jack022
Nov 25 '18 at 22:31





Yeah, i actually discovered Dash 1 year ago from Sentdex :)

– Jack022
Nov 25 '18 at 22:31













Please vote if you consider that i helped you

– Bogdan Bibina
Nov 25 '18 at 22:36







Please vote if you consider that i helped you

– Bogdan Bibina
Nov 25 '18 at 22:36







Popular posts from this blog

Create new schema in PostgreSQL using DBeaver

Deepest pit of an array with Javascript: test on Codility

Fotorealismo