RE: Determining UserAgent's client size.

> -----Original Message-----
> From: Dave J Woolley [mailto:david.woolley@bts.co.uk]
> Sent: Thursday, October 19, 2000 3:35 AM
> To: SVG Mailing List (E-mail)
> Subject: RE: Determining UserAgent's client size. 
> 
> 
> > From:	Adam Van Den Hoven [SMTP:Adam.Hoven@bluezone.net]
> > 
> > I want to convert an arbitrary set of data into an SVG 
> image. Clearly this
> > should be a simple task. However, I need to know something about the
> > actual
> > number of pixels to work with to decide how many tick marks 
> and lables I
> [DJW:]  
> You can't know this.  Even if the image is necessarily
> generated on the fly, you can't tell what resolution of
> printer will be used for a proof and for a quality hard
> copy, and you can't know whether the image will be saved
> and viewed on a different resolution display, or whether the
> window will be resized after the download.
> 
> If the image can reasonably be pre-computed, dynamic
> sizing will make it uncacheable, which is an undesirable
> attribute for any web page.  You would need to have
> several resolutions and contents negotiate.

But that is exactly the issue I want to avoid. If I don't know what real
world dimensions I have to work with, then I have to arbitrarily set the
number of lables, tick marks and grid lines that are shown. Granted I could
have the person requesting the image set their own selections but that seems
a little clunky to my way of thinking.

As to caching that is a moot point since I want to do the changes after the
SVG has loaded. Basically I want two write onload and onresize handlers that
will look at the available canvas size and either delete or add labels,
tickmarks and grid lines or take them away.

I also want to load my SVG Graphing file without any data and load the data
into the graph after its been loaded and rendered (by calling a function
like drawGraph(xmlData, xmlLayout) or something. 

My point is that I want to know this information once the data has been
loaded. I fully intend to do this manipulation on the fly once the image has
been loaded. I am not a big fan of server side processing, for things like
this. It makes more sense to load an essentially empty graphic with a bunch
of code separate from the data especially when there are alot of different
data sets to be loaded, and you are going to use the same data for different
things. Why reload everything when its just as easy to load a template once,
your data as you need it and use script to populate your tables and graphs.
This way the template can be cached and everything progresses faster. 

Clearly I should have said that I want this information from the SVG DOM,
not the request. 
TTFN
Adam

Received on Thursday, 19 October 2000 12:45:30 UTC