开发者

How to draw diagram for display in HTML page?

I was wondering, without using images, how can I show a diagram in an html page? From a 3rd party, I am getting data with coordinates, labels, etc. I need to convert this into something graphic. I suppose SVG is doable but IE has problems with SVG in IE < 9... or so I read. What about canvas? Problems?

Any other options out there?

And, to make things more complicated, at some point, users should also be able to manipulate the diagram. That is, move 'ob开发者_JAVA技巧jects' within the diagram around to make it look 'better.'

Thanks


both SVG and canvas are options, but you will probably want to just use a diamgram javascript library without having to write the SVG or canvas code yourself, like raphael, http://raphaeljs.com/


I'd suggest checking out a few of the existing js libraries for drawing graphs. I've listed a bunch of them here.

These libraries have already solved the crossbrowser issues for you, and are usually compatible with all browsers down to IE6.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜