pChart 2.x forum
http://wiki.pchart.net/forum/

Plot a single point on a line graph indicating an event
http://wiki.pchart.net/forum/viewtopic.php?f=1&t=39808
Page 1 of 1

Author:  drdamnit [ Thu Jun 06, 2013 3:43 pm ]
Post subject:  Plot a single point on a line graph indicating an event

I have a graph of ping times to a server. If they exceed a certain number of milliseconds (>200ms) it generates an alarm.

The line graph works great, but I can't figure out how to add a single point to the graph indicating an alarm.

The X axis data is displayed with AXIS_FORMAT_CUSTOM to indicate the number of "minutes ago" so that we have an hour's worth of data to look at. Those values are generated from the timestamp, which is a database.

The Y axis is ping times in ms.

So, when i have a ping time of 740ms that occured at timestamp, T, which was 45 minutes ago, I want to display a red dot (or even better a picture) at that point.

Please see attached screenshot.

PS. The red line at 200ms was achieved using addPoints(200,"Ping") every time I added a value for the red line. It doesn't represent data, it was how I put the 200ms limit into the chart.

Attachments:
File comment: The graph I have with a mock up of what I am trying to create.
6-6-2013 11-34-51 AM.jpg
6-6-2013 11-34-51 AM.jpg [ 90.05 KiB | Viewed 5756 times ]

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/