javascript - Issue on Drawing Points(Circles) Along a Specific Line -
Can you please take a look at this example and tell me how I can get point value from an existing array Display this example as Then I have 5 element array: and thanks In which you move in the chart to the right, as prices increase. A common example of the magnitude chart is the relator scale that measures the seismic activity. Here is an example of the data value plotted on a charts rising from a magnitude of 10x for each color area on the chart. A demo: Example Code: data [] and point as the dot on top of each row?
var data = [200, 20820, 32, 99 99955, 7580]; There are 5 lines in the form of
Line1, Line2, Line3, Line4, and Line5 , therefore the value for Line1 = 200 and the value of Line5 would be 7850. I know there are some things that are out of this thing like Highcharges. Jays but since I have a large number of units from Decimal for each line, I have to do a new rebirth.
$ (function () {var c = document.getElementById ("myCanvas"); var ctx = c.getContext ("2d"); var data = [200, 20820, 32, 99 9955, 7580]; ctx.beginPath (); ctx.moveTo (200, 200); ctx.lineTo (200, 50); ctx.moveTo (200, 200); ctx.lineTo (342, 154); ctx. MoveTo (200, 200); ctx.lineTo (288, 321); ctx.moveTo (200, 200); ctx.lineTo (112, 321); ctx.moveTo (200, 200); ctx.lineTo (59, 154) Ctx.stroke (); ctx.font = "12px aerial"; ctx.fillText ("line 1", 185, 30); ctx.fillText ("line2", 360, 155); ctx.fillText (" Line 3 ", 300, 355); ctx.fillText (" row 4 ", 90, 355); ctx.fillText (" row5 ", 10, 155);});
& lt ;; Doctype html & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; Link rel = "stylesheet" type = "text / css" media = "all" href = "css / reset.css" /> & Lt ;! - Reset CSS - & gt; & Lt; Style & gt; Body {background color: ivory; } Canvas {boundary: 1 px solid red;}
Comments
Post a Comment