Re: [TurboGears] Re: Linecharts and TG2

21 views
Skip to first unread message
Message has been deleted
Message has been deleted

Alessandro Molina

unread,
Nov 21, 2015, 12:07:08 PM11/21/15
to TurboGears
Pandas is a data transformation and analysis library, you can use it with TG without much problems.
I have been using pandas and scikit-learn with TG projects in the past, so you can freely mix them.

On the iPython part, I don't what you intend as iPython is actually an alternative python shell, so it's not much related to web development.

On Sat, Nov 21, 2015 at 5:37 PM, Robert James Liguori <glies...@gmail.com> wrote:
Do the Pandas and iPython frameworks work hand in hand with TG2 and ToscaWidgets... or are these separate frameworks?

--
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To unsubscribe from this group and stop receiving emails from it, send an email to turbogears+...@googlegroups.com.
To post to this group, send email to turbo...@googlegroups.com.
Visit this group at http://groups.google.com/group/turbogears.
For more options, visit https://groups.google.com/d/optout.

Alessandro Molina

unread,
Nov 21, 2015, 12:11:49 PM11/21/15
to TurboGears
Sorry, missed the charts part.

In the past I have been using http://c3js.org/ and https://developers.google.com/chart/ and mixed them with http://www.ractivejs.org/ to provide data-binding for the charts. They are strictly JS libraries, so it doesn't really matter which framework you use.

You can off course use them as TW2 widgets if that helps you (just put the chart code as the template parameter of a widget and you are ready to go), I know there are widgets for plotting already done for TW2 around ( like https://github.com/toscawidgets/tw2.jqplugins.jqplot ) but never tried them.

Craig Small

unread,
Jan 21, 2016, 6:40:03 AM1/21/16
to turbo...@googlegroups.com
On Sun, Nov 22, 2015 at 3:26 AM Robert James Liguori <glies...@gmail.com> wrote:
What's the preferred interface with creating line charts with TG2?  Is it ToscaWidgets?

I'm using ToscaWidgets. Initially I was using the jqplot that Alessandro mentioned but I found them a bit limiting and they didn't fit with the look I was going for.

Alessandro is right, find the JS library that you think will do what you want for starters. I'm using chart.js but there are plenty out there. The next thing is, you got your data in python you know how you want to do your chart in JS, how to get the data to the chart?

For that I use the Toscawidgets core. It's basically something that ensures the relevant javascript and CSS are loaded and I have a html template with the values plugged into it. I like having the python object because I have a generic pie chart object, but then have a new class for status pie (think of red,yellow,green status lights) which inherits the generic one but has different colours.

 - Craig

--
Craig Small (@smallsees)   http://enc.com.au/       csmall at : enc.com.au
Debian GNU/Linux           http://www.debian.org/   csmall at : debian.org
GPG fingerprint:        5D2F B320 B825 D939 04D2  0519 3938 F96B DF50 FEA5
Reply all
Reply to author
Forward
0 new messages