« Microsoft versus Linux for Netbooks? | Main| Domino 8 Does Support HTTP Password Quality, even with the iPhone »

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.

Comments

Gravatar Image5 - OK, let me assure you that I'm not doing anything exotic--I mean I'm just using formula language to create a URL.

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).

Gravatar Image4 - This is an awesome tip!!!

Interestingly I can only get it qorking in Edit mode on a form... not read mode, but still this is excellent.

Thanks!!

Gravatar Image3 - That chof=gif to return a gif is great! I farted around with this for quite some time but was limited by no support for PNG. This is great news!

Keith

Gravatar Image2 - Hmmm...can't seem to get this to work if my form has saveoptions set to 0.

Gravatar Image1 - Wow, they added the GIF format?! That's huge! Several months ago PNG was the only format available.

Post A Comment

:-D:-o:-p:-x:-(:-):-\:angry::cool::cry::emb::grin::huh::laugh::rolleyes:;-)