Manage Learn to apply best practices and optimize your operations.

How to create a dynamic SVG graph using a Lotus Notes agent

Scalable Vector Graphic (SVG) is a language for describing two-dimensional graphics and graphical applications in XML. In this tip, member William Beh explains how to use a Lotus Notes agent to generate a dynamic SVG for a Web site.

Scalable Vector Graphic (SVG) is a language for describing two-dimensional graphics and graphical applications in XML. It can be used to create dynamic graphs for a Web site. You can use the Lotus Notes agent in this tip to generate a dynamic SVG. Take a look at a sample graph on my blog.

Create a Lotus Notes agent (name "svgagent"). 
Sub Initialize
Print |Content-type:image/svg+xml|
Print |<?xml version="1.0"?>|
Print |<!DOCTYPE svg PUBLIC 
"-//W3C//DTD SVG 1.0//EN"
Print |<svg width="200" height="200" 
Print |<desc>polyline</desc>|
Print |<g>|
Print |<polyline id="lens" points=
"10,180 40,120 70,140 100,90 130,40 160,100" 
fill="none" stroke="purple" stroke-width="2"/>|
'processing and draw the graph
Print |</g>|
Print |</svg>|
End Sub

Then, in your Web page, you can embed the code below. For Firefox and Netscape, use the following:

<object type="image/svg+xml" 
width="200" height="200">

For Internet Explorer use this:

<embed src="svgagent?OpenAgent"
 width="200" height="200" pluginspage=

Do you have comments on this tip? Let us know.

This tip was submitted to the tip library by member William Beh. Please let others know how useful it is via the rating scale below. Do you have a useful Lotus Notes, Domino, Workplace or WebSphere tip or code snippet to share? Submit it to our monthly tip contest and you could win a prize.

Dig Deeper on Web Development for Lotus Notes Domino

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.




  • iSeries tutorials's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...