We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpIntegration › Processing 1.0 with MySQL - Creation of bar graphs
Page Index Toggle Pages: 1
Processing 1.0 with MySQL - Creation of bar graphs (Read 1569 times)
Processing 1.0 with MySQL - Creation of bar graphs
Mar 13th, 2009, 9:57pm
 
Hi everyone! Smiley

I'm completely new here. I'm currently a student at the Waterford Institute of Technology in Waterford, Ireland. As a smaller part of a year long college project, I am seeking to connect Java Processing with MySQL. I understand this is possible through SQL Library.

I'm wondering if anyone here as previous experience with taking data that is in a database table, for example, and turning this data into a bar graph in processing?

My project involves monitoring nodes across a network, and sending data in relation to performance and availability to a MySQL database table for a particular node(This part is fine). I wish to connect processing to this database table and turn this data from row data to bar graph data to create reports such as availability and performance reports.

I'm just brainstorming at the moment and trying to get a couple of ideas together. Does anyone have any tips on how the data should be formatted or how this process could be achieved?

I apreciate your help in advance. I'm trying to take in as much as I can with processing in the timeframe that I've been given.

Regards,

Dave.
Re: Processing 1.0 with MySQL - Creation of bar gr
Reply #1 - Mar 17th, 2009, 9:12am
 
i think to get an answer you have to be more specific.

how does your data look like?

F
Re: Processing 1.0 with MySQL - Creation of bar gr
Reply #2 - Mar 17th, 2009, 3:03pm
 
Hi there,

My data will look like the following:

Alert ID, Alert start time, Alert end time. Each alert in the table will signify a loss in availability and I wish to create a report in processing to show overall availability. Maybe I can set it up to assume that availability is 100% by default, and it takes off availability by subtracting the total alert downtime in the database table. I have to find a way of converting info in alert times to percentages and reflecting this on a bar graph in processing.

I wish for the graph to have monday - sunday on the x-axis, and node availability (%) on the y-axis.
Re: Processing 1.0 with MySQL - Creation of bar gr
Reply #3 - Mar 17th, 2009, 5:48pm
 
set a timeframe, say a day. sum up how long the node was down that day. (downtime / timeframe) * 100 will give you percent. now you have % per day and can go ahead and draw your graph ..
Page Index Toggle Pages: 1