svg_graph 0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +4 -0
- data/GPL.txt +340 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +57 -0
- data/Rakefile +1 -0
- data/images/bar.png +0 -0
- data/images/bar.svg +76 -0
- data/images/bar.svgz +0 -0
- data/images/barhorizontal.png +0 -0
- data/images/barhorizontal.svg +76 -0
- data/images/barhorizontal.svgz +0 -0
- data/images/line.png +0 -0
- data/images/line.svg +80 -0
- data/images/line.svgz +0 -0
- data/images/pie.png +0 -0
- data/images/pie.svg +70 -0
- data/images/pie.svgz +0 -0
- data/images/plot.png +0 -0
- data/images/plot.svg +131 -0
- data/images/plot.svgz +0 -0
- data/images/schedule.png +0 -0
- data/images/schedule.svg +67 -0
- data/images/timeseries.png +0 -0
- data/images/timeseries.svg +179 -0
- data/images/timeseries.svgz +0 -0
- data/index.html +445 -0
- data/install.rb +161 -0
- data/lib/svg_graph.rb +11 -0
- data/lib/svg_graph/Bar.rb +148 -0
- data/lib/svg_graph/BarBase.rb +139 -0
- data/lib/svg_graph/BarHorizontal.rb +149 -0
- data/lib/svg_graph/Graph.rb +980 -0
- data/lib/svg_graph/Graph.rb~ +980 -0
- data/lib/svg_graph/Line.rb +444 -0
- data/lib/svg_graph/Pie.rb +395 -0
- data/lib/svg_graph/Plot.rb +500 -0
- data/lib/svg_graph/Schedule.rb +373 -0
- data/lib/svg_graph/TimeSeries.rb +241 -0
- data/lib/svg_graph/version.rb +6 -0
- data/screenshots.html +250 -0
- data/svg_graph.gemspec +20 -0
- metadata +106 -0
Binary file
|
@@ -0,0 +1,179 @@
|
|
1
|
+
<?xml version='1.0'?>
|
2
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
|
3
|
+
<svg xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 640 480' height='480' width='640' xmlns='http://www.w3.org/2000/svg' xmlns:a3="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/" a3:scriptImplementation="Adobe">
|
4
|
+
<!-- \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
|
5
|
+
-->
|
6
|
+
<!-- Created with SVG::Graph
|
7
|
+
-->
|
8
|
+
<!-- Sean Russell
|
9
|
+
-->
|
10
|
+
<!-- Based on SVG::TT::Graph for Perl by Leo Lapworth & Stephan Morgan
|
11
|
+
-->
|
12
|
+
<!-- //////////////////////////////////////////////////////////////////
|
13
|
+
-->
|
14
|
+
<defs/>
|
15
|
+
<!--SVG Background
|
16
|
+
-->
|
17
|
+
<rect x='0' class='svgBackground' y='0' height='480' style='fill:#ffffff;' width='640'/>
|
18
|
+
<g transform='translate( 40.4 26 )'>
|
19
|
+
<rect x='0' class='graphBackground' y='0' height='394' style='fill:#f0f0f0;' width='480.6'/>
|
20
|
+
<path class='axis' d='M 0 0 v394' id='xAxis' style='stroke: #000000; stroke-width: 1px;'/>
|
21
|
+
<path class='axis' d='M 0 394 h480.6' id='yAxis' style='stroke: #000000; stroke-width: 1px;'/>
|
22
|
+
<text x='0.0' class='xAxisLabels' y='409' style='text-anchor: middle; fill: #000000; font-size: 12px; font-family: "Arial", sans-serif; font-weight: normal;text-anchor: middle'>1973</text>
|
23
|
+
<text x='72.9780617037263' class='xAxisLabels' y='426' style='text-anchor: middle; fill: #000000; font-size: 12px; font-family: "Arial", sans-serif; font-weight: normal;text-anchor: middle'>1978</text>
|
24
|
+
<path class='staggerGuideLine' d='M72.9780617037263 394 v17' style='fill: none; stroke: #000000; stroke-width: 0.5px;'/>
|
25
|
+
<path class='guideLines' d='M72.9780617037263 0 v394' style='stroke: #666666; stroke-width: 1px; stroke-dasharray: 5 5;'/>
|
26
|
+
<text x='145.956123407453' class='xAxisLabels' y='409' style='text-anchor: middle; fill: #000000; font-size: 12px; font-family: "Arial", sans-serif; font-weight: normal;text-anchor: middle'>1983</text>
|
27
|
+
<path class='guideLines' d='M145.956123407453 0 v394' style='stroke: #666666; stroke-width: 1px; stroke-dasharray: 5 5;'/>
|
28
|
+
<text x='218.934185111179' class='xAxisLabels' y='426' style='text-anchor: middle; fill: #000000; font-size: 12px; font-family: "Arial", sans-serif; font-weight: normal;text-anchor: middle'>1988</text>
|
29
|
+
<path class='staggerGuideLine' d='M218.934185111179 394 v17' style='fill: none; stroke: #000000; stroke-width: 0.5px;'/>
|
30
|
+
<path class='guideLines' d='M218.934185111179 0 v394' style='stroke: #666666; stroke-width: 1px; stroke-dasharray: 5 5;'/>
|
31
|
+
<text x='291.912246814905' class='xAxisLabels' y='409' style='text-anchor: middle; fill: #000000; font-size: 12px; font-family: "Arial", sans-serif; font-weight: normal;text-anchor: middle'>1993</text>
|
32
|
+
<path class='guideLines' d='M291.912246814905 0 v394' style='stroke: #666666; stroke-width: 1px; stroke-dasharray: 5 5;'/>
|
33
|
+
<text x='364.890308518632' class='xAxisLabels' y='426' style='text-anchor: middle; fill: #000000; font-size: 12px; font-family: "Arial", sans-serif; font-weight: normal;text-anchor: middle'>1998</text>
|
34
|
+
<path class='staggerGuideLine' d='M364.890308518632 394 v17' style='fill: none; stroke: #000000; stroke-width: 0.5px;'/>
|
35
|
+
<path class='guideLines' d='M364.890308518632 0 v394' style='stroke: #666666; stroke-width: 1px; stroke-dasharray: 5 5;'/>
|
36
|
+
<text x='437.868370222358' class='xAxisLabels' y='409' style='text-anchor: middle; fill: #000000; font-size: 12px; font-family: "Arial", sans-serif; font-weight: normal;text-anchor: middle'>2003</text>
|
37
|
+
<path class='guideLines' d='M437.868370222358 0 v394' style='stroke: #666666; stroke-width: 1px; stroke-dasharray: 5 5;'/>
|
38
|
+
<text x='-3' class='yAxisLabels' y='398.0' style='text-anchor: end; fill: #000000; font-size: 12px; font-family: "Arial", sans-serif; font-weight: normal;text-anchor: end'>0</text>
|
39
|
+
<text x='-3' class='yAxisLabels' y='356.888888888889' style='text-anchor: end; fill: #000000; font-size: 12px; font-family: "Arial", sans-serif; font-weight: normal;text-anchor: end'>2</text>
|
40
|
+
<path class='guideLines' d='M0 352.888888888889 h480.6' style='stroke: #666666; stroke-width: 1px; stroke-dasharray: 5 5;'/>
|
41
|
+
<text x='-3' class='yAxisLabels' y='315.777777777778' style='text-anchor: end; fill: #000000; font-size: 12px; font-family: "Arial", sans-serif; font-weight: normal;text-anchor: end'>4</text>
|
42
|
+
<path class='guideLines' d='M0 311.777777777778 h480.6' style='stroke: #666666; stroke-width: 1px; stroke-dasharray: 5 5;'/>
|
43
|
+
<text x='-3' class='yAxisLabels' y='274.666666666667' style='text-anchor: end; fill: #000000; font-size: 12px; font-family: "Arial", sans-serif; font-weight: normal;text-anchor: end'>6</text>
|
44
|
+
<path class='guideLines' d='M0 270.666666666667 h480.6' style='stroke: #666666; stroke-width: 1px; stroke-dasharray: 5 5;'/>
|
45
|
+
<text x='-3' class='yAxisLabels' y='233.555555555556' style='text-anchor: end; fill: #000000; font-size: 12px; font-family: "Arial", sans-serif; font-weight: normal;text-anchor: end'>8</text>
|
46
|
+
<path class='guideLines' d='M0 229.555555555556 h480.6' style='stroke: #666666; stroke-width: 1px; stroke-dasharray: 5 5;'/>
|
47
|
+
<text x='-3' class='yAxisLabels' y='192.444444444444' style='text-anchor: end; fill: #000000; font-size: 12px; font-family: "Arial", sans-serif; font-weight: normal;text-anchor: end'>10</text>
|
48
|
+
<path class='guideLines' d='M0 188.444444444444 h480.6' style='stroke: #666666; stroke-width: 1px; stroke-dasharray: 5 5;'/>
|
49
|
+
<text x='-3' class='yAxisLabels' y='151.333333333333' style='text-anchor: end; fill: #000000; font-size: 12px; font-family: "Arial", sans-serif; font-weight: normal;text-anchor: end'>12</text>
|
50
|
+
<path class='guideLines' d='M0 147.333333333333 h480.6' style='stroke: #666666; stroke-width: 1px; stroke-dasharray: 5 5;'/>
|
51
|
+
<text x='-3' class='yAxisLabels' y='110.222222222222' style='text-anchor: end; fill: #000000; font-size: 12px; font-family: "Arial", sans-serif; font-weight: normal;text-anchor: end'>14</text>
|
52
|
+
<path class='guideLines' d='M0 106.222222222222 h480.6' style='stroke: #666666; stroke-width: 1px; stroke-dasharray: 5 5;'/>
|
53
|
+
<text x='-3' class='yAxisLabels' y='69.1111111111111' style='text-anchor: end; fill: #000000; font-size: 12px; font-family: "Arial", sans-serif; font-weight: normal;text-anchor: end'>16</text>
|
54
|
+
<path class='guideLines' d='M0 65.1111111111111 h480.6' style='stroke: #666666; stroke-width: 1px; stroke-dasharray: 5 5;'/>
|
55
|
+
<text x='-3' class='yAxisLabels' y='28.0' style='text-anchor: end; fill: #000000; font-size: 12px; font-family: "Arial", sans-serif; font-weight: normal;text-anchor: end'>18</text>
|
56
|
+
<path class='guideLines' d='M0 24.0 h480.6' style='stroke: #666666; stroke-width: 1px; stroke-dasharray: 5 5;'/>
|
57
|
+
<path class='line1' d='M14.9843030972302 250.111111111111 L14.9843030972302 250.111111111111 21.25842845231 167.888888888889 184.865238666939 352.888888888889 228.664228406859 373.444444444444 321.658821548009 126.777777777778 418.806192989469 209.0 456.6 167.888888888889 ' style='fill: none; stroke: #ff0000; stroke-width: 1px;'/>
|
58
|
+
<circle cy='250.111111111111' class='dataPoint1' r='2.5' style='fill: #ff0000; stroke: none; stroke-width: 1px;' cx='14.9843030972302'/>
|
59
|
+
<circle cy='167.888888888889' class='dataPoint1' r='2.5' style='fill: #ff0000; stroke: none; stroke-width: 1px;' cx='21.25842845231'/>
|
60
|
+
<circle cy='352.888888888889' class='dataPoint1' r='2.5' style='fill: #ff0000; stroke: none; stroke-width: 1px;' cx='184.865238666939'/>
|
61
|
+
<circle cy='373.444444444444' class='dataPoint1' r='2.5' style='fill: #ff0000; stroke: none; stroke-width: 1px;' cx='228.664228406859'/>
|
62
|
+
<circle cy='126.777777777778' class='dataPoint1' r='2.5' style='fill: #ff0000; stroke: none; stroke-width: 1px;' cx='321.658821548009'/>
|
63
|
+
<circle cy='209.0' class='dataPoint1' r='2.5' style='fill: #ff0000; stroke: none; stroke-width: 1px;' cx='418.806192989469'/>
|
64
|
+
<circle cy='167.888888888889' class='dataPoint1' r='2.5' style='fill: #ff0000; stroke: none; stroke-width: 1px;' cx='456.6'/>
|
65
|
+
<path class='line2' d='M8.47040225087341 24.0 L8.47040225087341 24.0 55.5063611230323 85.6666666666666 102.543985102769 311.777777777778 149.619906556808 106.222222222222 196.654200321388 270.666666666667 243.730121775427 147.333333333333 290.767745755164 270.666666666667 337.843667209202 44.5555555555555 384.877960973783 147.333333333333 431.913919845942 250.111111111111 ' style='fill: none; stroke: #0000ff; stroke-width: 1px;'/>
|
66
|
+
<circle cy='24.0' class='dataPoint2' r='2.5' style='fill: #0000ff; stroke: none; stroke-width: 1px;' cx='8.47040225087341'/>
|
67
|
+
<circle cy='85.6666666666666' class='dataPoint2' r='2.5' style='fill: #0000ff; stroke: none; stroke-width: 1px;' cx='55.5063611230323'/>
|
68
|
+
<circle cy='311.777777777778' class='dataPoint2' r='2.5' style='fill: #0000ff; stroke: none; stroke-width: 1px;' cx='102.543985102769'/>
|
69
|
+
<circle cy='106.222222222222' class='dataPoint2' r='2.5' style='fill: #0000ff; stroke: none; stroke-width: 1px;' cx='149.619906556808'/>
|
70
|
+
<circle cy='270.666666666667' class='dataPoint2' r='2.5' style='fill: #0000ff; stroke: none; stroke-width: 1px;' cx='196.654200321388'/>
|
71
|
+
<circle cy='147.333333333333' class='dataPoint2' r='2.5' style='fill: #0000ff; stroke: none; stroke-width: 1px;' cx='243.730121775427'/>
|
72
|
+
<circle cy='270.666666666667' class='dataPoint2' r='2.5' style='fill: #0000ff; stroke: none; stroke-width: 1px;' cx='290.767745755164'/>
|
73
|
+
<circle cy='44.5555555555555' class='dataPoint2' r='2.5' style='fill: #0000ff; stroke: none; stroke-width: 1px;' cx='337.843667209202'/>
|
74
|
+
<circle cy='147.333333333333' class='dataPoint2' r='2.5' style='fill: #0000ff; stroke: none; stroke-width: 1px;' cx='384.877960973783'/>
|
75
|
+
<circle cy='250.111111111111' class='dataPoint2' r='2.5' style='fill: #0000ff; stroke: none; stroke-width: 1px;' cx='431.913919845942'/>
|
76
|
+
<path class='line3' d='M72.9716745119474 291.222222222222 L72.9716745119474 291.222222222222 145.943349023895 126.777777777778 291.926660629669 188.444444444444 437.870009653564 291.222222222222 ' style='fill: none; stroke: #00ff00; stroke-width: 1px;'/>
|
77
|
+
<circle cy='291.222222222222' class='dataPoint3' r='2.5' style='fill: #00ff00; stroke: none; stroke-width: 1px;' cx='72.9716745119474'/>
|
78
|
+
<circle cy='126.777777777778' class='dataPoint3' r='2.5' style='fill: #00ff00; stroke: none; stroke-width: 1px;' cx='145.943349023895'/>
|
79
|
+
<circle cy='188.444444444444' class='dataPoint3' r='2.5' style='fill: #00ff00; stroke: none; stroke-width: 1px;' cx='291.926660629669'/>
|
80
|
+
<circle cy='291.222222222222' class='dataPoint3' r='2.5' style='fill: #00ff00; stroke: none; stroke-width: 1px;' cx='437.870009653564'/>
|
81
|
+
<g>
|
82
|
+
<text visibility='hidden' x='19.9843030972302' y='238.111111111111' id='538641648' style='fill: #000; text-anchor: start;'>01/11/74</text>
|
83
|
+
<circle cy='250.111111111111' onmouseover='document.getElementById(538641648).setAttribute('visibility', 'visible' )' r='10' onmouseout='document.getElementById(538641648).setAttribute('visibility', 'hidden' )' cx='14.9843030972302' style='opacity: 0'/>
|
84
|
+
<text x='14.9843030972302' class='dataPointLabel' y='244.111111111111' style='fill: #000000; text-anchor:middle; font-size: 10px; font-family: "Arial", sans-serif; font-weight: normal; stroke: #fff; stroke-width: 2;'>7</text>
|
85
|
+
<text x='14.9843030972302' class='dataPointLabel' y='244.111111111111' style='fill: #000000; text-anchor:middle; font-size: 10px; font-family: "Arial", sans-serif; font-weight: normal;'>7</text>
|
86
|
+
<text visibility='hidden' x='26.25842845231' y='155.888888888889' id='538638598' style='fill: #000; text-anchor: start;'>06/17/74</text>
|
87
|
+
<circle cy='167.888888888889' onmouseover='document.getElementById(538638598).setAttribute('visibility', 'visible' )' r='10' onmouseout='document.getElementById(538638598).setAttribute('visibility', 'hidden' )' cx='21.25842845231' style='opacity: 0'/>
|
88
|
+
<text x='21.25842845231' class='dataPointLabel' y='161.888888888889' style='fill: #000000; text-anchor:middle; font-size: 10px; font-family: "Arial", sans-serif; font-weight: normal; stroke: #fff; stroke-width: 2;'>11</text>
|
89
|
+
<text x='21.25842845231' class='dataPointLabel' y='161.888888888889' style='fill: #000000; text-anchor:middle; font-size: 10px; font-family: "Arial", sans-serif; font-weight: normal;'>11</text>
|
90
|
+
<text visibility='hidden' x='189.865238666939' y='340.888888888889' id='538635548' style='fill: #000; text-anchor: start;'>09/01/85</text>
|
91
|
+
<circle cy='352.888888888889' onmouseover='document.getElementById(538635548).setAttribute('visibility', 'visible' )' r='10' onmouseout='document.getElementById(538635548).setAttribute('visibility', 'hidden' )' cx='184.865238666939' style='opacity: 0'/>
|
92
|
+
<text x='184.865238666939' class='dataPointLabel' y='346.888888888889' style='fill: #000000; text-anchor:middle; font-size: 10px; font-family: "Arial", sans-serif; font-weight: normal; stroke: #fff; stroke-width: 2;'>2</text>
|
93
|
+
<text x='184.865238666939' class='dataPointLabel' y='346.888888888889' style='fill: #000000; text-anchor:middle; font-size: 10px; font-family: "Arial", sans-serif; font-weight: normal;'>2</text>
|
94
|
+
<text visibility='hidden' x='233.664228406859' y='361.444444444444' id='538632498' style='fill: #000; text-anchor: start;'>09/01/88</text>
|
95
|
+
<circle cy='373.444444444444' onmouseover='document.getElementById(538632498).setAttribute('visibility', 'visible' )' r='10' onmouseout='document.getElementById(538632498).setAttribute('visibility', 'hidden' )' cx='228.664228406859' style='opacity: 0'/>
|
96
|
+
<text x='228.664228406859' class='dataPointLabel' y='367.444444444444' style='fill: #000000; text-anchor:middle; font-size: 10px; font-family: "Arial", sans-serif; font-weight: normal; stroke: #fff; stroke-width: 2;'>1</text>
|
97
|
+
<text x='228.664228406859' class='dataPointLabel' y='367.444444444444' style='fill: #000000; text-anchor:middle; font-size: 10px; font-family: "Arial", sans-serif; font-weight: normal;'>1</text>
|
98
|
+
<text visibility='hidden' x='326.658821548009' y='114.777777777778' id='538629448' style='fill: #000; text-anchor: start;'>01/15/95</text>
|
99
|
+
<circle cy='126.777777777778' onmouseover='document.getElementById(538629448).setAttribute('visibility', 'visible' )' r='10' onmouseout='document.getElementById(538629448).setAttribute('visibility', 'hidden' )' cx='321.658821548009' style='opacity: 0'/>
|
100
|
+
<text x='321.658821548009' class='dataPointLabel' y='120.777777777778' style='fill: #000000; text-anchor:middle; font-size: 10px; font-family: "Arial", sans-serif; font-weight: normal; stroke: #fff; stroke-width: 2;'>13</text>
|
101
|
+
<text x='321.658821548009' class='dataPointLabel' y='120.777777777778' style='fill: #000000; text-anchor:middle; font-size: 10px; font-family: "Arial", sans-serif; font-weight: normal;'>13</text>
|
102
|
+
<text visibility='hidden' x='423.806192989469' y='197.0' id='538626398' style='fill: #000; text-anchor: start;'>09/11/01</text>
|
103
|
+
<circle cy='209.0' onmouseover='document.getElementById(538626398).setAttribute('visibility', 'visible' )' r='10' onmouseout='document.getElementById(538626398).setAttribute('visibility', 'hidden' )' cx='418.806192989469' style='opacity: 0'/>
|
104
|
+
<text x='418.806192989469' class='dataPointLabel' y='203.0' style='fill: #000000; text-anchor:middle; font-size: 10px; font-family: "Arial", sans-serif; font-weight: normal; stroke: #fff; stroke-width: 2;'>9</text>
|
105
|
+
<text x='418.806192989469' class='dataPointLabel' y='203.0' style='fill: #000000; text-anchor:middle; font-size: 10px; font-family: "Arial", sans-serif; font-weight: normal;'>9</text>
|
106
|
+
<text visibility='hidden' x='461.6' y='155.888888888889' id='538623328' style='fill: #000; text-anchor: start;'>04/13/04</text>
|
107
|
+
<circle cy='167.888888888889' onmouseover='document.getElementById(538623328).setAttribute('visibility', 'visible' )' r='10' onmouseout='document.getElementById(538623328).setAttribute('visibility', 'hidden' )' cx='456.6' style='opacity: 0'/>
|
108
|
+
<text x='456.6' class='dataPointLabel' y='161.888888888889' style='fill: #000000; text-anchor:middle; font-size: 10px; font-family: "Arial", sans-serif; font-weight: normal; stroke: #fff; stroke-width: 2;'>11</text>
|
109
|
+
<text x='456.6' class='dataPointLabel' y='161.888888888889' style='fill: #000000; text-anchor:middle; font-size: 10px; font-family: "Arial", sans-serif; font-weight: normal;'>11</text>
|
110
|
+
<text visibility='hidden' x='13.4704022508734' y='12.0' id='538619318' style='fill: #000; text-anchor: start;'>08/01/73</text>
|
111
|
+
<circle cy='24.0' onmouseover='document.getElementById(538619318).setAttribute('visibility', 'visible' )' r='10' onmouseout='document.getElementById(538619318).setAttribute('visibility', 'hidden' )' cx='8.47040225087341' style='opacity: 0'/>
|
112
|
+
<text x='8.47040225087341' class='dataPointLabel' y='18.0' style='fill: #000000; text-anchor:middle; font-size: 10px; font-family: "Arial", sans-serif; font-weight: normal; stroke: #fff; stroke-width: 2;'>18</text>
|
113
|
+
<text x='8.47040225087341' class='dataPointLabel' y='18.0' style='fill: #000000; text-anchor:middle; font-size: 10px; font-family: "Arial", sans-serif; font-weight: normal;'>18</text>
|
114
|
+
<text visibility='hidden' x='60.5063611230323' y='73.6666666666666' id='538616268' style='fill: #000; text-anchor: start;'>10/21/76</text>
|
115
|
+
<circle cy='85.6666666666666' onmouseover='document.getElementById(538616268).setAttribute('visibility', 'visible' )' r='10' onmouseout='document.getElementById(538616268).setAttribute('visibility', 'hidden' )' cx='55.5063611230323' style='opacity: 0'/>
|
116
|
+
<text x='55.5063611230323' class='dataPointLabel' y='79.6666666666666' style='fill: #000000; text-anchor:middle; font-size: 10px; font-family: "Arial", sans-serif; font-weight: normal; stroke: #fff; stroke-width: 2;'>15</text>
|
117
|
+
<text x='55.5063611230323' class='dataPointLabel' y='79.6666666666666' style='fill: #000000; text-anchor:middle; font-size: 10px; font-family: "Arial", sans-serif; font-weight: normal;'>15</text>
|
118
|
+
<text visibility='hidden' x='107.543985102769' y='299.777777777778' id='538613218' style='fill: #000; text-anchor: start;'>01/11/80</text>
|
119
|
+
<circle cy='311.777777777778' onmouseover='document.getElementById(538613218).setAttribute('visibility', 'visible' )' r='10' onmouseout='document.getElementById(538613218).setAttribute('visibility', 'hidden' )' cx='102.543985102769' style='opacity: 0'/>
|
120
|
+
<text x='102.543985102769' class='dataPointLabel' y='305.777777777778' style='fill: #000000; text-anchor:middle; font-size: 10px; font-family: "Arial", sans-serif; font-weight: normal; stroke: #fff; stroke-width: 2;'>4</text>
|
121
|
+
<text x='102.543985102769' class='dataPointLabel' y='305.777777777778' style='fill: #000000; text-anchor:middle; font-size: 10px; font-family: "Arial", sans-serif; font-weight: normal;'>4</text>
|
122
|
+
<text visibility='hidden' x='154.619906556808' y='94.2222222222222' id='538610168' style='fill: #000; text-anchor: start;'>04/03/83</text>
|
123
|
+
<circle cy='106.222222222222' onmouseover='document.getElementById(538610168).setAttribute('visibility', 'visible' )' r='10' onmouseout='document.getElementById(538610168).setAttribute('visibility', 'hidden' )' cx='149.619906556808' style='opacity: 0'/>
|
124
|
+
<text x='149.619906556808' class='dataPointLabel' y='100.222222222222' style='fill: #000000; text-anchor:middle; font-size: 10px; font-family: "Arial", sans-serif; font-weight: normal; stroke: #fff; stroke-width: 2;'>14</text>
|
125
|
+
<text x='149.619906556808' class='dataPointLabel' y='100.222222222222' style='fill: #000000; text-anchor:middle; font-size: 10px; font-family: "Arial", sans-serif; font-weight: normal;'>14</text>
|
126
|
+
<text visibility='hidden' x='201.654200321388' y='258.666666666667' id='538607118' style='fill: #000; text-anchor: start;'>06/23/86</text>
|
127
|
+
<circle cy='270.666666666667' onmouseover='document.getElementById(538607118).setAttribute('visibility', 'visible' )' r='10' onmouseout='document.getElementById(538607118).setAttribute('visibility', 'hidden' )' cx='196.654200321388' style='opacity: 0'/>
|
128
|
+
<text x='196.654200321388' class='dataPointLabel' y='264.666666666667' style='fill: #000000; text-anchor:middle; font-size: 10px; font-family: "Arial", sans-serif; font-weight: normal; stroke: #fff; stroke-width: 2;'>6</text>
|
129
|
+
<text x='196.654200321388' class='dataPointLabel' y='264.666666666667' style='fill: #000000; text-anchor:middle; font-size: 10px; font-family: "Arial", sans-serif; font-weight: normal;'>6</text>
|
130
|
+
<text visibility='hidden' x='248.730121775427' y='135.333333333333' id='538604068' style='fill: #000; text-anchor: start;'>09/13/89</text>
|
131
|
+
<circle cy='147.333333333333' onmouseover='document.getElementById(538604068).setAttribute('visibility', 'visible' )' r='10' onmouseout='document.getElementById(538604068).setAttribute('visibility', 'hidden' )' cx='243.730121775427' style='opacity: 0'/>
|
132
|
+
<text x='243.730121775427' class='dataPointLabel' y='141.333333333333' style='fill: #000000; text-anchor:middle; font-size: 10px; font-family: "Arial", sans-serif; font-weight: normal; stroke: #fff; stroke-width: 2;'>12</text>
|
133
|
+
<text x='243.730121775427' class='dataPointLabel' y='141.333333333333' style='fill: #000000; text-anchor:middle; font-size: 10px; font-family: "Arial", sans-serif; font-weight: normal;'>12</text>
|
134
|
+
<text visibility='hidden' x='295.767745755164' y='258.666666666667' id='538601018' style='fill: #000; text-anchor: start;'>12/03/92</text>
|
135
|
+
<circle cy='270.666666666667' onmouseover='document.getElementById(538601018).setAttribute('visibility', 'visible' )' r='10' onmouseout='document.getElementById(538601018).setAttribute('visibility', 'hidden' )' cx='290.767745755164' style='opacity: 0'/>
|
136
|
+
<text x='290.767745755164' class='dataPointLabel' y='264.666666666667' style='fill: #000000; text-anchor:middle; font-size: 10px; font-family: "Arial", sans-serif; font-weight: normal; stroke: #fff; stroke-width: 2;'>6</text>
|
137
|
+
<text x='290.767745755164' class='dataPointLabel' y='264.666666666667' style='fill: #000000; text-anchor:middle; font-size: 10px; font-family: "Arial", sans-serif; font-weight: normal;'>6</text>
|
138
|
+
<text visibility='hidden' x='342.843667209202' y='32.5555555555555' id='538597968' style='fill: #000; text-anchor: start;'>02/24/96</text>
|
139
|
+
<circle cy='44.5555555555555' onmouseover='document.getElementById(538597968).setAttribute('visibility', 'visible' )' r='10' onmouseout='document.getElementById(538597968).setAttribute('visibility', 'hidden' )' cx='337.843667209202' style='opacity: 0'/>
|
140
|
+
<text x='337.843667209202' class='dataPointLabel' y='38.5555555555555' style='fill: #000000; text-anchor:middle; font-size: 10px; font-family: "Arial", sans-serif; font-weight: normal; stroke: #fff; stroke-width: 2;'>17</text>
|
141
|
+
<text x='337.843667209202' class='dataPointLabel' y='38.5555555555555' style='fill: #000000; text-anchor:middle; font-size: 10px; font-family: "Arial", sans-serif; font-weight: normal;'>17</text>
|
142
|
+
<text visibility='hidden' x='389.877960973783' y='135.333333333333' id='538594918' style='fill: #000; text-anchor: start;'>05/16/99</text>
|
143
|
+
<circle cy='147.333333333333' onmouseover='document.getElementById(538594918).setAttribute('visibility', 'visible' )' r='10' onmouseout='document.getElementById(538594918).setAttribute('visibility', 'hidden' )' cx='384.877960973783' style='opacity: 0'/>
|
144
|
+
<text x='384.877960973783' class='dataPointLabel' y='141.333333333333' style='fill: #000000; text-anchor:middle; font-size: 10px; font-family: "Arial", sans-serif; font-weight: normal; stroke: #fff; stroke-width: 2;'>12</text>
|
145
|
+
<text x='384.877960973783' class='dataPointLabel' y='141.333333333333' style='fill: #000000; text-anchor:middle; font-size: 10px; font-family: "Arial", sans-serif; font-weight: normal;'>12</text>
|
146
|
+
<text visibility='hidden' x='436.913919845942' y='238.111111111111' id='538591868' style='fill: #000; text-anchor: start;'>08/05/02</text>
|
147
|
+
<circle cy='250.111111111111' onmouseover='document.getElementById(538591868).setAttribute('visibility', 'visible' )' r='10' onmouseout='document.getElementById(538591868).setAttribute('visibility', 'hidden' )' cx='431.913919845942' style='opacity: 0'/>
|
148
|
+
<text x='431.913919845942' class='dataPointLabel' y='244.111111111111' style='fill: #000000; text-anchor:middle; font-size: 10px; font-family: "Arial", sans-serif; font-weight: normal; stroke: #fff; stroke-width: 2;'>7</text>
|
149
|
+
<text x='431.913919845942' class='dataPointLabel' y='244.111111111111' style='fill: #000000; text-anchor:middle; font-size: 10px; font-family: "Arial", sans-serif; font-weight: normal;'>7</text>
|
150
|
+
<text visibility='hidden' x='77.9716745119474' y='279.222222222222' id='538588218' style='fill: #000; text-anchor: start;'>01/01/78</text>
|
151
|
+
<circle cy='291.222222222222' onmouseover='document.getElementById(538588218).setAttribute('visibility', 'visible' )' r='10' onmouseout='document.getElementById(538588218).setAttribute('visibility', 'hidden' )' cx='72.9716745119474' style='opacity: 0'/>
|
152
|
+
<text x='72.9716745119474' class='dataPointLabel' y='285.222222222222' style='fill: #000000; text-anchor:middle; font-size: 10px; font-family: "Arial", sans-serif; font-weight: normal; stroke: #fff; stroke-width: 2;'>5</text>
|
153
|
+
<text x='72.9716745119474' class='dataPointLabel' y='285.222222222222' style='fill: #000000; text-anchor:middle; font-size: 10px; font-family: "Arial", sans-serif; font-weight: normal;'>5</text>
|
154
|
+
<text visibility='hidden' x='150.943349023895' y='114.777777777778' id='538585168' style='fill: #000; text-anchor: start;'>01/01/83</text>
|
155
|
+
<circle cy='126.777777777778' onmouseover='document.getElementById(538585168).setAttribute('visibility', 'visible' )' r='10' onmouseout='document.getElementById(538585168).setAttribute('visibility', 'hidden' )' cx='145.943349023895' style='opacity: 0'/>
|
156
|
+
<text x='145.943349023895' class='dataPointLabel' y='120.777777777778' style='fill: #000000; text-anchor:middle; font-size: 10px; font-family: "Arial", sans-serif; font-weight: normal; stroke: #fff; stroke-width: 2;'>13</text>
|
157
|
+
<text x='145.943349023895' class='dataPointLabel' y='120.777777777778' style='fill: #000000; text-anchor:middle; font-size: 10px; font-family: "Arial", sans-serif; font-weight: normal;'>13</text>
|
158
|
+
<text visibility='hidden' x='296.926660629669' y='176.444444444444' id='538582118' style='fill: #000; text-anchor: start;'>01/01/93</text>
|
159
|
+
<circle cy='188.444444444444' onmouseover='document.getElementById(538582118).setAttribute('visibility', 'visible' )' r='10' onmouseout='document.getElementById(538582118).setAttribute('visibility', 'hidden' )' cx='291.926660629669' style='opacity: 0'/>
|
160
|
+
<text x='291.926660629669' class='dataPointLabel' y='182.444444444444' style='fill: #000000; text-anchor:middle; font-size: 10px; font-family: "Arial", sans-serif; font-weight: normal; stroke: #fff; stroke-width: 2;'>10</text>
|
161
|
+
<text x='291.926660629669' class='dataPointLabel' y='182.444444444444' style='fill: #000000; text-anchor:middle; font-size: 10px; font-family: "Arial", sans-serif; font-weight: normal;'>10</text>
|
162
|
+
<text visibility='hidden' x='442.870009653564' y='279.222222222222' id='538579068' style='fill: #000; text-anchor: start;'>01/01/03</text>
|
163
|
+
<circle cy='291.222222222222' onmouseover='document.getElementById(538579068).setAttribute('visibility', 'visible' )' r='10' onmouseout='document.getElementById(538579068).setAttribute('visibility', 'hidden' )' cx='437.870009653564' style='opacity: 0'/>
|
164
|
+
<text x='437.870009653564' class='dataPointLabel' y='285.222222222222' style='fill: #000000; text-anchor:middle; font-size: 10px; font-family: "Arial", sans-serif; font-weight: normal; stroke: #fff; stroke-width: 2;'>5</text>
|
165
|
+
<text x='437.870009653564' class='dataPointLabel' y='285.222222222222' style='fill: #000000; text-anchor:middle; font-size: 10px; font-family: "Arial", sans-serif; font-weight: normal;'>5</text>
|
166
|
+
</g>
|
167
|
+
</g>
|
168
|
+
<text x='320' class='mainTitle' y='16' style='text-anchor: middle; fill: #000000; font-size: 16px; font-family: "Arial", sans-serif; font-weight: normal;'>Plot</text>
|
169
|
+
<text x='320' class='xAxisTitle' y='468' style='text-anchor: middle; fill: #ff0000; font-size: 14px; font-family: "Arial", sans-serif; font-weight: normal;'>Time</text>
|
170
|
+
<text transform='rotate( -90, 17, 240 )' x='17' class='yAxisTitle' y='240' style='fill: #ff0000; text-anchor: middle; font-size: 14px; font-family: "Arial", sans-serif; font-weight: normal;'>Units</text>
|
171
|
+
<g transform='translate(531.0 46)'>
|
172
|
+
<rect x='0' class='key1' y='0' height='12' style='fill: #ff0000; stroke: none; stroke-width: 1px;' width='12'/>
|
173
|
+
<text x='17' class='keyText' y='12' style='fill: #000000; text-anchor:start; font-size: 10px; font-family: "Arial", sans-serif; font-weight: normal;'>Ice Cream</text>
|
174
|
+
<rect x='0' class='key2' y='17' height='12' style='fill: #0000ff; stroke: none; stroke-width: 1px;' width='12'/>
|
175
|
+
<text x='17' class='keyText' y='29' style='fill: #000000; text-anchor:start; font-size: 10px; font-family: "Arial", sans-serif; font-weight: normal;'>Ice Cream Cones</text>
|
176
|
+
<rect x='0' class='key3' y='34' height='12' style='fill: #00ff00; stroke: none; stroke-width: 1px;' width='12'/>
|
177
|
+
<text x='17' class='keyText' y='46' style='fill: #000000; text-anchor:start; font-size: 10px; font-family: "Arial", sans-serif; font-weight: normal;'>Sprinkles</text>
|
178
|
+
</g>
|
179
|
+
</svg>
|
Binary file
|
data/index.html
ADDED
@@ -0,0 +1,445 @@
|
|
1
|
+
<html>
|
2
|
+
<head>
|
3
|
+
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
4
|
+
<title>SVG::Graph</title>
|
5
|
+
<style media="all" type="text/css">@import "/~ser/styles/common.css";</style>
|
6
|
+
</head>
|
7
|
+
<body>
|
8
|
+
<div id="header">SVG::Graph</div>
|
9
|
+
<div id="menu">
|
10
|
+
<div class="sect1menu">
|
11
|
+
<a href="#N1001C">What is it?</a>
|
12
|
+
</div>
|
13
|
+
<div class="sect1menu">
|
14
|
+
<a href="#N10028">What's new?</a>
|
15
|
+
</div>
|
16
|
+
<div class="sect1menu">
|
17
|
+
<a href="#N10034">Screenshot</a>
|
18
|
+
</div>
|
19
|
+
<div class="sect1menu">
|
20
|
+
<a href="#N1005E">Why use it?</a>
|
21
|
+
</div>
|
22
|
+
<div class="sect1menu">
|
23
|
+
<a href="#N10070">Getting it</a>
|
24
|
+
</div>
|
25
|
+
<div class="sect1menu">
|
26
|
+
<a href="#N1009B">Why?</a>
|
27
|
+
</div>
|
28
|
+
<div class="sect1menu">
|
29
|
+
<a href="#N100E6">Dependancies</a>
|
30
|
+
</div>
|
31
|
+
<div class="sect1menu">
|
32
|
+
<a href="#N100EF">Usage</a>
|
33
|
+
</div>
|
34
|
+
<div class="sect1menu">
|
35
|
+
<a href="#N10100">Notes</a>
|
36
|
+
</div>
|
37
|
+
<div class="sect1menu">
|
38
|
+
<a href="#N10127">Bugs</a>
|
39
|
+
</div>
|
40
|
+
<div class="sect1menu">
|
41
|
+
<a href="#N1013D">Repository</a>
|
42
|
+
</div>
|
43
|
+
</div>
|
44
|
+
<div id="content">
|
45
|
+
<p></p>
|
46
|
+
|
47
|
+
|
48
|
+
0.6.1
|
49
|
+
|
50
|
+
|
51
|
+
|
52
|
+
<a name="N1001C">
|
53
|
+
<div class="sect1">
|
54
|
+
|
55
|
+
<h2>What is it?</h2>
|
56
|
+
|
57
|
+
|
58
|
+
<p>SVG:::Graph is a pure Ruby library for generating charts, which are
|
59
|
+
a type of graph where the values of one axis are not scalar. SVG::Graph
|
60
|
+
has a verry similar API to the Perl library SVG::TT::Graph, and the
|
61
|
+
resulting charts also look the same. This isn't surprising, because
|
62
|
+
SVG::Graph started as a loose port of SVG::TT::Graph, although the
|
63
|
+
internal code no longer resembles the Perl original at all.</p>
|
64
|
+
|
65
|
+
|
66
|
+
<p>SVG::Graph isn't only for charts. With version 0.4.0, support for
|
67
|
+
Plot charts was added, so scalar data may now be charted.</p>
|
68
|
+
|
69
|
+
</div>
|
70
|
+
</a>
|
71
|
+
|
72
|
+
<a name="N10028">
|
73
|
+
<div class="sect1">
|
74
|
+
|
75
|
+
<h2>What's new?</h2>
|
76
|
+
|
77
|
+
<p>You can find that out in the <a href="changelog.html">change log.</a>
|
78
|
+
</p>
|
79
|
+
|
80
|
+
</div>
|
81
|
+
</a>
|
82
|
+
|
83
|
+
<a name="N10034">
|
84
|
+
<div class="sect1">
|
85
|
+
|
86
|
+
<h2>Screenshot</h2>
|
87
|
+
|
88
|
+
|
89
|
+
<p>Gotta have one.</p>
|
90
|
+
|
91
|
+
|
92
|
+
<CENTER>
|
93
|
+
<OBJECT TYPE="image/svg+xml" DATA="images/pie.svg" WIDTH="640" HEIGHT="480"></OBJECT></CENTER>
|
94
|
+
|
95
|
+
|
96
|
+
<p>Here's a PNG version of the above image for the
|
97
|
+
SVG-challenged:</p>
|
98
|
+
|
99
|
+
|
100
|
+
<CENTER>
|
101
|
+
<IMG SRC="images/pie.png"></CENTER>
|
102
|
+
|
103
|
+
|
104
|
+
<p>The SVG version is <em>much</em> cooler. <a href="screenshots.html">More screenshots are available</a>.</p>
|
105
|
+
|
106
|
+
</div>
|
107
|
+
</a>
|
108
|
+
|
109
|
+
<a name="N1005E">
|
110
|
+
<div class="sect1">
|
111
|
+
|
112
|
+
<h2>Why use it?</h2>
|
113
|
+
|
114
|
+
|
115
|
+
<p>If you're a Ruby programmer, you can't use SVG::TT::Graph directly.
|
116
|
+
This package is for you.</p>
|
117
|
+
|
118
|
+
|
119
|
+
<p>If you want one of the features that this package has that the Perl
|
120
|
+
version doesn't, and you don't mind doing your graph code in Ruby, then
|
121
|
+
this package is for you.</p>
|
122
|
+
|
123
|
+
|
124
|
+
<p>If you want to generate SVGs that aren't CSS styled (and work with
|
125
|
+
more SVG renderers), use this package.</p>
|
126
|
+
|
127
|
+
|
128
|
+
<p>If you're a Perl wienie or you have something against Ruby, use
|
129
|
+
SVG::TT::Graph. If it doesn't provide you with the features you want, hack
|
130
|
+
it yourself.</p>
|
131
|
+
|
132
|
+
</div>
|
133
|
+
</a>
|
134
|
+
|
135
|
+
<a name="N10070">
|
136
|
+
<div class="sect1">
|
137
|
+
|
138
|
+
<h2>Getting it</h2>
|
139
|
+
|
140
|
+
|
141
|
+
<p>The source archives contain the example script(s) and an install
|
142
|
+
script. Documentation must be downloaded separately.<ul>
|
143
|
+
|
144
|
+
<li>
|
145
|
+
|
146
|
+
<p>
|
147
|
+
<a href="http://www.germane-software.com/archives/svg_graph_0.6.1.tgz">Gzipped
|
148
|
+
sources</a>
|
149
|
+
</p>
|
150
|
+
|
151
|
+
</li>
|
152
|
+
|
153
|
+
|
154
|
+
<li>
|
155
|
+
|
156
|
+
<p>
|
157
|
+
<a href="http://www.germane-software.com/archives/svg_graph_api_0.6.1.tgz">Gzipped
|
158
|
+
documentation</a>
|
159
|
+
</p>
|
160
|
+
|
161
|
+
</li>
|
162
|
+
|
163
|
+
|
164
|
+
<li>
|
165
|
+
|
166
|
+
<p>
|
167
|
+
<a href="http://www.germane-software.com/archives/svg_graph_0.6.1.zip">Zipped
|
168
|
+
sources</a>
|
169
|
+
</p>
|
170
|
+
|
171
|
+
</li>
|
172
|
+
|
173
|
+
|
174
|
+
<li>
|
175
|
+
|
176
|
+
<p>
|
177
|
+
<a href="http://www.germane-software.com/archives/svg_graph_api_0.6.1.zip">Zipped
|
178
|
+
documentation</a>
|
179
|
+
</p>
|
180
|
+
|
181
|
+
</li>
|
182
|
+
|
183
|
+
</ul>
|
184
|
+
</p>
|
185
|
+
|
186
|
+
</div>
|
187
|
+
</a>
|
188
|
+
|
189
|
+
<a name="N1009B">
|
190
|
+
<div class="sect1">
|
191
|
+
|
192
|
+
<h2>Why?</h2>
|
193
|
+
|
194
|
+
|
195
|
+
<p>The SVG::TT:Graph package is just fine. It lacked a couple of
|
196
|
+
features that I wanted, and it was in Perl<SUP><A href="#N100A2">1</A></SUP>, so I re-implemented it.</p>
|
197
|
+
|
198
|
+
|
199
|
+
<p>SVG::Graph is not a straight port of SVG::TT::Graph, because the
|
200
|
+
Perl version uses templates, and I don't believe that this is a job for
|
201
|
+
templates. Templates are great when you have lots of context containing a
|
202
|
+
little bit of evaluated code, but the Graph classes are mostly code with a
|
203
|
+
little SVG; therefore, it makes more sense (and is a hell of a lot more
|
204
|
+
readable) to have the SVG embedded in the code rather than vice versa.
|
205
|
+
However, some of the logic was directly cut and paste out of
|
206
|
+
SVG::TT::Graph, as was the entire CSS code and chunks of the
|
207
|
+
documentation, and the part of the API that the user sees is almost
|
208
|
+
identical to the original.</p>
|
209
|
+
|
210
|
+
|
211
|
+
<p>In version 0.2.0 I completely refactored the code to make it more
|
212
|
+
modular. As a result, the core Graph class contains most of the graph
|
213
|
+
drawing primatives, and the specializations (Bar, BarHorizontal, Line,
|
214
|
+
Pie, etc.) only draw the plot itself. This results in many fewer lines of
|
215
|
+
code, and that code is more robust. SVG::TT::Graph re-implemented most of
|
216
|
+
the code for every plot type, whereas SVG::Graph reuses most of the
|
217
|
+
code.</p>
|
218
|
+
|
219
|
+
|
220
|
+
<p>I intend SVG::Graph to have more features than SVG::TT::Graph, which
|
221
|
+
is the main reason for the re-implementation. One such feature is the
|
222
|
+
ability to change the stacking of the data sets. For instance, SVG::Graph
|
223
|
+
allows you to place the data bars from multiple data sets on the same
|
224
|
+
graph side-by-side, rather than overlapping.</p>
|
225
|
+
|
226
|
+
|
227
|
+
<p>SVG::Graph also has an option to disable CSS styling of the graphs.
|
228
|
+
This has a number of consequences, both positive and negative. The SVGs
|
229
|
+
generated can be larger without CSS, and they are harder to dynamically
|
230
|
+
style (you can't use your own styles with CSS disabled). However, a number
|
231
|
+
of SVG renderers do not support or do not fully support CSS in SVG (KSVG
|
232
|
+
in Konqueror and librsvg, for instance). Adobe and Batik both support CSS,
|
233
|
+
so if those are your targets, you can use CSS. For maximum compatability,
|
234
|
+
disable CSS with the :no_css attriibute.</p>
|
235
|
+
|
236
|
+
|
237
|
+
<p>The currently supported graph types are:</p>
|
238
|
+
|
239
|
+
|
240
|
+
<ul>
|
241
|
+
|
242
|
+
<li>
|
243
|
+
|
244
|
+
<p>Bar</p>
|
245
|
+
|
246
|
+
</li>
|
247
|
+
|
248
|
+
|
249
|
+
<li>
|
250
|
+
|
251
|
+
<p>BarHorizontal</p>
|
252
|
+
|
253
|
+
</li>
|
254
|
+
|
255
|
+
|
256
|
+
<li>
|
257
|
+
|
258
|
+
<p>Line</p>
|
259
|
+
|
260
|
+
</li>
|
261
|
+
|
262
|
+
|
263
|
+
<li>
|
264
|
+
|
265
|
+
<p>Pie</p>
|
266
|
+
|
267
|
+
</li>
|
268
|
+
|
269
|
+
|
270
|
+
<li>
|
271
|
+
|
272
|
+
<p>Plot (this is scalar data)</p>
|
273
|
+
|
274
|
+
</li>
|
275
|
+
|
276
|
+
|
277
|
+
<li>
|
278
|
+
|
279
|
+
<p>TimeSeries (also scalar data, with one axis being dates)</p>
|
280
|
+
|
281
|
+
</li>
|
282
|
+
|
283
|
+
|
284
|
+
<li>
|
285
|
+
|
286
|
+
<p>Schedule (scalar time range data, with non-scalar Y axis)</p>
|
287
|
+
|
288
|
+
</li>
|
289
|
+
|
290
|
+
</ul>
|
291
|
+
|
292
|
+
</div>
|
293
|
+
</a>
|
294
|
+
|
295
|
+
<a name="N100E6">
|
296
|
+
<div class="sect1">
|
297
|
+
|
298
|
+
<h2>Dependancies</h2>
|
299
|
+
|
300
|
+
|
301
|
+
<p>REXML 3.0+, or Ruby 1.8+. If you want to use the SVG compression
|
302
|
+
feature, which generates zlib compressed SVGs, you must also have the Ruby
|
303
|
+
zlib library installed.</p>
|
304
|
+
|
305
|
+
</div>
|
306
|
+
</a>
|
307
|
+
|
308
|
+
<a name="N100EF">
|
309
|
+
<div class="sect1">
|
310
|
+
|
311
|
+
<h2>Usage</h2>
|
312
|
+
|
313
|
+
|
314
|
+
<p>There's API documentation available, either <a href="http://www.germane-software.com/software/SVG/SVG::Graph/doc">online</a>
|
315
|
+
or for <a href="http://www.germane-software.com/archive/svg_graph_api_0.6.1.tgz">download</a>.
|
316
|
+
Or, you can use rdoc to generate it yourself. The API documentation is
|
317
|
+
pretty comprehensive (Leo Lapworth did a really good job on the docs, and
|
318
|
+
I stole most of them), and there's an example application in the main
|
319
|
+
directory.</p>
|
320
|
+
|
321
|
+
</div>
|
322
|
+
</a>
|
323
|
+
|
324
|
+
<a name="N10100">
|
325
|
+
<div class="sect1">
|
326
|
+
|
327
|
+
<h2>Notes</h2>
|
328
|
+
|
329
|
+
|
330
|
+
<a name="N10105">
|
331
|
+
<div class="sect2">
|
332
|
+
|
333
|
+
<h3>SVG feature support</h3>
|
334
|
+
|
335
|
+
|
336
|
+
<p>Some SVG renderers (librsvg) do not understand CSS. This is a
|
337
|
+
problem with Perl's SVG::TT::Graph, because <em>all</em> of
|
338
|
+
the styling of the charts it generates is done with CSS. SVG::Graph is
|
339
|
+
able to inline the styles, rendering graphs that are compatible with
|
340
|
+
more viewers.</p>
|
341
|
+
|
342
|
+
|
343
|
+
<p>The Pie chart uses the feGaussianBlur filter to generate the
|
344
|
+
shadow, whiich is also unsupperted by some renderers (librsvg). The
|
345
|
+
shadow will not look as smooth on those displays, although it will
|
346
|
+
render.</p>
|
347
|
+
|
348
|
+
</div>
|
349
|
+
</a>
|
350
|
+
|
351
|
+
<a name="N10114">
|
352
|
+
<div class="sect2">
|
353
|
+
|
354
|
+
<h3>Sizes</h3>
|
355
|
+
|
356
|
+
|
357
|
+
<p>The bar charts PNGs tend to be smaller than the uncompressed SVGs.
|
358
|
+
In the best case (for PNG), the PNG is 66% of the size of the
|
359
|
+
uncompressed SVG.</p>
|
360
|
+
|
361
|
+
|
362
|
+
<p>For line and pie charts, which are a little more visually complex,
|
363
|
+
the SVGs are smaller than the PNGs. In the best case, the PNG is 130%
|
364
|
+
the size of the SVG. In the worst case, the PNG is 220% the size of the
|
365
|
+
uncompressed SVG.</p>
|
366
|
+
|
367
|
+
|
368
|
+
<p>The compressed SVGs are always much smaller than the PNGs. In the
|
369
|
+
best case (a vertical bar chart), the PNG is 4.4 times the size of the
|
370
|
+
compressed SVG, and in the worst case (for a pie chart), it is over 12
|
371
|
+
times the size of the compressed SVG.</p>
|
372
|
+
|
373
|
+
|
374
|
+
<p>These values were measured with inline styled SVGs, and the PNGs
|
375
|
+
were reduced to 8-bit, indexed images, and were crushed with
|
376
|
+
pngcrush.</p>
|
377
|
+
|
378
|
+
</div>
|
379
|
+
</a>
|
380
|
+
|
381
|
+
</div>
|
382
|
+
</a>
|
383
|
+
|
384
|
+
<a name="N10127">
|
385
|
+
<div class="sect1">
|
386
|
+
|
387
|
+
<h2>Bugs</h2>
|
388
|
+
|
389
|
+
|
390
|
+
<p>SVG::Graph probably contains bugs. In fact, it is probably mostly
|
391
|
+
bugs, held together with some working code around them. In particular,
|
392
|
+
SVG::Graph is probably really intolerant of *your* bugs, and is likely
|
393
|
+
entirely unhelpful in helping you track down problems. We can only pray
|
394
|
+
that this situation improves<SUP><A href="#N1012E">2</A></SUP>.</p>
|
395
|
+
|
396
|
+
|
397
|
+
<p>There is a <a href="http://www.germane-software.com/cgi-bin/roundup/svg-graph">bug and
|
398
|
+
feature request database</a>; use this, and please create a user
|
399
|
+
account if you don't have one, so that I can email you if I have
|
400
|
+
questions. Alternatively, post anonymously, and check the database
|
401
|
+
often.</p>
|
402
|
+
|
403
|
+
</div>
|
404
|
+
</a>
|
405
|
+
|
406
|
+
<a name="N1013D">
|
407
|
+
<div class="sect1">
|
408
|
+
|
409
|
+
<h2>Repository</h2>
|
410
|
+
|
411
|
+
|
412
|
+
<p>The sourcecode repository is a <a href="http://subversion.tigris.org">Subversion</a> repository, located
|
413
|
+
<a href="http://www.germane-software.com/repositories/public/SVG">here</a>.</p>
|
414
|
+
|
415
|
+
</div>
|
416
|
+
</a>
|
417
|
+
|
418
|
+
</div>
|
419
|
+
<div id="footnotes">
|
420
|
+
<div class="footnote">
|
421
|
+
<div class="footnotenum">
|
422
|
+
<A name="N100A2">1)</A>
|
423
|
+
</div>
|
424
|
+
|
425
|
+
<p>Perl is from Hell. The language is bad enough, but working with
|
426
|
+
the package system -- CPAN, etc. -- is an exercize in masochism. I'd
|
427
|
+
rather chew on glass.</p>
|
428
|
+
|
429
|
+
</div>
|
430
|
+
<div class="footnote">
|
431
|
+
<div class="footnotenum">
|
432
|
+
<A name="N1012E">2)</A>
|
433
|
+
</div>
|
434
|
+
|
435
|
+
<p>Prayer is much more effective when accompanied by sums of cash
|
436
|
+
sent to the author.</p>
|
437
|
+
|
438
|
+
</div>
|
439
|
+
</div>
|
440
|
+
<div id="footer">
|
441
|
+
<div style="float:right">Copyright Sean Russell</div>
|
442
|
+
[ <a href="http://www.germane-software.com/~ser">Main</a> ]
|
443
|
+
</div>
|
444
|
+
</body>
|
445
|
+
</html>
|