On Friday 07 March 2003 05:59 pm, Michael Nachbaur wrote:

Ideally for my present purposes What would like to have is something along the 
lines of a static XCL file like

<xcl:chart type="barchart">
  <xcl:axis name='x'>
    <xcl:scale>100.00</xcl:scale>
    <xcl:label>florbel</xcl:label>
    <xcl:data path="some XML Query statement returning 1 column of data"/>
  </xcl:axis>:
  <xcl:axis name='y'>
    <xcl:scale>100.00</xcl:scale>
    <xcl:label>days</xcl:label>
    <xcl:data path="some XML Query statement returning 1 column of data"/>
  </xcl:axis>:
</xcl:chart>

Obviously with plenty of other things in there if needed, but the point being 
that the "XML Query" would extract data either from the same or another 
document. My belief is that it should (and can) be devised so that large 
datasets are processed via a SAX based mechanism. So the whole thing would 
somehow drive a SAX event filter which would use the Query to filter out 
data, accumulating just the portion of interest. Note that in that case other 
SAX filters would be able to do things like build HTML tables or Image maps 
based on the same event stream. If someone wanted to be able to simply use 
XSLT or some other processor with XCL they would certainly be able to do so, 
but designing it from the ground up as a SAX oriented syntax makes sense to 
me. Michael's requirements certainly tend to indicate that will be needed!

> On Friday, Mar 7, 2003, at 11:53 US/Pacific, John Fessenden wrote:
> > Not to nit pick: in the domain of "english" it would seem both
> > definitions
> > are correct.  *grin*
>
> Well, I could give a damn whether it's correct english or not, since
> the english language is so screwed up, I don't think it would matter.
> Besides, I was just calling A:X:Graph based on the name of GD::Graph,
> so there.  ;-)
>
> > So there's probably a lot of use for AxKit::XSP::Chart, is something
> > like
> > that in the works?
>
> Yes.  Ultimately I would much rather create a XCL (eXtensible Charting
> Language) and create a serializer that dumps out a graph (either using
> GD::Graph, XSL->SVG, whatever), but there are several reasons why I'm
> not doing that right now.
>
> a) I have some really heavy-duty SQL statements (bandwidth usage graphs
> that pull data from DB tables containing >20 million records for over
> 2000 customers), and I don't want to run it twice, once for the HTML
> and once for the graph;
>
> b) I would like to output multiple graphs from a single XSP page, and
> have them pre-generated, maybe even with HTML image-map information
> provided along with them;
>
> c) I want to reduce the number of times the same graph has to be
> generated.
>
> Therefore, I'm going the taglib route.  This is what I envision:
>
> <chart:pie name="bandwidth-usage">
>      <chart:properties>
>          <chart:width>250</chart:width>
>          <chart:height>250</chart:height>
>          <chart:colors>
>              <chart:color>#FF0000</chart:color>
>              <!-- list all colors to be used -->
>          </chart:colors>
>          <chart:cycle-colors/>
>          <chart:fonts>
>              <chart:font name="label">
>                  <chart:font-size>9</chart:font-size>
>
> <chart:font-path>/usr/share/fonts/ttf/arial.ttf</char:font-path>
>              </chart:font>
>          </chart:fonts>
>      </chart:properties>
>      <chart:data>
>          <!-- XCL data goes here -->
>      </chart:data>
> </chart:pie>
>
> The taglib will generate the graph, dump the resulting raster image to
> a cache directory, and the following will be substituted in the XML
> pipeline:
>
> <chart:results name="bandwidth-usage" id="a90f71f8s9f">
>
> <chart:filename>/tmp/chart-cache/bandwidth-usage/a90f71f8s9f.png</
> chart:filename>
>      <chart:width>250</chart:width>
>      <chart:height>250</chart:height>
>      <chart:map>
>          <!-- HTML image map information can go here, that shows what
> dataset is where -->
>      </chart:map>
> </chart:results>
>
> Finally, in your Apache configuration, you create an alias like so:
>
> Alias /charts /tmp/chart-cache
>
> and can use XSL stylesheets to put in your fancy image map information,
> and your <img src="/charts/[EMAIL PROTECTED]/[EMAIL PROTECTED]"/> reference.
>
> Comments?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-- 
Tod Harter
Giant Electronic Brain

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to