This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: SUBJECT! draw graphics with XSL


Everyone is talking about SVG in their responses, but you should be able to
do it using tables very nicely.  I've done it with javascript, not xslt, but
the basic method should work just as well.  Horizontal bars are the easiest,
though you can do vertical ones.  For horizontal bars, put each bar into its
own table and make the width of the <td> cell proportional to the value of
the data.  Color by setting the background color of the cell, or load a
1X1-pixel image of the right color into the cell and stretch it to fit.

Should be a piece of cake.

Cheers,

Tom P

[edouard panie]

>
> I have some xml files that look like this:
>
> <?xml version="1.0" encoding="ISO8859-1" ?>
> <histogram>
>     <name>myName</name>
>     <createdOn>25/05/2001</createdOn>
>     <lastUpdate>05/06/2001</lastUpdate>
>     <column>
>     <index>0</index>
>     <height>123</height>
>     </column>
>     ....
>     <column>
>     <index>9</index>
>     <height>203</height>
>     </column>
> </curve>
>
> I would like to visualize this data in an html
> document, with a nice graphic of the histogram curve!.
> Should I use XSL ? Has someone done something similar?
> if yes how?
>



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]