|
|
@ -18,4 +18,10 @@ function draw_roulette(ctx, w, h, datalist){ |
|
|
|
ctx.closePath(); |
|
|
|
lastend += arcsector; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
var datalist= new Array(35, 25, 20, 12, 7, 1); |
|
|
|
var colist = new Array('blue', 'red', 'green', 'orange', 'gray', 'yellow'); |
|
|
|
var canvas = document.getElementById("roulette"); |
|
|
|
var rendu = canvas.getContext('2d'); |
|
|
|
draw_roulette(rendu, canvas.width, canvas.height, datalist); |
|
|
|