[owtchart-users] approaches for generating charts

Daniel Morissette morissette@dmsolutions.ca
Wed, 29 Jan 2003 21:05:28 -0500

Hi Tom,

Yes we've run into this URL lenght issue a few times.  Usually we notice
the problem the first time with IE since it seems to have a shorter
limit for URL lenghts than other browsers.

The solution that we usually implement is to create a temporary text
file with the OWTChart configuration parameters and then launch owtchart
in command-line mode using a system() call to output the image to a
temporary GIF or PNG in a web-accessible location, and then finally
embed the URL of the temporary image in the HTML output instead of the
owtchart URL.

This works fine when the processing is done at the server end, but I see
'owsview' in your test URL, so I'm guessing that you must be building
the URL in Javascript at the client end.  If that's the case then your
best bet will probably be using the POST method.  The owtchart binary
supports POST, but I'm not sure how you can issue a POST request from
JavaScript.  It would be interesting to hear the solution that you'll
find to your problem if you're using JavaScript...


Tom.Kralidis@ccrs.nrcan.gc.ca wrote:
> Hi,
> First off, I have to say this is a very useful and easy tool, and wish I'd
> have given it some attention earlier!
> My question has to do with generating charts via HTTP, in which the GET URL
> is potentially huge.
> Consider the following URL:
> -1_0_3.cgi?Type=Line&W=500&H=300&NumSets=1&NumPts=92&Title=Ottawa+Int'L.+Ont
> .&Vals=-09!-11!-16!-08!-09!-15!-24!-17!-24!-16!-08!-12!-16!-22!-24!-25!-17!-
> 25!-16!-12!-14!-23!-08!-11!-16!-23!-15!-08!-07!-20!-08!-25!-14!-16!-16!-16!-
> 09!-16!-20!-22!-14!-14!-14!-17!-23!-12!-23!-25!-12!-16!-26!-16!-16!-15!-15!-
> 14!-16!-15!-26!-13!-19!-12!-12!-15!-12!-12!-24!-23!-23!-23!-21!-14!-15!-15!-
> 21!-23!-07!-14!-16!-15!-09!-08!-08!-17!-16!-13!-08!-14!-14!-16!-15!-19&XTitl
> e=Time+Period+(2003-01-29T22:00:00Z+-+2003-01-28T17:00:00Z)&YTitle=Temperatu
> re+(Degrees+Celsius)&XAxis=0
> This one works, only because I've not included XLabels.  When I try to
> include XLabels, the string length at least quadruples (URI too long
> errors).
> I realize that this is an HTTP GET limitation.  I have not tried an HTTP
> POST yet, mainly because the page which displays this image (CGI process)
> gets the data from real time sensors, and builds the URL string into an IMG
> tag.
> I'm wondering if anyone has encountered this issue, and if there are any
> potential workarounds.
> Cheers
> ..Tom
> =================================
> Tom Kralidis
> Systems Scientist
> Canada Centre for Remote Sensing
> Tel: (613) 947-1828
> http://www.ccrs.nrcan.gc.ca/
> =================================