logo

Fri 10 May 2002's Blog

Coool..I know, I know, I said I'd shut up about SVG. Have a look at this though. A dynamic, interactive bar-chart built on live data from a Domino view. Watch the face of your colleagues as you show them this, adding a few more documents to the view and watching the bars grow...

How does it work? An embed element of type "image/svg+xml" is added to a form. Its source (src) being a Java servlet that computes and returns all the required SVG. Believe it or not, it's not actually that complicated when you've got to know a bit about the SVG elements involved. Honest.

Okay, so I'm teasing you now. I know what you're thinking - where's the code you fool? Show me the code! Hmmmm, not sure it's ready yet. I've been using Ethereal to track how long it takes the servlet to run with varying amounts of documents in the view. In the shot below you can see that request 189 from the browser is for the servlet "embed" at 0.321s and then the next interaction is the server's response at 0.773s - a delay of about 0.4 seconds. Nothing to worry about, I know, but this was with only a few hundred documents. Raise it to a few thousand and the delay is more like 4 seconds.

Sloooow..

If anybody has ideas about performance gains then they are welcome to get in touch and we can work on this together. One idea I do have is that it would be better to use something like the Xerces/Xalan combination to parse a view's XML in to SVG and send that to the browser rather than having to "while loop" a whole view....

[Edit] Forgot to mention that what you can't see from this image is that the chart is interactive. Move the mouse over the bars and extra information appears about each section. Also fairly easy to do if you understand the idea of DOMs. Think DSVG.

About This Page

Written by Jake Howlett on Fri 10 May 2002

Share This Page

# ( ) '

Comments

Commenting is disabled on this entry.

Let's Get Social


About This Website

CodeStore is all about web development. Concentrating on Lotus Domino, ASP.NET, Flex, SharePoint and all things internet.

Your host is Jake Howlett who runs his own web development company called Rockall Design and is always on the lookout for new and interesting work to do.

You can find me on Twitter and on Linked In.

Read more about this site »

More Content