Differences between revisions 7 and 8
Revision 7 as of 2009-09-20 23:47:36
Size: 1926
Editor: localhost
Comment: converted to 1.6 markup
Revision 8 as of 2009-12-08 23:08:28
Size: 1767
Comment:
Deletions are marked like this. Additions are marked like this.
Line 6: Line 6:
{{{<?xml version="1.0" encoding="utf-8"?> {{{
<?xml version="1.0" encoding="utf-8"?>
Line 9: Line 10:
      debug="false"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://fleabag.org/lineChart file:lineChart.xsd">
  debug="false"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://fleabag.org/lineChart file:lineChart.xsd">
Line 13: Line 14:
   <title>Weather Balloon Tracking</title>   <title>Weather Balloon Tracking</title>
Line 15: Line 16:
   <series>
     <title>Aquarius</title>
        <datum y="1"/>
     <datum y="3"/>
        <datum y="9"/>
     <datum y="8"/>
        <datum y="7"/>
    </series>
  <series>
    <title>Aquarius</title>
    <datum y="1"/>
    <datum y="3"/>
    <datum y="9"/>
    <datum y="8"/>
    <datum y="7"/>
  </series>
Line 24: Line 25:
   <axis>
        <y>
       <title>Altitude</title>
        </y>
        <x>
       <title>Days Since Launch</title>
        </x>
   </axis>
    
   <layout>
        <south>
       <legend/>
        </south>
    </layout>
  <axis>
    <y>
      <title>Altitude</title>
    </y>
    <x>
      <title>Days Since Launch</title>
    </x>
  </axis>
  
  <layout>
    <south>
      <legend/>
    </south>
  </layout>
Line 39: Line 40:
   <style>
        <plotarea>
            <gradient>
         <color offset="0%">skyblue</color>
                <color offset="80%">azure</color>
                <color offset="81%">sienna</color>
                <color offset="82%">wheat</color>
                <color offset="100%">olive</color>
            </gradient>
        </plotarea>
    </style>
  <style>
    <plotarea>
      <gradient>
        <color offset="0%">skyblue</color>
        <color offset="80%">azure</color>
        <color offset="81%">sienna</color>
        <color offset="82%">wheat</color>
        <color offset="100%">olive</color>
      </gradient>
    </plotarea>
  </style>

Create line charts using SVG and the Batik rasterizer

What it does

  • Transforms this...

<?xml version="1.0" encoding="utf-8"?>
<!--<chart xmlns="http://fleabag.org/lineChart"-->
<chart
  debug="false"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://fleabag.org/lineChart file:lineChart.xsd">

  <title>Weather Balloon Tracking</title>

  <series>
    <title>Aquarius</title>
    <datum y="1"/>
    <datum y="3"/>
    <datum y="9"/>
    <datum y="8"/>
    <datum y="7"/>
  </series>

  <axis>
    <y>
      <title>Altitude</title>
    </y>
    <x>
      <title>Days Since Launch</title>
    </x>
  </axis>
  
  <layout>
    <south>
      <legend/>
    </south>
  </layout>

  <style>
    <plotarea>
      <gradient>
        <color offset="0%">skyblue</color>
        <color offset="80%">azure</color>
        <color offset="81%">sienna</color>
        <color offset="82%">wheat</color>
        <color offset="100%">olive</color>
      </gradient>
    </plotarea>
  </style>
</chart>
  • Into this...
    • linechart.png

More information

  • This is based on a clever contribution by John Morrison (see the Batik sources)
  • It has been tested on Win2000 and on IBM's z/OS 1.4 mainframe operating system.
  • Mainframers with z/OS can download a more familiar distro from CBT File 706

  • The rest of us can download it from this wiki svglinecharts-1.2.2.zip (the zip includes an XSLT stylesheet, html doco and a tutorial)

Send feedback to Andrew Armstrong <andrew_armstrong AT IPSUM unwired DOT LOREM DOLOR SIT com AMET DOT au>

SvgLineCharts (last edited 2009-12-08 23:08:28 by HelderMagalhaes)