Invient Charts and MySQL

Hi:

Is there any example code on how to use Invient Chart add-on connected to a MySQL table?

regards,

Hugo

I don’t think there is such an example… but if you do create a container that does it, please send it to the invient guys, as this would make it much more cool. :slight_smile: As far as I’ve used it at least you need to set the seriespoints manually (as in their demo example). So thus you would use it in this way 1. Use a SQLContainer/JPAContainer/HibernateContainer to read data from your MySQL database 2. Push that data to the seriespoints 3. profit! OR write a wrapper for the invientcharts class that sets the seriespoints for you from the container directly.

Fredrik

Thank you for your answer Fredrik…

I’ll definitely try to do that, but I just started using invient charts, and I’m having problems with the “getpoints” method. I´m trying to replicate the add-on example, and even importing every necessary invientchart library I still cannot make it work, as I asked in thread 423011 (https://vaadin.com/forum/-/message_boards/view_message/423011)…

Do you now how can I deal with this??

regards,

Hugo

I think the Invient guys have got this covered in the thread you mentioned. Good luck in your hacking! :wink:

Hi:

This question may seem outdated for this thread, but, how do you do with step 2 of your answer: “Push that data to the seriespoints”?

regards,

Hugo

In order to push data to the seriespoints, you will need to use ICEPush add-on. If your requirement is to just update graph each second then you can use ProgressBar component to achieve the same.
The online demo includes a graph labeled “Updating each second” under “Spline” category. However, it does not work because GAE does not allow Threads. The source code of the same demo is available as part of the InvientCharts archive.

Cheers