Google Chart API Example for Lotus Notes
Category
Here's how I make a trend chart from a list of numbers. This should help out those who have asked for an example. I can remember when I was starting out in Lotus Notes, and feeling like I had 90 percent of the parts to complete a project, but in want of another 10 to have my work finished.
Because the code runs in a Lotus Notes form, I'm not worried about performance optimization, as it runs from the workstation, not the server. I've place this formula language into computed text, and I've highlighted the section for HTML pass-thru.
The purpose of the chart, is to read in a list of text numbers, and create a chart which displays the trend. In my application, I have a scheduled agent that records the database size for each mail file and appends it to a text list in a document. Because I only want 10 days of information, I have to get the last 10 entries, then size the numbers for a 1-100 range. I left in the v_mailsizelist values, so you could see how I create test data as I build the application. When I preview the form, I'd like to have some data, even though there is no data in a new form.
The idea is to create an HTML img src that has the appropriate URL values. I chop the URL into three parts: (1) the lead URL information; (2) the 10 text numbers, separated by a comma; and (3) the closing part of the URL.
Should I apologize for not producing something with a little more polish ? After all, I could adjust the range of numbers so that if there is no change, at least a line shows up in the middle of the chart, rather than following the top edge. But, I like the Rapid Application Development cycle of Lotus Notes., formula language is still remarkable efficient. I have other work to do that is more pressing and my chart looks convincing.
Here's how I make a trend chart from a list of numbers. This should help out those who have asked for an example. I can remember when I was starting out in Lotus Notes, and feeling like I had 90 percent of the parts to complete a project, but in want of another 10 to have my work finished.
Because the code runs in a Lotus Notes form, I'm not worried about performance optimization, as it runs from the workstation, not the server. I've place this formula language into computed text, and I've highlighted the section for HTML pass-thru.
The purpose of the chart, is to read in a list of text numbers, and create a chart which displays the trend. In my application, I have a scheduled agent that records the database size for each mail file and appends it to a text list in a document. Because I only want 10 days of information, I have to get the last 10 entries, then size the numbers for a 1-100 range. I left in the v_mailsizelist values, so you could see how I create test data as I build the application. When I preview the form, I'd like to have some data, even though there is no data in a new form.
The idea is to create an HTML img src that has the appropriate URL values. I chop the URL into three parts: (1) the lead URL information; (2) the 10 text numbers, separated by a comma; and (3) the closing part of the URL.
Should I apologize for not producing something with a little more polish ? After all, I could adjust the range of numbers so that if there is no change, at least a line shows up in the middle of the chart, rather than following the top edge. But, I like the Rapid Application Development cycle of Lotus Notes., formula language is still remarkable efficient. I have other work to do that is more pressing and my chart looks convincing.
- 


Comments
I assure you it works well, and I have it in a layer, so it can pop-up over a form.
Try starting with a hard-coded URL (no formula other than it being a single string).
Posted by jack dausman At 06:04:37 AM On 10/30/2008 | - Website - |
Interestingly I can only get it qorking in Edit mode on a form... not read mode, but still this is excellent.
Thanks!!
Posted by David Leedy At 03:51:00 AM On 10/30/2008 | - Website - |
Keith
Posted by Keith Strickland At 03:05:33 AM On 10/30/2008 | - Website - |
Posted by Colin Williams At 02:35:09 AM On 10/30/2008 | - Website - |
Posted by Brian At 12:31:21 AM On 10/30/2008 | - Website - |