how color a line in canvas

  • Thread starter balakrishnan.dinesh
  • Start date
B

balakrishnan.dinesh

Hi Frnds,

I want to know about, how to use color in canvas in
javascript.
Bcoz im using canvas in javascript for plotting line graph,

I have plotted the linegraph, now i need to differentiate the
values, so i want to give different color for each line plotted. But i
dont know how to color a line ,

Can anyone tell me the solution?

Another i want to know, Can i ask these canvas doubts in this
javascript group. If i should ask these doubts means , where should im
ask?

Thanks&Rgrds..
Dinesh...
 
E

Evertjan.

wrote on 07 sep 2006 in comp.lang.javascript:
Hi Frnds,

I want to know about, how to use color in canvas in
javascript.
Bcoz im using canvas in javascript for plotting line graph,

Please write complete words, this is not SMS, there is room enough.

I have plotted the linegraph, now i need to differentiate the
values, so i want to give different color for each line plotted. But i
dont know how to color a line ,

I already answered your question here:
Subject: Re: how to simple line graph throygh CANVAS
Date: Wed, 06 Sep 2006 08:25:55 +0200
Newsgroups: xs4all:comp.lang.javascript

wrote on 06 sep 2006 in comp.lang.javascript:
Im want to draw a linegraph dynamically through canvas.
So I want a sample line graph code and how to draw lines
between pixels.

Can anyone give me some sample code on canvas for these
things
[...]

If you mean your window by canvas:

<http://devrijehuisarts.org/test/jsgraph.asp>


So please study the code, and you will see how the lines are coloured.
Can anyone tell me the solution?

There is no "the" solution, there are many ways to Rome, start by
studying Javascript and CSS.
Another i want to know, Can i ask these canvas doubts in this
javascript group. If i should ask these doubts means , where should im
ask?

"Canvas" is not a word used in html, etc. Html in a browser is not a
paint programme.

You can ask about colours in a CSS NG, and about Javascript in this one,
but show first that you tried it yourself by showing some code.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top