View Single Post
Old 02-12-2011, 11:36 PM   PM User | #1
Ing
New Coder

 
Join Date: Feb 2011
Location: Los Angeles
Posts: 13
Thanks: 10
Thanked 0 Times in 0 Posts
Ing is an unknown quantity at this point
Multiple layers with the Canvas tag

Hi. I'm writing a script that graphs data in different colors and shapes and I'm encountering two problems:

(1) I can't specify different colors for the graph I'm rendering. If I use fillStyle="red"; then the entire chart becomes red. It seems to use the last color specified as the color for everything on the chart.

(2) The shapes are overlapping in strange ways. The fills are not covering the lines of shapes behind them so it's unclear which shape is in front and which is behind. It's like they aren't being treated as separate shapes but instead one shape where boundaries are unclear. I don't know how else to explain it.

I'm hoping there is some way to put each shape in its own layer. Would I have to use DIV IDs for that or is there a way to keep it all in the script so it's more scalable?

Last edited by Ing; 02-13-2011 at 11:33 PM.. Reason: resolved
Ing is offline   Reply With Quote