Raphael is a Javascript library used to draw vector images on webpages. It uses SVGW3C recommendation standards and VML as the basis for creating images, you can use JavaScript to operate DOM to easily create various complex bar charts, pie charts, graphs, and other charts. Next, let's take a look at these charts.
RaphaelIs a Javascript library used to draw vector images on a webpage. It uses the SVG W3C recommendation standard and VML as the basis for creating graphics. You can use JavaScript to operate DOM to easily create various complex charts, such as bar charts, pie charts, and curves, you can also draw images of any shape and perform complex operations such as cropping and rotating charts or images.
Rapha rjlIs a cross-browser vector graphics library. Currently, the supported browsers include Firefox 3.0 +, Safari 3.0 +, Chrome 5.0 +, Opera 9.5 +, and Internet Explorer 6.0 +.
How to use it?
Introduce the raphael. js file to the page and draw any vector image:
The Code is as follows:
// Create a canvas with a width of 320 and a height of 200 in coordinates ()
Var paper = Raphael (10, 50,320,200 );
// Draw a circle with a radius of 10 in the coordinate (x = 50, y = 40)
Var circle = paper. circle (50, 40, 10 );
// Fill the drawn circle with red (# f00)
Circle. attr ("fill", "# f00 ");
// Set the color of the brush to white
Circle. attr ("stroke", "# fff ");