One of the advantages of Flash/Flex is that you can use vector graphics (SVG), which is nice. I did a bit of searching around and came across this Javascript vector graphic
Give a look to Cake, Processing.js and jQuery SVG Integration Plugin.
Also check the Canvas element reference.