|
@ -19,3 +19,9 @@ function draw_roulette(ctx, w, h, datalist){ |
|
|
lastend += arcsector; |
|
|
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); |
|
|