...

View Full Version : Javascript to draw shapes



Jian0203
05-23-2012, 05:16 AM
Hi, I want to ask is it possible for me to use javascript to draw shapes and i wish to insert value into the shapes ?

My javascript will first retrive the data from an excel documents, then based on the fields contents, the data will be sorted into correct categories and draw an arrow to the next step.

Below is a print screen of the result i wish to come out. Is it possible to complete this task by using javascript ?

Senior coders, please give me some advice. Thanks for helping :)

http://img6.imageshack.us/img6/113/printxb.jpg

xelawho
05-23-2012, 05:44 AM
shapes are best drawn with CSS which can then be manipulated by javascript. the border radius property helps with circles and ovals but is not supported by older browsers. This page (http://css-tricks.com/examples/ShapesOfCSS/) has a good choice of the different shapes you can make but like I say, have a look at them in a variety of browsers before deciding on any of them.

Jian0203
05-23-2012, 09:10 AM
So it's impossible to draw shapes and insert value in it using javascript ?

Jian0203
05-23-2012, 11:07 AM
shapes are best drawn with CSS which can then be manipulated by javascript. the border radius property helps with circles and ovals but is not supported by older browsers. This page (http://css-tricks.com/examples/ShapesOfCSS/) has a good choice of the different shapes you can make but like I say, have a look at them in a variety of browsers before deciding on any of them.

Do I have any other option ? I tried to search more information online and i had got canvas and svg but they both don't support IE except IE9.

I wish to complete this just by one script. Is it possible to do so? Or do i have any other option to complete the task shown in the #1 post ?

Thanks for helping.:thumbsup:



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum