You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to plotkit
I am looking to create a strip-chart (history of ping times to a node)
using plotkit.
It is mostly working, but the y-labels look strange.
On load, I have a simple line chart that I re-draw into the same
canvas every second.
I use plotter.clear() to clear the plot before doing the next
render(). [This does not seem necessary but it is there].
The graphs all update nicely. But, the axes labels get darker and
darker with each refresh and the text gets a bit grainy around the
numbers. I suspect that the labels are not cleared properly between
refreshes.
Is there something I should do to make sure that the layout/canvas is
cleared before the next render cycle?
I'm a newbie so please forgive me if this is obvious.
Thanks in advance,
Charlie
Charlie
unread,
Jun 28, 2008, 9:45:12 PM6/28/08
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to plotkit
Nevermind on this question. I did a plotter.clear() on a new
instance that was connected to the same canvas. Once I reused the
original plotter, it worked fine.
Per Cederberg
unread,
Jun 29, 2008, 3:01:27 AM6/29/08
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to plo...@googlegroups.com
The labels are not actually placed in the canvas (since canvas doesn't support text), but instead as absolutely positioned div elements above it.
Looking at the canvas.js code, it looks like all the generated divs are removed in the clear() method. But perhaps you could try with a bit of Firebug debugging to see what happens?