simplecharts

SVG charts without dependencies
git clone https://git.ce9e.org/simplecharts.git

commit
46e8c1ce03d9c64ddfbedac5cb2590f24d7aaec4
parent
1150b1b8f55b33f49da3432c4c0e83aae5f7fc34
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2019-06-04 18:58
Merge branch 'aria-table'

Diffstat

M simplecharts.py 84 +++++++++++++++++++++++++++++++++++++++++++++++--------------
M tests/no-legend_ColumnRenderer.svg 108 ++++++++++++++++++++++++++++++++-----------------------------
M tests/no-legend_LineRenderer.svg 72 ++++++++++++++++++++++++++++++++++++++++++++++++++----------
M tests/no-legend_StackedAreaRenderer.svg 72 ++++++++++++++++++++++++++++++++++++++++++++++++++----------
M tests/no-legend_StackedColumnRenderer.svg 108 ++++++++++++++++++++++++++++++++-----------------------------
M tests/simple_ColumnRenderer.svg 126 +++++++++++++++++++++++++++++++------------------------------
M tests/simple_LineRenderer.svg 88 +++++++++++++++++++++++++++++++++++++++++++++++--------------
M tests/simple_StackedAreaRenderer.svg 88 +++++++++++++++++++++++++++++++++++++++++++++++--------------
M tests/simple_StackedColumnRenderer.svg 126 +++++++++++++++++++++++++++++++------------------------------
M tests/single_ColumnRenderer.svg 56 ++++++++++++++++++++++++++++----------------------------
M tests/single_LineRenderer.svg 40 ++++++++++++++++++++++++++++++----------
M tests/single_StackedAreaRenderer.svg 40 ++++++++++++++++++++++++++++++----------
M tests/single_StackedColumnRenderer.svg 56 ++++++++++++++++++++++++++++----------------------------

13 files changed, 679 insertions, 385 deletions


diff --git a/simplecharts.py b/simplecharts.py

@@ -71,6 +71,12 @@ class BaseRenderer:
   71    71         return self.element(
   72    72             'rect', content, x=x, y=y, width=width, height=height, **kwargs)
   73    73 
   -1    74     def circle(self, x, y, radius=3, title=None, **kwargs):
   -1    75         content = None
   -1    76         if title:
   -1    77             content = self.element('title', escape(str(title)))
   -1    78         return self.element('circle', content, cx=x, cy=y, r=radius, **kwargs)
   -1    79 
   74    80     def path(self, points, **kwargs):
   75    81         d = 'M {},{} L'.format(*points[0])
   76    82         for x, y in points[1:]:
@@ -78,34 +84,38 @@ class BaseRenderer:
   78    84         return self.element('path', d=d, **kwargs)
   79    85 
   80    86     def get_title(self, rows, legend, i, j):
   81    -1         key = rows[i]['label']
   82    -1         if legend:
   83    -1             key += ' - ' + legend[j]
   84    -1         return '{}: {}'.format(key, rows[i]['values'][j])
   -1    87         return rows[i]['values'][j]
   85    88 
   86    89     def render_axes(self, rows, max_value):
   87    90         s = ''
   88    91         s += self.line(0, 0, 0, self.height, self.ui_color)
   89    92         s += self.line(0, self.width, self.height, self.height, self.ui_color)
   90    93 
   -1    94         group = ''
   91    95         for y, value in [
   92    96             (self.height, 0),
   93    97             (self.height / 2, max_value // 2),
   94    98             (0, max_value),
   95    99         ]:
   96    -1             s += self.text(value, -self.char_padding, y, **{
   -1   100             group += self.text(value, -self.char_padding, y, **{
   97   101                 'dominant-baseline': 'middle',
   98   102                 'text-anchor': 'end',
   99   103             })
   -1   104         s += self.element('g', group, **{
   -1   105             'aria-hidden': 'true',
   -1   106         })
  100   107 
   -1   108         group = ''
  101   109         width = self.width / len(rows)
  102   110         y = self.height + self.y_labels / 2
  103   111         for i, row in enumerate(rows):
  104   112             x = (i + 0.5) * width
  105    -1             s += self.text(row['label'], x, y, **{
   -1   113             group += self.text(row['label'], x, y, **{
  106   114                 'dominant-baseline': 'middle',
  107   115                 'text-anchor': 'middle',
   -1   116                 'role': 'columnheader',
  108   117             })
   -1   118         s += self.element('g', group, role='row')
  109   119 
  110   120         return s
  111   121 
@@ -140,7 +150,9 @@ class BaseRenderer:
  140   150             # margin
  141   151             x += self.char_width
  142   152 
  143    -1         return self.element('g', s)
   -1   153         return self.element('g', s, **{
   -1   154             'aria-hidden': 'true',
   -1   155         })
  144   156 
  145   157     def render_rows(self, rows, legend, max_value):
  146   158         raise NotImplementedError
@@ -166,6 +178,7 @@ class BaseRenderer:
  166   178         if legend:
  167   179             content += self.render_legend(legend)
  168   180         content += self.render_rows(data['rows'], legend, max_value)
   -1   181         content = self.element('g', content, role='table')
  169   182 
  170   183         return self.element(
  171   184             'svg',
@@ -181,9 +194,10 @@ class ColumnRenderer(BaseRenderer):
  181   194         n = len(rows)
  182   195         k = len(rows[0]['values'])
  183   196         width = self.width / n / (k + 2)
  184    -1         for i, row in enumerate(rows):
   -1   197         for j in range(k):
  185   198             group = ''
  186    -1             for j, value in enumerate(row['values']):
   -1   199             for i in range(n):
   -1   200                 value = rows[i]['values'][j]
  187   201                 height = self.height * value / max_value
  188   202                 x = width * (i * (k + 2) + j + 1)
  189   203                 group += self.rect(
@@ -191,11 +205,12 @@ class ColumnRenderer(BaseRenderer):
  191   205                     self.height - height - 1,
  192   206                     width,
  193   207                     height,
  194    -1                     fill=self.get_color(j),
  195    -1                     stroke='white',
  196   208                     title=self.get_title(rows, legend, i, j),
   -1   209                     role='cell',
  197   210                 )
  198    -1             s += self.element('g', group)
   -1   211             s += self.element(
   -1   212                 'g', group, fill=self.get_color(j), stroke='white', role='row'
   -1   213             )
  199   214         return s
  200   215 
  201   216 
@@ -205,20 +220,27 @@ class StackedColumnRenderer(BaseRenderer):
  205   220     def render_rows(self, rows, legend, max_value):
  206   221         s = ''
  207   222         n = len(rows)
   -1   223         k = len(rows[0]['values'])
   -1   224         groups = ['' for j in range(k)]
  208   225         width = self.width / n
  209   226         for i, row in enumerate(rows):
  210    -1             group = ''
  211   227             y = self.height - 1
  212   228             for j, value in enumerate(row['values']):
  213   229                 height = self.height * value / max_value
  214   230                 x = width * (i + 0.5)
  215   231                 y -= height
  216    -1                 group += self.rect(x - width / 6, y, width / 3, height, **{
  217    -1                     'fill': self.get_color(j),
  218    -1                     'stroke': 'white',
  219    -1                     'title': self.get_title(rows, legend, i, j),
  220    -1                 })
  221    -1             s += self.element('g', group)
   -1   232                 groups[j] += self.rect(
   -1   233                     x - width / 6,
   -1   234                     y,
   -1   235                     width / 3,
   -1   236                     height,
   -1   237                     title=self.get_title(rows, legend, i, j),
   -1   238                     role='cell',
   -1   239                 )
   -1   240         for j, group in enumerate(groups):
   -1   241             s += self.element(
   -1   242                 'g', group, fill=self.get_color(j), stroke='white', role='row'
   -1   243             )
  222   244         return s
  223   245 
  224   246 
@@ -227,13 +249,25 @@ class LineRenderer(BaseRenderer):
  227   249         s = ''
  228   250         k = len(rows[0]['values'])
  229   251         width = self.width / len(rows)
   -1   252         dots = ''
  230   253         for j in range(k):
   -1   254             group = ''
  231   255             points = []
  232   256             for i, row in enumerate(rows):
  233   257                 x = width * (i + 0.5)
  234   258                 y = self.height * row['values'][j] / max_value
   -1   259                 group += self.circle(
   -1   260                     x,
   -1   261                     self.height - y,
   -1   262                     title=self.get_title(rows, legend, i, j),
   -1   263                     role='cell',
   -1   264                 )
  235   265                 points.append((x, self.height - y))
   -1   266             dots += self.element(
   -1   267                 'g', group, fill=self.get_color(j), stroke='white', role='row'
   -1   268             )
  236   269             s += self.path(points, fill='none', stroke=self.get_color(j))
   -1   270         s += dots
  237   271         return s
  238   272 
  239   273 
@@ -245,14 +279,26 @@ class StackedAreaRenderer(BaseRenderer):
  245   279         k = len(rows[0]['values'])
  246   280         width = self.width / len(rows)
  247   281         prev = [(width * (i + 0.5), 1) for i in range(len(rows))]
   -1   282         dots = ''
  248   283         for j in range(k):
   -1   284             group = ''
  249   285             points = []
  250   286             for i, row in enumerate(rows):
  251   287                 x = width * (i + 0.5)
  252   288                 y = self.height * row['values'][j] / max_value
   -1   289                 group += self.circle(
   -1   290                     x,
   -1   291                     self.height - (prev[i][1] + y),
   -1   292                     title=self.get_title(rows, legend, i, j),
   -1   293                     role='cell',
   -1   294                 )
  253   295                 points.append((x, prev[i][1] + y))
   -1   296             dots += self.element(
   -1   297                 'g', group, fill=self.get_color(j), stroke='white', role='row'
   -1   298             )
  254   299             s += self.path([
  255   300                 (x, self.height - y) for x, y in points + list(reversed(prev))
  256   301             ], fill=self.get_color(j), stroke='white')
  257   302             prev = points
   -1   303         s += dots
  258   304         return s

diff --git a/tests/no-legend_ColumnRenderer.svg b/tests/no-legend_ColumnRenderer.svg

@@ -1,55 +1,59 @@
    1     1 <svg viewBox="-55 -25 700 530" xmlns="http://www.w3.org/2000/svg">
    2    -1 	<line stroke="#333" x1="0" x2="0" y1="0" y2="480" />
    3    -1 	<line stroke="#333" x1="0" x2="640" y1="480" y2="480" />
    4    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="480">0</text>
    5    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="240.0">3</text>
    6    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="0">6</text>
    7    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="middle" x="80.0" y="490.0">Apples</text>
    8    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="middle" x="240.0" y="490.0">Oranges</text>
    9    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="middle" x="400.0" y="490.0">Pears</text>
   10    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="middle" x="560.0" y="490.0">Bananas</text>
   11    -1 	<g>
   12    -1 		<rect fill="#e41a1c" height="240.0" stroke="white" width="32.0" x="32.0" y="239.0">
   13    -1 			<title>Apples: 3</title>
   14    -1 		</rect>
   15    -1 		<rect fill="#377eb8" height="160.0" stroke="white" width="32.0" x="64.0" y="319.0">
   16    -1 			<title>Apples: 2</title>
   17    -1 		</rect>
   18    -1 		<rect fill="#4daf4a" height="400.0" stroke="white" width="32.0" x="96.0" y="79.0">
   19    -1 			<title>Apples: 5</title>
   20    -1 		</rect>
   21    -1 	</g>
   22    -1 	<g>
   23    -1 		<rect fill="#e41a1c" height="320.0" stroke="white" width="32.0" x="192.0" y="159.0">
   24    -1 			<title>Oranges: 4</title>
   25    -1 		</rect>
   26    -1 		<rect fill="#377eb8" height="160.0" stroke="white" width="32.0" x="224.0" y="319.0">
   27    -1 			<title>Oranges: 2</title>
   28    -1 		</rect>
   29    -1 		<rect fill="#4daf4a" height="240.0" stroke="white" width="32.0" x="256.0" y="239.0">
   30    -1 			<title>Oranges: 3</title>
   31    -1 		</rect>
   32    -1 	</g>
   33    -1 	<g>
   34    -1 		<rect fill="#e41a1c" height="320.0" stroke="white" width="32.0" x="352.0" y="159.0">
   35    -1 			<title>Pears: 4</title>
   36    -1 		</rect>
   37    -1 		<rect fill="#377eb8" height="240.0" stroke="white" width="32.0" x="384.0" y="239.0">
   38    -1 			<title>Pears: 3</title>
   39    -1 		</rect>
   40    -1 		<rect fill="#4daf4a" height="320.0" stroke="white" width="32.0" x="416.0" y="159.0">
   41    -1 			<title>Pears: 4</title>
   42    -1 		</rect>
   43    -1 	</g>
   44    -1 	<g>
   45    -1 		<rect fill="#e41a1c" height="400.0" stroke="white" width="32.0" x="512.0" y="79.0">
   46    -1 			<title>Bananas: 5</title>
   47    -1 		</rect>
   48    -1 		<rect fill="#377eb8" height="80.0" stroke="white" width="32.0" x="544.0" y="399.0">
   49    -1 			<title>Bananas: 1</title>
   50    -1 		</rect>
   51    -1 		<rect fill="#4daf4a" height="160.0" stroke="white" width="32.0" x="576.0" y="319.0">
   52    -1 			<title>Bananas: 2</title>
   53    -1 		</rect>
   -1     2 	<g role="table">
   -1     3 		<line stroke="#333" x1="0" x2="0" y1="0" y2="480" />
   -1     4 		<line stroke="#333" x1="0" x2="640" y1="480" y2="480" />
   -1     5 		<g aria-hidden="true">
   -1     6 			<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="480">0</text>
   -1     7 			<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="240.0">3</text>
   -1     8 			<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="0">6</text>
   -1     9 		</g>
   -1    10 		<g role="row">
   -1    11 			<text dominant-baseline="middle" fill="#333" role="columnheader" text-anchor="middle" x="80.0" y="490.0">Apples</text>
   -1    12 			<text dominant-baseline="middle" fill="#333" role="columnheader" text-anchor="middle" x="240.0" y="490.0">Oranges</text>
   -1    13 			<text dominant-baseline="middle" fill="#333" role="columnheader" text-anchor="middle" x="400.0" y="490.0">Pears</text>
   -1    14 			<text dominant-baseline="middle" fill="#333" role="columnheader" text-anchor="middle" x="560.0" y="490.0">Bananas</text>
   -1    15 		</g>
   -1    16 		<g fill="#e41a1c" role="row" stroke="white">
   -1    17 			<rect height="240.0" role="cell" width="32.0" x="32.0" y="239.0">
   -1    18 				<title>3</title>
   -1    19 			</rect>
   -1    20 			<rect height="320.0" role="cell" width="32.0" x="192.0" y="159.0">
   -1    21 				<title>4</title>
   -1    22 			</rect>
   -1    23 			<rect height="320.0" role="cell" width="32.0" x="352.0" y="159.0">
   -1    24 				<title>4</title>
   -1    25 			</rect>
   -1    26 			<rect height="400.0" role="cell" width="32.0" x="512.0" y="79.0">
   -1    27 				<title>5</title>
   -1    28 			</rect>
   -1    29 		</g>
   -1    30 		<g fill="#377eb8" role="row" stroke="white">
   -1    31 			<rect height="160.0" role="cell" width="32.0" x="64.0" y="319.0">
   -1    32 				<title>2</title>
   -1    33 			</rect>
   -1    34 			<rect height="160.0" role="cell" width="32.0" x="224.0" y="319.0">
   -1    35 				<title>2</title>
   -1    36 			</rect>
   -1    37 			<rect height="240.0" role="cell" width="32.0" x="384.0" y="239.0">
   -1    38 				<title>3</title>
   -1    39 			</rect>
   -1    40 			<rect height="80.0" role="cell" width="32.0" x="544.0" y="399.0">
   -1    41 				<title>1</title>
   -1    42 			</rect>
   -1    43 		</g>
   -1    44 		<g fill="#4daf4a" role="row" stroke="white">
   -1    45 			<rect height="400.0" role="cell" width="32.0" x="96.0" y="79.0">
   -1    46 				<title>5</title>
   -1    47 			</rect>
   -1    48 			<rect height="240.0" role="cell" width="32.0" x="256.0" y="239.0">
   -1    49 				<title>3</title>
   -1    50 			</rect>
   -1    51 			<rect height="320.0" role="cell" width="32.0" x="416.0" y="159.0">
   -1    52 				<title>4</title>
   -1    53 			</rect>
   -1    54 			<rect height="160.0" role="cell" width="32.0" x="576.0" y="319.0">
   -1    55 				<title>2</title>
   -1    56 			</rect>
   -1    57 		</g>
   54    58 	</g>
   55    59 </svg>

diff --git a/tests/no-legend_LineRenderer.svg b/tests/no-legend_LineRenderer.svg

@@ -1,14 +1,62 @@
    1     1 <svg viewBox="-55 -25 700 530" xmlns="http://www.w3.org/2000/svg">
    2    -1 	<line stroke="#333" x1="0" x2="0" y1="0" y2="480" />
    3    -1 	<line stroke="#333" x1="0" x2="640" y1="480" y2="480" />
    4    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="480">0</text>
    5    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="240.0">3</text>
    6    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="0">6</text>
    7    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="middle" x="80.0" y="490.0">Apples</text>
    8    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="middle" x="240.0" y="490.0">Oranges</text>
    9    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="middle" x="400.0" y="490.0">Pears</text>
   10    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="middle" x="560.0" y="490.0">Bananas</text>
   11    -1 	<path d="M 80.0,240.0 L 240.0,160.0 400.0,160.0 560.0,80.0" fill="none" stroke="#e41a1c" />
   12    -1 	<path d="M 80.0,320.0 L 240.0,320.0 400.0,240.0 560.0,400.0" fill="none" stroke="#377eb8" />
   13    -1 	<path d="M 80.0,80.0 L 240.0,240.0 400.0,160.0 560.0,320.0" fill="none" stroke="#4daf4a" />
   -1     2 	<g role="table">
   -1     3 		<line stroke="#333" x1="0" x2="0" y1="0" y2="480" />
   -1     4 		<line stroke="#333" x1="0" x2="640" y1="480" y2="480" />
   -1     5 		<g aria-hidden="true">
   -1     6 			<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="480">0</text>
   -1     7 			<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="240.0">3</text>
   -1     8 			<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="0">6</text>
   -1     9 		</g>
   -1    10 		<g role="row">
   -1    11 			<text dominant-baseline="middle" fill="#333" role="columnheader" text-anchor="middle" x="80.0" y="490.0">Apples</text>
   -1    12 			<text dominant-baseline="middle" fill="#333" role="columnheader" text-anchor="middle" x="240.0" y="490.0">Oranges</text>
   -1    13 			<text dominant-baseline="middle" fill="#333" role="columnheader" text-anchor="middle" x="400.0" y="490.0">Pears</text>
   -1    14 			<text dominant-baseline="middle" fill="#333" role="columnheader" text-anchor="middle" x="560.0" y="490.0">Bananas</text>
   -1    15 		</g>
   -1    16 		<path d="M 80.0,240.0 L 240.0,160.0 400.0,160.0 560.0,80.0" fill="none" stroke="#e41a1c" />
   -1    17 		<path d="M 80.0,320.0 L 240.0,320.0 400.0,240.0 560.0,400.0" fill="none" stroke="#377eb8" />
   -1    18 		<path d="M 80.0,80.0 L 240.0,240.0 400.0,160.0 560.0,320.0" fill="none" stroke="#4daf4a" />
   -1    19 		<g fill="#e41a1c" role="row" stroke="white">
   -1    20 			<circle cx="80.0" cy="240.0" r="3" role="cell">
   -1    21 				<title>3</title>
   -1    22 			</circle>
   -1    23 			<circle cx="240.0" cy="160.0" r="3" role="cell">
   -1    24 				<title>4</title>
   -1    25 			</circle>
   -1    26 			<circle cx="400.0" cy="160.0" r="3" role="cell">
   -1    27 				<title>4</title>
   -1    28 			</circle>
   -1    29 			<circle cx="560.0" cy="80.0" r="3" role="cell">
   -1    30 				<title>5</title>
   -1    31 			</circle>
   -1    32 		</g>
   -1    33 		<g fill="#377eb8" role="row" stroke="white">
   -1    34 			<circle cx="80.0" cy="320.0" r="3" role="cell">
   -1    35 				<title>2</title>
   -1    36 			</circle>
   -1    37 			<circle cx="240.0" cy="320.0" r="3" role="cell">
   -1    38 				<title>2</title>
   -1    39 			</circle>
   -1    40 			<circle cx="400.0" cy="240.0" r="3" role="cell">
   -1    41 				<title>3</title>
   -1    42 			</circle>
   -1    43 			<circle cx="560.0" cy="400.0" r="3" role="cell">
   -1    44 				<title>1</title>
   -1    45 			</circle>
   -1    46 		</g>
   -1    47 		<g fill="#4daf4a" role="row" stroke="white">
   -1    48 			<circle cx="80.0" cy="80.0" r="3" role="cell">
   -1    49 				<title>5</title>
   -1    50 			</circle>
   -1    51 			<circle cx="240.0" cy="240.0" r="3" role="cell">
   -1    52 				<title>3</title>
   -1    53 			</circle>
   -1    54 			<circle cx="400.0" cy="160.0" r="3" role="cell">
   -1    55 				<title>4</title>
   -1    56 			</circle>
   -1    57 			<circle cx="560.0" cy="320.0" r="3" role="cell">
   -1    58 				<title>2</title>
   -1    59 			</circle>
   -1    60 		</g>
   -1    61 	</g>
   14    62 </svg>

diff --git a/tests/no-legend_StackedAreaRenderer.svg b/tests/no-legend_StackedAreaRenderer.svg

@@ -1,14 +1,62 @@
    1     1 <svg viewBox="-55 -25 700 530" xmlns="http://www.w3.org/2000/svg">
    2    -1 	<line stroke="#333" x1="0" x2="0" y1="0" y2="480" />
    3    -1 	<line stroke="#333" x1="0" x2="640" y1="480" y2="480" />
    4    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="480">0</text>
    5    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="240.0">10</text>
    6    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="0">20</text>
    7    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="middle" x="80.0" y="490.0">Apples</text>
    8    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="middle" x="240.0" y="490.0">Oranges</text>
    9    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="middle" x="400.0" y="490.0">Pears</text>
   10    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="middle" x="560.0" y="490.0">Bananas</text>
   11    -1 	<path d="M 80.0,407.0 L 240.0,383.0 400.0,383.0 560.0,359.0 560.0,479 400.0,479 240.0,479 80.0,479" fill="#e41a1c" stroke="white" />
   12    -1 	<path d="M 80.0,359.0 L 240.0,335.0 400.0,311.0 560.0,335.0 560.0,359.0 400.0,383.0 240.0,383.0 80.0,407.0" fill="#377eb8" stroke="white" />
   13    -1 	<path d="M 80.0,239.0 L 240.0,263.0 400.0,215.0 560.0,287.0 560.0,335.0 400.0,311.0 240.0,335.0 80.0,359.0" fill="#4daf4a" stroke="white" />
   -1     2 	<g role="table">
   -1     3 		<line stroke="#333" x1="0" x2="0" y1="0" y2="480" />
   -1     4 		<line stroke="#333" x1="0" x2="640" y1="480" y2="480" />
   -1     5 		<g aria-hidden="true">
   -1     6 			<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="480">0</text>
   -1     7 			<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="240.0">10</text>
   -1     8 			<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="0">20</text>
   -1     9 		</g>
   -1    10 		<g role="row">
   -1    11 			<text dominant-baseline="middle" fill="#333" role="columnheader" text-anchor="middle" x="80.0" y="490.0">Apples</text>
   -1    12 			<text dominant-baseline="middle" fill="#333" role="columnheader" text-anchor="middle" x="240.0" y="490.0">Oranges</text>
   -1    13 			<text dominant-baseline="middle" fill="#333" role="columnheader" text-anchor="middle" x="400.0" y="490.0">Pears</text>
   -1    14 			<text dominant-baseline="middle" fill="#333" role="columnheader" text-anchor="middle" x="560.0" y="490.0">Bananas</text>
   -1    15 		</g>
   -1    16 		<path d="M 80.0,407.0 L 240.0,383.0 400.0,383.0 560.0,359.0 560.0,479 400.0,479 240.0,479 80.0,479" fill="#e41a1c" stroke="white" />
   -1    17 		<path d="M 80.0,359.0 L 240.0,335.0 400.0,311.0 560.0,335.0 560.0,359.0 400.0,383.0 240.0,383.0 80.0,407.0" fill="#377eb8" stroke="white" />
   -1    18 		<path d="M 80.0,239.0 L 240.0,263.0 400.0,215.0 560.0,287.0 560.0,335.0 400.0,311.0 240.0,335.0 80.0,359.0" fill="#4daf4a" stroke="white" />
   -1    19 		<g fill="#e41a1c" role="row" stroke="white">
   -1    20 			<circle cx="80.0" cy="407.0" r="3" role="cell">
   -1    21 				<title>3</title>
   -1    22 			</circle>
   -1    23 			<circle cx="240.0" cy="383.0" r="3" role="cell">
   -1    24 				<title>4</title>
   -1    25 			</circle>
   -1    26 			<circle cx="400.0" cy="383.0" r="3" role="cell">
   -1    27 				<title>4</title>
   -1    28 			</circle>
   -1    29 			<circle cx="560.0" cy="359.0" r="3" role="cell">
   -1    30 				<title>5</title>
   -1    31 			</circle>
   -1    32 		</g>
   -1    33 		<g fill="#377eb8" role="row" stroke="white">
   -1    34 			<circle cx="80.0" cy="359.0" r="3" role="cell">
   -1    35 				<title>2</title>
   -1    36 			</circle>
   -1    37 			<circle cx="240.0" cy="335.0" r="3" role="cell">
   -1    38 				<title>2</title>
   -1    39 			</circle>
   -1    40 			<circle cx="400.0" cy="311.0" r="3" role="cell">
   -1    41 				<title>3</title>
   -1    42 			</circle>
   -1    43 			<circle cx="560.0" cy="335.0" r="3" role="cell">
   -1    44 				<title>1</title>
   -1    45 			</circle>
   -1    46 		</g>
   -1    47 		<g fill="#4daf4a" role="row" stroke="white">
   -1    48 			<circle cx="80.0" cy="239.0" r="3" role="cell">
   -1    49 				<title>5</title>
   -1    50 			</circle>
   -1    51 			<circle cx="240.0" cy="263.0" r="3" role="cell">
   -1    52 				<title>3</title>
   -1    53 			</circle>
   -1    54 			<circle cx="400.0" cy="215.0" r="3" role="cell">
   -1    55 				<title>4</title>
   -1    56 			</circle>
   -1    57 			<circle cx="560.0" cy="287.0" r="3" role="cell">
   -1    58 				<title>2</title>
   -1    59 			</circle>
   -1    60 		</g>
   -1    61 	</g>
   14    62 </svg>

diff --git a/tests/no-legend_StackedColumnRenderer.svg b/tests/no-legend_StackedColumnRenderer.svg

@@ -1,55 +1,59 @@
    1     1 <svg viewBox="-55 -25 700 530" xmlns="http://www.w3.org/2000/svg">
    2    -1 	<line stroke="#333" x1="0" x2="0" y1="0" y2="480" />
    3    -1 	<line stroke="#333" x1="0" x2="640" y1="480" y2="480" />
    4    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="480">0</text>
    5    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="240.0">10</text>
    6    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="0">20</text>
    7    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="middle" x="80.0" y="490.0">Apples</text>
    8    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="middle" x="240.0" y="490.0">Oranges</text>
    9    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="middle" x="400.0" y="490.0">Pears</text>
   10    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="middle" x="560.0" y="490.0">Bananas</text>
   11    -1 	<g>
   12    -1 		<rect fill="#e41a1c" height="72.0" stroke="white" width="53.333333333333336" x="53.33333333333333" y="407.0">
   13    -1 			<title>Apples: 3</title>
   14    -1 		</rect>
   15    -1 		<rect fill="#377eb8" height="48.0" stroke="white" width="53.333333333333336" x="53.33333333333333" y="359.0">
   16    -1 			<title>Apples: 2</title>
   17    -1 		</rect>
   18    -1 		<rect fill="#4daf4a" height="120.0" stroke="white" width="53.333333333333336" x="53.33333333333333" y="239.0">
   19    -1 			<title>Apples: 5</title>
   20    -1 		</rect>
   21    -1 	</g>
   22    -1 	<g>
   23    -1 		<rect fill="#e41a1c" height="96.0" stroke="white" width="53.333333333333336" x="213.33333333333334" y="383.0">
   24    -1 			<title>Oranges: 4</title>
   25    -1 		</rect>
   26    -1 		<rect fill="#377eb8" height="48.0" stroke="white" width="53.333333333333336" x="213.33333333333334" y="335.0">
   27    -1 			<title>Oranges: 2</title>
   28    -1 		</rect>
   29    -1 		<rect fill="#4daf4a" height="72.0" stroke="white" width="53.333333333333336" x="213.33333333333334" y="263.0">
   30    -1 			<title>Oranges: 3</title>
   31    -1 		</rect>
   32    -1 	</g>
   33    -1 	<g>
   34    -1 		<rect fill="#e41a1c" height="96.0" stroke="white" width="53.333333333333336" x="373.3333333333333" y="383.0">
   35    -1 			<title>Pears: 4</title>
   36    -1 		</rect>
   37    -1 		<rect fill="#377eb8" height="72.0" stroke="white" width="53.333333333333336" x="373.3333333333333" y="311.0">
   38    -1 			<title>Pears: 3</title>
   39    -1 		</rect>
   40    -1 		<rect fill="#4daf4a" height="96.0" stroke="white" width="53.333333333333336" x="373.3333333333333" y="215.0">
   41    -1 			<title>Pears: 4</title>
   42    -1 		</rect>
   43    -1 	</g>
   44    -1 	<g>
   45    -1 		<rect fill="#e41a1c" height="120.0" stroke="white" width="53.333333333333336" x="533.3333333333334" y="359.0">
   46    -1 			<title>Bananas: 5</title>
   47    -1 		</rect>
   48    -1 		<rect fill="#377eb8" height="24.0" stroke="white" width="53.333333333333336" x="533.3333333333334" y="335.0">
   49    -1 			<title>Bananas: 1</title>
   50    -1 		</rect>
   51    -1 		<rect fill="#4daf4a" height="48.0" stroke="white" width="53.333333333333336" x="533.3333333333334" y="287.0">
   52    -1 			<title>Bananas: 2</title>
   53    -1 		</rect>
   -1     2 	<g role="table">
   -1     3 		<line stroke="#333" x1="0" x2="0" y1="0" y2="480" />
   -1     4 		<line stroke="#333" x1="0" x2="640" y1="480" y2="480" />
   -1     5 		<g aria-hidden="true">
   -1     6 			<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="480">0</text>
   -1     7 			<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="240.0">10</text>
   -1     8 			<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="0">20</text>
   -1     9 		</g>
   -1    10 		<g role="row">
   -1    11 			<text dominant-baseline="middle" fill="#333" role="columnheader" text-anchor="middle" x="80.0" y="490.0">Apples</text>
   -1    12 			<text dominant-baseline="middle" fill="#333" role="columnheader" text-anchor="middle" x="240.0" y="490.0">Oranges</text>
   -1    13 			<text dominant-baseline="middle" fill="#333" role="columnheader" text-anchor="middle" x="400.0" y="490.0">Pears</text>
   -1    14 			<text dominant-baseline="middle" fill="#333" role="columnheader" text-anchor="middle" x="560.0" y="490.0">Bananas</text>
   -1    15 		</g>
   -1    16 		<g fill="#e41a1c" role="row" stroke="white">
   -1    17 			<rect height="72.0" role="cell" width="53.333333333333336" x="53.33333333333333" y="407.0">
   -1    18 				<title>3</title>
   -1    19 			</rect>
   -1    20 			<rect height="96.0" role="cell" width="53.333333333333336" x="213.33333333333334" y="383.0">
   -1    21 				<title>4</title>
   -1    22 			</rect>
   -1    23 			<rect height="96.0" role="cell" width="53.333333333333336" x="373.3333333333333" y="383.0">
   -1    24 				<title>4</title>
   -1    25 			</rect>
   -1    26 			<rect height="120.0" role="cell" width="53.333333333333336" x="533.3333333333334" y="359.0">
   -1    27 				<title>5</title>
   -1    28 			</rect>
   -1    29 		</g>
   -1    30 		<g fill="#377eb8" role="row" stroke="white">
   -1    31 			<rect height="48.0" role="cell" width="53.333333333333336" x="53.33333333333333" y="359.0">
   -1    32 				<title>2</title>
   -1    33 			</rect>
   -1    34 			<rect height="48.0" role="cell" width="53.333333333333336" x="213.33333333333334" y="335.0">
   -1    35 				<title>2</title>
   -1    36 			</rect>
   -1    37 			<rect height="72.0" role="cell" width="53.333333333333336" x="373.3333333333333" y="311.0">
   -1    38 				<title>3</title>
   -1    39 			</rect>
   -1    40 			<rect height="24.0" role="cell" width="53.333333333333336" x="533.3333333333334" y="335.0">
   -1    41 				<title>1</title>
   -1    42 			</rect>
   -1    43 		</g>
   -1    44 		<g fill="#4daf4a" role="row" stroke="white">
   -1    45 			<rect height="120.0" role="cell" width="53.333333333333336" x="53.33333333333333" y="239.0">
   -1    46 				<title>5</title>
   -1    47 			</rect>
   -1    48 			<rect height="72.0" role="cell" width="53.333333333333336" x="213.33333333333334" y="263.0">
   -1    49 				<title>3</title>
   -1    50 			</rect>
   -1    51 			<rect height="96.0" role="cell" width="53.333333333333336" x="373.3333333333333" y="215.0">
   -1    52 				<title>4</title>
   -1    53 			</rect>
   -1    54 			<rect height="48.0" role="cell" width="53.333333333333336" x="533.3333333333334" y="287.0">
   -1    55 				<title>2</title>
   -1    56 			</rect>
   -1    57 		</g>
   54    58 	</g>
   55    59 </svg>

diff --git a/tests/simple_ColumnRenderer.svg b/tests/simple_ColumnRenderer.svg

@@ -1,64 +1,68 @@
    1     1 <svg viewBox="-55 -25 700 530" xmlns="http://www.w3.org/2000/svg">
    2    -1 	<line stroke="#333" x1="0" x2="0" y1="0" y2="480" />
    3    -1 	<line stroke="#333" x1="0" x2="640" y1="480" y2="480" />
    4    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="480">0</text>
    5    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="240.0">3</text>
    6    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="0">6</text>
    7    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="middle" x="80.0" y="490.0">Apples</text>
    8    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="middle" x="240.0" y="490.0">Oranges</text>
    9    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="middle" x="400.0" y="490.0">Pears</text>
   10    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="middle" x="560.0" y="490.0">Bananas</text>
   11    -1 	<g>
   12    -1 		<rect fill="none" height="20" stroke="#333" width="180" x="460" y="-20" />
   13    -1 		<rect fill="#e41a1c" height="10" width="10" x="464" y="-15.0" />
   14    -1 		<text dominant-baseline="middle" fill="#333" x="478" y="-10.0">John</text>
   15    -1 		<rect fill="#377eb8" height="10" width="10" x="528" y="-15.0" />
   16    -1 		<text dominant-baseline="middle" fill="#333" x="542" y="-10.0">Jane</text>
   17    -1 		<rect fill="#4daf4a" height="10" width="10" x="592" y="-15.0" />
   18    -1 		<text dominant-baseline="middle" fill="#333" x="606" y="-10.0">Joe</text>
   19    -1 	</g>
   20    -1 	<g>
   21    -1 		<rect fill="#e41a1c" height="240.0" stroke="white" width="32.0" x="32.0" y="239.0">
   22    -1 			<title>Apples - John: 3</title>
   23    -1 		</rect>
   24    -1 		<rect fill="#377eb8" height="160.0" stroke="white" width="32.0" x="64.0" y="319.0">
   25    -1 			<title>Apples - Jane: 2</title>
   26    -1 		</rect>
   27    -1 		<rect fill="#4daf4a" height="400.0" stroke="white" width="32.0" x="96.0" y="79.0">
   28    -1 			<title>Apples - Joe: 5</title>
   29    -1 		</rect>
   30    -1 	</g>
   31    -1 	<g>
   32    -1 		<rect fill="#e41a1c" height="320.0" stroke="white" width="32.0" x="192.0" y="159.0">
   33    -1 			<title>Oranges - John: 4</title>
   34    -1 		</rect>
   35    -1 		<rect fill="#377eb8" height="160.0" stroke="white" width="32.0" x="224.0" y="319.0">
   36    -1 			<title>Oranges - Jane: 2</title>
   37    -1 		</rect>
   38    -1 		<rect fill="#4daf4a" height="240.0" stroke="white" width="32.0" x="256.0" y="239.0">
   39    -1 			<title>Oranges - Joe: 3</title>
   40    -1 		</rect>
   41    -1 	</g>
   42    -1 	<g>
   43    -1 		<rect fill="#e41a1c" height="320.0" stroke="white" width="32.0" x="352.0" y="159.0">
   44    -1 			<title>Pears - John: 4</title>
   45    -1 		</rect>
   46    -1 		<rect fill="#377eb8" height="240.0" stroke="white" width="32.0" x="384.0" y="239.0">
   47    -1 			<title>Pears - Jane: 3</title>
   48    -1 		</rect>
   49    -1 		<rect fill="#4daf4a" height="320.0" stroke="white" width="32.0" x="416.0" y="159.0">
   50    -1 			<title>Pears - Joe: 4</title>
   51    -1 		</rect>
   52    -1 	</g>
   53    -1 	<g>
   54    -1 		<rect fill="#e41a1c" height="400.0" stroke="white" width="32.0" x="512.0" y="79.0">
   55    -1 			<title>Bananas - John: 5</title>
   56    -1 		</rect>
   57    -1 		<rect fill="#377eb8" height="80.0" stroke="white" width="32.0" x="544.0" y="399.0">
   58    -1 			<title>Bananas - Jane: 1</title>
   59    -1 		</rect>
   60    -1 		<rect fill="#4daf4a" height="160.0" stroke="white" width="32.0" x="576.0" y="319.0">
   61    -1 			<title>Bananas - Joe: 2</title>
   62    -1 		</rect>
   -1     2 	<g role="table">
   -1     3 		<line stroke="#333" x1="0" x2="0" y1="0" y2="480" />
   -1     4 		<line stroke="#333" x1="0" x2="640" y1="480" y2="480" />
   -1     5 		<g aria-hidden="true">
   -1     6 			<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="480">0</text>
   -1     7 			<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="240.0">3</text>
   -1     8 			<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="0">6</text>
   -1     9 		</g>
   -1    10 		<g role="row">
   -1    11 			<text dominant-baseline="middle" fill="#333" role="columnheader" text-anchor="middle" x="80.0" y="490.0">Apples</text>
   -1    12 			<text dominant-baseline="middle" fill="#333" role="columnheader" text-anchor="middle" x="240.0" y="490.0">Oranges</text>
   -1    13 			<text dominant-baseline="middle" fill="#333" role="columnheader" text-anchor="middle" x="400.0" y="490.0">Pears</text>
   -1    14 			<text dominant-baseline="middle" fill="#333" role="columnheader" text-anchor="middle" x="560.0" y="490.0">Bananas</text>
   -1    15 		</g>
   -1    16 		<g aria-hidden="true">
   -1    17 			<rect fill="none" height="20" stroke="#333" width="180" x="460" y="-20" />
   -1    18 			<rect fill="#e41a1c" height="10" width="10" x="464" y="-15.0" />
   -1    19 			<text dominant-baseline="middle" fill="#333" x="478" y="-10.0">John</text>
   -1    20 			<rect fill="#377eb8" height="10" width="10" x="528" y="-15.0" />
   -1    21 			<text dominant-baseline="middle" fill="#333" x="542" y="-10.0">Jane</text>
   -1    22 			<rect fill="#4daf4a" height="10" width="10" x="592" y="-15.0" />
   -1    23 			<text dominant-baseline="middle" fill="#333" x="606" y="-10.0">Joe</text>
   -1    24 		</g>
   -1    25 		<g fill="#e41a1c" role="row" stroke="white">
   -1    26 			<rect height="240.0" role="cell" width="32.0" x="32.0" y="239.0">
   -1    27 				<title>3</title>
   -1    28 			</rect>
   -1    29 			<rect height="320.0" role="cell" width="32.0" x="192.0" y="159.0">
   -1    30 				<title>4</title>
   -1    31 			</rect>
   -1    32 			<rect height="320.0" role="cell" width="32.0" x="352.0" y="159.0">
   -1    33 				<title>4</title>
   -1    34 			</rect>
   -1    35 			<rect height="400.0" role="cell" width="32.0" x="512.0" y="79.0">
   -1    36 				<title>5</title>
   -1    37 			</rect>
   -1    38 		</g>
   -1    39 		<g fill="#377eb8" role="row" stroke="white">
   -1    40 			<rect height="160.0" role="cell" width="32.0" x="64.0" y="319.0">
   -1    41 				<title>2</title>
   -1    42 			</rect>
   -1    43 			<rect height="160.0" role="cell" width="32.0" x="224.0" y="319.0">
   -1    44 				<title>2</title>
   -1    45 			</rect>
   -1    46 			<rect height="240.0" role="cell" width="32.0" x="384.0" y="239.0">
   -1    47 				<title>3</title>
   -1    48 			</rect>
   -1    49 			<rect height="80.0" role="cell" width="32.0" x="544.0" y="399.0">
   -1    50 				<title>1</title>
   -1    51 			</rect>
   -1    52 		</g>
   -1    53 		<g fill="#4daf4a" role="row" stroke="white">
   -1    54 			<rect height="400.0" role="cell" width="32.0" x="96.0" y="79.0">
   -1    55 				<title>5</title>
   -1    56 			</rect>
   -1    57 			<rect height="240.0" role="cell" width="32.0" x="256.0" y="239.0">
   -1    58 				<title>3</title>
   -1    59 			</rect>
   -1    60 			<rect height="320.0" role="cell" width="32.0" x="416.0" y="159.0">
   -1    61 				<title>4</title>
   -1    62 			</rect>
   -1    63 			<rect height="160.0" role="cell" width="32.0" x="576.0" y="319.0">
   -1    64 				<title>2</title>
   -1    65 			</rect>
   -1    66 		</g>
   63    67 	</g>
   64    68 </svg>

diff --git a/tests/simple_LineRenderer.svg b/tests/simple_LineRenderer.svg

@@ -1,23 +1,71 @@
    1     1 <svg viewBox="-55 -25 700 530" xmlns="http://www.w3.org/2000/svg">
    2    -1 	<line stroke="#333" x1="0" x2="0" y1="0" y2="480" />
    3    -1 	<line stroke="#333" x1="0" x2="640" y1="480" y2="480" />
    4    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="480">0</text>
    5    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="240.0">3</text>
    6    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="0">6</text>
    7    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="middle" x="80.0" y="490.0">Apples</text>
    8    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="middle" x="240.0" y="490.0">Oranges</text>
    9    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="middle" x="400.0" y="490.0">Pears</text>
   10    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="middle" x="560.0" y="490.0">Bananas</text>
   11    -1 	<g>
   12    -1 		<rect fill="none" height="20" stroke="#333" width="180" x="460" y="-20" />
   13    -1 		<rect fill="#e41a1c" height="10" width="10" x="464" y="-15.0" />
   14    -1 		<text dominant-baseline="middle" fill="#333" x="478" y="-10.0">John</text>
   15    -1 		<rect fill="#377eb8" height="10" width="10" x="528" y="-15.0" />
   16    -1 		<text dominant-baseline="middle" fill="#333" x="542" y="-10.0">Jane</text>
   17    -1 		<rect fill="#4daf4a" height="10" width="10" x="592" y="-15.0" />
   18    -1 		<text dominant-baseline="middle" fill="#333" x="606" y="-10.0">Joe</text>
   -1     2 	<g role="table">
   -1     3 		<line stroke="#333" x1="0" x2="0" y1="0" y2="480" />
   -1     4 		<line stroke="#333" x1="0" x2="640" y1="480" y2="480" />
   -1     5 		<g aria-hidden="true">
   -1     6 			<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="480">0</text>
   -1     7 			<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="240.0">3</text>
   -1     8 			<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="0">6</text>
   -1     9 		</g>
   -1    10 		<g role="row">
   -1    11 			<text dominant-baseline="middle" fill="#333" role="columnheader" text-anchor="middle" x="80.0" y="490.0">Apples</text>
   -1    12 			<text dominant-baseline="middle" fill="#333" role="columnheader" text-anchor="middle" x="240.0" y="490.0">Oranges</text>
   -1    13 			<text dominant-baseline="middle" fill="#333" role="columnheader" text-anchor="middle" x="400.0" y="490.0">Pears</text>
   -1    14 			<text dominant-baseline="middle" fill="#333" role="columnheader" text-anchor="middle" x="560.0" y="490.0">Bananas</text>
   -1    15 		</g>
   -1    16 		<g aria-hidden="true">
   -1    17 			<rect fill="none" height="20" stroke="#333" width="180" x="460" y="-20" />
   -1    18 			<rect fill="#e41a1c" height="10" width="10" x="464" y="-15.0" />
   -1    19 			<text dominant-baseline="middle" fill="#333" x="478" y="-10.0">John</text>
   -1    20 			<rect fill="#377eb8" height="10" width="10" x="528" y="-15.0" />
   -1    21 			<text dominant-baseline="middle" fill="#333" x="542" y="-10.0">Jane</text>
   -1    22 			<rect fill="#4daf4a" height="10" width="10" x="592" y="-15.0" />
   -1    23 			<text dominant-baseline="middle" fill="#333" x="606" y="-10.0">Joe</text>
   -1    24 		</g>
   -1    25 		<path d="M 80.0,240.0 L 240.0,160.0 400.0,160.0 560.0,80.0" fill="none" stroke="#e41a1c" />
   -1    26 		<path d="M 80.0,320.0 L 240.0,320.0 400.0,240.0 560.0,400.0" fill="none" stroke="#377eb8" />
   -1    27 		<path d="M 80.0,80.0 L 240.0,240.0 400.0,160.0 560.0,320.0" fill="none" stroke="#4daf4a" />
   -1    28 		<g fill="#e41a1c" role="row" stroke="white">
   -1    29 			<circle cx="80.0" cy="240.0" r="3" role="cell">
   -1    30 				<title>3</title>
   -1    31 			</circle>
   -1    32 			<circle cx="240.0" cy="160.0" r="3" role="cell">
   -1    33 				<title>4</title>
   -1    34 			</circle>
   -1    35 			<circle cx="400.0" cy="160.0" r="3" role="cell">
   -1    36 				<title>4</title>
   -1    37 			</circle>
   -1    38 			<circle cx="560.0" cy="80.0" r="3" role="cell">
   -1    39 				<title>5</title>
   -1    40 			</circle>
   -1    41 		</g>
   -1    42 		<g fill="#377eb8" role="row" stroke="white">
   -1    43 			<circle cx="80.0" cy="320.0" r="3" role="cell">
   -1    44 				<title>2</title>
   -1    45 			</circle>
   -1    46 			<circle cx="240.0" cy="320.0" r="3" role="cell">
   -1    47 				<title>2</title>
   -1    48 			</circle>
   -1    49 			<circle cx="400.0" cy="240.0" r="3" role="cell">
   -1    50 				<title>3</title>
   -1    51 			</circle>
   -1    52 			<circle cx="560.0" cy="400.0" r="3" role="cell">
   -1    53 				<title>1</title>
   -1    54 			</circle>
   -1    55 		</g>
   -1    56 		<g fill="#4daf4a" role="row" stroke="white">
   -1    57 			<circle cx="80.0" cy="80.0" r="3" role="cell">
   -1    58 				<title>5</title>
   -1    59 			</circle>
   -1    60 			<circle cx="240.0" cy="240.0" r="3" role="cell">
   -1    61 				<title>3</title>
   -1    62 			</circle>
   -1    63 			<circle cx="400.0" cy="160.0" r="3" role="cell">
   -1    64 				<title>4</title>
   -1    65 			</circle>
   -1    66 			<circle cx="560.0" cy="320.0" r="3" role="cell">
   -1    67 				<title>2</title>
   -1    68 			</circle>
   -1    69 		</g>
   19    70 	</g>
   20    -1 	<path d="M 80.0,240.0 L 240.0,160.0 400.0,160.0 560.0,80.0" fill="none" stroke="#e41a1c" />
   21    -1 	<path d="M 80.0,320.0 L 240.0,320.0 400.0,240.0 560.0,400.0" fill="none" stroke="#377eb8" />
   22    -1 	<path d="M 80.0,80.0 L 240.0,240.0 400.0,160.0 560.0,320.0" fill="none" stroke="#4daf4a" />
   23    71 </svg>

diff --git a/tests/simple_StackedAreaRenderer.svg b/tests/simple_StackedAreaRenderer.svg

@@ -1,23 +1,71 @@
    1     1 <svg viewBox="-55 -25 700 530" xmlns="http://www.w3.org/2000/svg">
    2    -1 	<line stroke="#333" x1="0" x2="0" y1="0" y2="480" />
    3    -1 	<line stroke="#333" x1="0" x2="640" y1="480" y2="480" />
    4    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="480">0</text>
    5    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="240.0">10</text>
    6    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="0">20</text>
    7    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="middle" x="80.0" y="490.0">Apples</text>
    8    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="middle" x="240.0" y="490.0">Oranges</text>
    9    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="middle" x="400.0" y="490.0">Pears</text>
   10    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="middle" x="560.0" y="490.0">Bananas</text>
   11    -1 	<g>
   12    -1 		<rect fill="none" height="20" stroke="#333" width="180" x="460" y="-20" />
   13    -1 		<rect fill="#e41a1c" height="10" width="10" x="464" y="-15.0" />
   14    -1 		<text dominant-baseline="middle" fill="#333" x="478" y="-10.0">John</text>
   15    -1 		<rect fill="#377eb8" height="10" width="10" x="528" y="-15.0" />
   16    -1 		<text dominant-baseline="middle" fill="#333" x="542" y="-10.0">Jane</text>
   17    -1 		<rect fill="#4daf4a" height="10" width="10" x="592" y="-15.0" />
   18    -1 		<text dominant-baseline="middle" fill="#333" x="606" y="-10.0">Joe</text>
   -1     2 	<g role="table">
   -1     3 		<line stroke="#333" x1="0" x2="0" y1="0" y2="480" />
   -1     4 		<line stroke="#333" x1="0" x2="640" y1="480" y2="480" />
   -1     5 		<g aria-hidden="true">
   -1     6 			<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="480">0</text>
   -1     7 			<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="240.0">10</text>
   -1     8 			<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="0">20</text>
   -1     9 		</g>
   -1    10 		<g role="row">
   -1    11 			<text dominant-baseline="middle" fill="#333" role="columnheader" text-anchor="middle" x="80.0" y="490.0">Apples</text>
   -1    12 			<text dominant-baseline="middle" fill="#333" role="columnheader" text-anchor="middle" x="240.0" y="490.0">Oranges</text>
   -1    13 			<text dominant-baseline="middle" fill="#333" role="columnheader" text-anchor="middle" x="400.0" y="490.0">Pears</text>
   -1    14 			<text dominant-baseline="middle" fill="#333" role="columnheader" text-anchor="middle" x="560.0" y="490.0">Bananas</text>
   -1    15 		</g>
   -1    16 		<g aria-hidden="true">
   -1    17 			<rect fill="none" height="20" stroke="#333" width="180" x="460" y="-20" />
   -1    18 			<rect fill="#e41a1c" height="10" width="10" x="464" y="-15.0" />
   -1    19 			<text dominant-baseline="middle" fill="#333" x="478" y="-10.0">John</text>
   -1    20 			<rect fill="#377eb8" height="10" width="10" x="528" y="-15.0" />
   -1    21 			<text dominant-baseline="middle" fill="#333" x="542" y="-10.0">Jane</text>
   -1    22 			<rect fill="#4daf4a" height="10" width="10" x="592" y="-15.0" />
   -1    23 			<text dominant-baseline="middle" fill="#333" x="606" y="-10.0">Joe</text>
   -1    24 		</g>
   -1    25 		<path d="M 80.0,407.0 L 240.0,383.0 400.0,383.0 560.0,359.0 560.0,479 400.0,479 240.0,479 80.0,479" fill="#e41a1c" stroke="white" />
   -1    26 		<path d="M 80.0,359.0 L 240.0,335.0 400.0,311.0 560.0,335.0 560.0,359.0 400.0,383.0 240.0,383.0 80.0,407.0" fill="#377eb8" stroke="white" />
   -1    27 		<path d="M 80.0,239.0 L 240.0,263.0 400.0,215.0 560.0,287.0 560.0,335.0 400.0,311.0 240.0,335.0 80.0,359.0" fill="#4daf4a" stroke="white" />
   -1    28 		<g fill="#e41a1c" role="row" stroke="white">
   -1    29 			<circle cx="80.0" cy="407.0" r="3" role="cell">
   -1    30 				<title>3</title>
   -1    31 			</circle>
   -1    32 			<circle cx="240.0" cy="383.0" r="3" role="cell">
   -1    33 				<title>4</title>
   -1    34 			</circle>
   -1    35 			<circle cx="400.0" cy="383.0" r="3" role="cell">
   -1    36 				<title>4</title>
   -1    37 			</circle>
   -1    38 			<circle cx="560.0" cy="359.0" r="3" role="cell">
   -1    39 				<title>5</title>
   -1    40 			</circle>
   -1    41 		</g>
   -1    42 		<g fill="#377eb8" role="row" stroke="white">
   -1    43 			<circle cx="80.0" cy="359.0" r="3" role="cell">
   -1    44 				<title>2</title>
   -1    45 			</circle>
   -1    46 			<circle cx="240.0" cy="335.0" r="3" role="cell">
   -1    47 				<title>2</title>
   -1    48 			</circle>
   -1    49 			<circle cx="400.0" cy="311.0" r="3" role="cell">
   -1    50 				<title>3</title>
   -1    51 			</circle>
   -1    52 			<circle cx="560.0" cy="335.0" r="3" role="cell">
   -1    53 				<title>1</title>
   -1    54 			</circle>
   -1    55 		</g>
   -1    56 		<g fill="#4daf4a" role="row" stroke="white">
   -1    57 			<circle cx="80.0" cy="239.0" r="3" role="cell">
   -1    58 				<title>5</title>
   -1    59 			</circle>
   -1    60 			<circle cx="240.0" cy="263.0" r="3" role="cell">
   -1    61 				<title>3</title>
   -1    62 			</circle>
   -1    63 			<circle cx="400.0" cy="215.0" r="3" role="cell">
   -1    64 				<title>4</title>
   -1    65 			</circle>
   -1    66 			<circle cx="560.0" cy="287.0" r="3" role="cell">
   -1    67 				<title>2</title>
   -1    68 			</circle>
   -1    69 		</g>
   19    70 	</g>
   20    -1 	<path d="M 80.0,407.0 L 240.0,383.0 400.0,383.0 560.0,359.0 560.0,479 400.0,479 240.0,479 80.0,479" fill="#e41a1c" stroke="white" />
   21    -1 	<path d="M 80.0,359.0 L 240.0,335.0 400.0,311.0 560.0,335.0 560.0,359.0 400.0,383.0 240.0,383.0 80.0,407.0" fill="#377eb8" stroke="white" />
   22    -1 	<path d="M 80.0,239.0 L 240.0,263.0 400.0,215.0 560.0,287.0 560.0,335.0 400.0,311.0 240.0,335.0 80.0,359.0" fill="#4daf4a" stroke="white" />
   23    71 </svg>

diff --git a/tests/simple_StackedColumnRenderer.svg b/tests/simple_StackedColumnRenderer.svg

@@ -1,64 +1,68 @@
    1     1 <svg viewBox="-55 -25 700 530" xmlns="http://www.w3.org/2000/svg">
    2    -1 	<line stroke="#333" x1="0" x2="0" y1="0" y2="480" />
    3    -1 	<line stroke="#333" x1="0" x2="640" y1="480" y2="480" />
    4    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="480">0</text>
    5    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="240.0">10</text>
    6    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="0">20</text>
    7    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="middle" x="80.0" y="490.0">Apples</text>
    8    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="middle" x="240.0" y="490.0">Oranges</text>
    9    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="middle" x="400.0" y="490.0">Pears</text>
   10    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="middle" x="560.0" y="490.0">Bananas</text>
   11    -1 	<g>
   12    -1 		<rect fill="none" height="20" stroke="#333" width="180" x="460" y="-20" />
   13    -1 		<rect fill="#e41a1c" height="10" width="10" x="464" y="-15.0" />
   14    -1 		<text dominant-baseline="middle" fill="#333" x="478" y="-10.0">John</text>
   15    -1 		<rect fill="#377eb8" height="10" width="10" x="528" y="-15.0" />
   16    -1 		<text dominant-baseline="middle" fill="#333" x="542" y="-10.0">Jane</text>
   17    -1 		<rect fill="#4daf4a" height="10" width="10" x="592" y="-15.0" />
   18    -1 		<text dominant-baseline="middle" fill="#333" x="606" y="-10.0">Joe</text>
   19    -1 	</g>
   20    -1 	<g>
   21    -1 		<rect fill="#e41a1c" height="72.0" stroke="white" width="53.333333333333336" x="53.33333333333333" y="407.0">
   22    -1 			<title>Apples - John: 3</title>
   23    -1 		</rect>
   24    -1 		<rect fill="#377eb8" height="48.0" stroke="white" width="53.333333333333336" x="53.33333333333333" y="359.0">
   25    -1 			<title>Apples - Jane: 2</title>
   26    -1 		</rect>
   27    -1 		<rect fill="#4daf4a" height="120.0" stroke="white" width="53.333333333333336" x="53.33333333333333" y="239.0">
   28    -1 			<title>Apples - Joe: 5</title>
   29    -1 		</rect>
   30    -1 	</g>
   31    -1 	<g>
   32    -1 		<rect fill="#e41a1c" height="96.0" stroke="white" width="53.333333333333336" x="213.33333333333334" y="383.0">
   33    -1 			<title>Oranges - John: 4</title>
   34    -1 		</rect>
   35    -1 		<rect fill="#377eb8" height="48.0" stroke="white" width="53.333333333333336" x="213.33333333333334" y="335.0">
   36    -1 			<title>Oranges - Jane: 2</title>
   37    -1 		</rect>
   38    -1 		<rect fill="#4daf4a" height="72.0" stroke="white" width="53.333333333333336" x="213.33333333333334" y="263.0">
   39    -1 			<title>Oranges - Joe: 3</title>
   40    -1 		</rect>
   41    -1 	</g>
   42    -1 	<g>
   43    -1 		<rect fill="#e41a1c" height="96.0" stroke="white" width="53.333333333333336" x="373.3333333333333" y="383.0">
   44    -1 			<title>Pears - John: 4</title>
   45    -1 		</rect>
   46    -1 		<rect fill="#377eb8" height="72.0" stroke="white" width="53.333333333333336" x="373.3333333333333" y="311.0">
   47    -1 			<title>Pears - Jane: 3</title>
   48    -1 		</rect>
   49    -1 		<rect fill="#4daf4a" height="96.0" stroke="white" width="53.333333333333336" x="373.3333333333333" y="215.0">
   50    -1 			<title>Pears - Joe: 4</title>
   51    -1 		</rect>
   52    -1 	</g>
   53    -1 	<g>
   54    -1 		<rect fill="#e41a1c" height="120.0" stroke="white" width="53.333333333333336" x="533.3333333333334" y="359.0">
   55    -1 			<title>Bananas - John: 5</title>
   56    -1 		</rect>
   57    -1 		<rect fill="#377eb8" height="24.0" stroke="white" width="53.333333333333336" x="533.3333333333334" y="335.0">
   58    -1 			<title>Bananas - Jane: 1</title>
   59    -1 		</rect>
   60    -1 		<rect fill="#4daf4a" height="48.0" stroke="white" width="53.333333333333336" x="533.3333333333334" y="287.0">
   61    -1 			<title>Bananas - Joe: 2</title>
   62    -1 		</rect>
   -1     2 	<g role="table">
   -1     3 		<line stroke="#333" x1="0" x2="0" y1="0" y2="480" />
   -1     4 		<line stroke="#333" x1="0" x2="640" y1="480" y2="480" />
   -1     5 		<g aria-hidden="true">
   -1     6 			<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="480">0</text>
   -1     7 			<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="240.0">10</text>
   -1     8 			<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="0">20</text>
   -1     9 		</g>
   -1    10 		<g role="row">
   -1    11 			<text dominant-baseline="middle" fill="#333" role="columnheader" text-anchor="middle" x="80.0" y="490.0">Apples</text>
   -1    12 			<text dominant-baseline="middle" fill="#333" role="columnheader" text-anchor="middle" x="240.0" y="490.0">Oranges</text>
   -1    13 			<text dominant-baseline="middle" fill="#333" role="columnheader" text-anchor="middle" x="400.0" y="490.0">Pears</text>
   -1    14 			<text dominant-baseline="middle" fill="#333" role="columnheader" text-anchor="middle" x="560.0" y="490.0">Bananas</text>
   -1    15 		</g>
   -1    16 		<g aria-hidden="true">
   -1    17 			<rect fill="none" height="20" stroke="#333" width="180" x="460" y="-20" />
   -1    18 			<rect fill="#e41a1c" height="10" width="10" x="464" y="-15.0" />
   -1    19 			<text dominant-baseline="middle" fill="#333" x="478" y="-10.0">John</text>
   -1    20 			<rect fill="#377eb8" height="10" width="10" x="528" y="-15.0" />
   -1    21 			<text dominant-baseline="middle" fill="#333" x="542" y="-10.0">Jane</text>
   -1    22 			<rect fill="#4daf4a" height="10" width="10" x="592" y="-15.0" />
   -1    23 			<text dominant-baseline="middle" fill="#333" x="606" y="-10.0">Joe</text>
   -1    24 		</g>
   -1    25 		<g fill="#e41a1c" role="row" stroke="white">
   -1    26 			<rect height="72.0" role="cell" width="53.333333333333336" x="53.33333333333333" y="407.0">
   -1    27 				<title>3</title>
   -1    28 			</rect>
   -1    29 			<rect height="96.0" role="cell" width="53.333333333333336" x="213.33333333333334" y="383.0">
   -1    30 				<title>4</title>
   -1    31 			</rect>
   -1    32 			<rect height="96.0" role="cell" width="53.333333333333336" x="373.3333333333333" y="383.0">
   -1    33 				<title>4</title>
   -1    34 			</rect>
   -1    35 			<rect height="120.0" role="cell" width="53.333333333333336" x="533.3333333333334" y="359.0">
   -1    36 				<title>5</title>
   -1    37 			</rect>
   -1    38 		</g>
   -1    39 		<g fill="#377eb8" role="row" stroke="white">
   -1    40 			<rect height="48.0" role="cell" width="53.333333333333336" x="53.33333333333333" y="359.0">
   -1    41 				<title>2</title>
   -1    42 			</rect>
   -1    43 			<rect height="48.0" role="cell" width="53.333333333333336" x="213.33333333333334" y="335.0">
   -1    44 				<title>2</title>
   -1    45 			</rect>
   -1    46 			<rect height="72.0" role="cell" width="53.333333333333336" x="373.3333333333333" y="311.0">
   -1    47 				<title>3</title>
   -1    48 			</rect>
   -1    49 			<rect height="24.0" role="cell" width="53.333333333333336" x="533.3333333333334" y="335.0">
   -1    50 				<title>1</title>
   -1    51 			</rect>
   -1    52 		</g>
   -1    53 		<g fill="#4daf4a" role="row" stroke="white">
   -1    54 			<rect height="120.0" role="cell" width="53.333333333333336" x="53.33333333333333" y="239.0">
   -1    55 				<title>5</title>
   -1    56 			</rect>
   -1    57 			<rect height="72.0" role="cell" width="53.333333333333336" x="213.33333333333334" y="263.0">
   -1    58 				<title>3</title>
   -1    59 			</rect>
   -1    60 			<rect height="96.0" role="cell" width="53.333333333333336" x="373.3333333333333" y="215.0">
   -1    61 				<title>4</title>
   -1    62 			</rect>
   -1    63 			<rect height="48.0" role="cell" width="53.333333333333336" x="533.3333333333334" y="287.0">
   -1    64 				<title>2</title>
   -1    65 			</rect>
   -1    66 		</g>
   63    67 	</g>
   64    68 </svg>

diff --git a/tests/single_ColumnRenderer.svg b/tests/single_ColumnRenderer.svg

@@ -1,31 +1,31 @@
    1     1 <svg viewBox="-55 -25 700 530" xmlns="http://www.w3.org/2000/svg">
    2    -1 	<line stroke="#333" x1="0" x2="0" y1="0" y2="480" />
    3    -1 	<line stroke="#333" x1="0" x2="640" y1="480" y2="480" />
    4    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="480">0</text>
    5    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="240.0">3</text>
    6    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="0">6</text>
    7    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="middle" x="80.0" y="490.0">Apples</text>
    8    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="middle" x="240.0" y="490.0">Oranges</text>
    9    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="middle" x="400.0" y="490.0">Pears</text>
   10    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="middle" x="560.0" y="490.0">Bananas</text>
   11    -1 	<g>
   12    -1 		<rect fill="#e41a1c" height="240.0" stroke="white" width="53.333333333333336" x="53.333333333333336" y="239.0">
   13    -1 			<title>Apples: 3</title>
   14    -1 		</rect>
   15    -1 	</g>
   16    -1 	<g>
   17    -1 		<rect fill="#e41a1c" height="320.0" stroke="white" width="53.333333333333336" x="213.33333333333334" y="159.0">
   18    -1 			<title>Oranges: 4</title>
   19    -1 		</rect>
   20    -1 	</g>
   21    -1 	<g>
   22    -1 		<rect fill="#e41a1c" height="320.0" stroke="white" width="53.333333333333336" x="373.33333333333337" y="159.0">
   23    -1 			<title>Pears: 4</title>
   24    -1 		</rect>
   25    -1 	</g>
   26    -1 	<g>
   27    -1 		<rect fill="#e41a1c" height="400.0" stroke="white" width="53.333333333333336" x="533.3333333333334" y="79.0">
   28    -1 			<title>Bananas: 5</title>
   29    -1 		</rect>
   -1     2 	<g role="table">
   -1     3 		<line stroke="#333" x1="0" x2="0" y1="0" y2="480" />
   -1     4 		<line stroke="#333" x1="0" x2="640" y1="480" y2="480" />
   -1     5 		<g aria-hidden="true">
   -1     6 			<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="480">0</text>
   -1     7 			<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="240.0">3</text>
   -1     8 			<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="0">6</text>
   -1     9 		</g>
   -1    10 		<g role="row">
   -1    11 			<text dominant-baseline="middle" fill="#333" role="columnheader" text-anchor="middle" x="80.0" y="490.0">Apples</text>
   -1    12 			<text dominant-baseline="middle" fill="#333" role="columnheader" text-anchor="middle" x="240.0" y="490.0">Oranges</text>
   -1    13 			<text dominant-baseline="middle" fill="#333" role="columnheader" text-anchor="middle" x="400.0" y="490.0">Pears</text>
   -1    14 			<text dominant-baseline="middle" fill="#333" role="columnheader" text-anchor="middle" x="560.0" y="490.0">Bananas</text>
   -1    15 		</g>
   -1    16 		<g fill="#e41a1c" role="row" stroke="white">
   -1    17 			<rect height="240.0" role="cell" width="53.333333333333336" x="53.333333333333336" y="239.0">
   -1    18 				<title>3</title>
   -1    19 			</rect>
   -1    20 			<rect height="320.0" role="cell" width="53.333333333333336" x="213.33333333333334" y="159.0">
   -1    21 				<title>4</title>
   -1    22 			</rect>
   -1    23 			<rect height="320.0" role="cell" width="53.333333333333336" x="373.33333333333337" y="159.0">
   -1    24 				<title>4</title>
   -1    25 			</rect>
   -1    26 			<rect height="400.0" role="cell" width="53.333333333333336" x="533.3333333333334" y="79.0">
   -1    27 				<title>5</title>
   -1    28 			</rect>
   -1    29 		</g>
   30    30 	</g>
   31    31 </svg>

diff --git a/tests/single_LineRenderer.svg b/tests/single_LineRenderer.svg

@@ -1,12 +1,32 @@
    1     1 <svg viewBox="-55 -25 700 530" xmlns="http://www.w3.org/2000/svg">
    2    -1 	<line stroke="#333" x1="0" x2="0" y1="0" y2="480" />
    3    -1 	<line stroke="#333" x1="0" x2="640" y1="480" y2="480" />
    4    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="480">0</text>
    5    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="240.0">3</text>
    6    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="0">6</text>
    7    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="middle" x="80.0" y="490.0">Apples</text>
    8    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="middle" x="240.0" y="490.0">Oranges</text>
    9    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="middle" x="400.0" y="490.0">Pears</text>
   10    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="middle" x="560.0" y="490.0">Bananas</text>
   11    -1 	<path d="M 80.0,240.0 L 240.0,160.0 400.0,160.0 560.0,80.0" fill="none" stroke="#e41a1c" />
   -1     2 	<g role="table">
   -1     3 		<line stroke="#333" x1="0" x2="0" y1="0" y2="480" />
   -1     4 		<line stroke="#333" x1="0" x2="640" y1="480" y2="480" />
   -1     5 		<g aria-hidden="true">
   -1     6 			<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="480">0</text>
   -1     7 			<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="240.0">3</text>
   -1     8 			<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="0">6</text>
   -1     9 		</g>
   -1    10 		<g role="row">
   -1    11 			<text dominant-baseline="middle" fill="#333" role="columnheader" text-anchor="middle" x="80.0" y="490.0">Apples</text>
   -1    12 			<text dominant-baseline="middle" fill="#333" role="columnheader" text-anchor="middle" x="240.0" y="490.0">Oranges</text>
   -1    13 			<text dominant-baseline="middle" fill="#333" role="columnheader" text-anchor="middle" x="400.0" y="490.0">Pears</text>
   -1    14 			<text dominant-baseline="middle" fill="#333" role="columnheader" text-anchor="middle" x="560.0" y="490.0">Bananas</text>
   -1    15 		</g>
   -1    16 		<path d="M 80.0,240.0 L 240.0,160.0 400.0,160.0 560.0,80.0" fill="none" stroke="#e41a1c" />
   -1    17 		<g fill="#e41a1c" role="row" stroke="white">
   -1    18 			<circle cx="80.0" cy="240.0" r="3" role="cell">
   -1    19 				<title>3</title>
   -1    20 			</circle>
   -1    21 			<circle cx="240.0" cy="160.0" r="3" role="cell">
   -1    22 				<title>4</title>
   -1    23 			</circle>
   -1    24 			<circle cx="400.0" cy="160.0" r="3" role="cell">
   -1    25 				<title>4</title>
   -1    26 			</circle>
   -1    27 			<circle cx="560.0" cy="80.0" r="3" role="cell">
   -1    28 				<title>5</title>
   -1    29 			</circle>
   -1    30 		</g>
   -1    31 	</g>
   12    32 </svg>

diff --git a/tests/single_StackedAreaRenderer.svg b/tests/single_StackedAreaRenderer.svg

@@ -1,12 +1,32 @@
    1     1 <svg viewBox="-55 -25 700 530" xmlns="http://www.w3.org/2000/svg">
    2    -1 	<line stroke="#333" x1="0" x2="0" y1="0" y2="480" />
    3    -1 	<line stroke="#333" x1="0" x2="640" y1="480" y2="480" />
    4    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="480">0</text>
    5    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="240.0">3</text>
    6    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="0">6</text>
    7    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="middle" x="80.0" y="490.0">Apples</text>
    8    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="middle" x="240.0" y="490.0">Oranges</text>
    9    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="middle" x="400.0" y="490.0">Pears</text>
   10    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="middle" x="560.0" y="490.0">Bananas</text>
   11    -1 	<path d="M 80.0,239.0 L 240.0,159.0 400.0,159.0 560.0,79.0 560.0,479 400.0,479 240.0,479 80.0,479" fill="#e41a1c" stroke="white" />
   -1     2 	<g role="table">
   -1     3 		<line stroke="#333" x1="0" x2="0" y1="0" y2="480" />
   -1     4 		<line stroke="#333" x1="0" x2="640" y1="480" y2="480" />
   -1     5 		<g aria-hidden="true">
   -1     6 			<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="480">0</text>
   -1     7 			<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="240.0">3</text>
   -1     8 			<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="0">6</text>
   -1     9 		</g>
   -1    10 		<g role="row">
   -1    11 			<text dominant-baseline="middle" fill="#333" role="columnheader" text-anchor="middle" x="80.0" y="490.0">Apples</text>
   -1    12 			<text dominant-baseline="middle" fill="#333" role="columnheader" text-anchor="middle" x="240.0" y="490.0">Oranges</text>
   -1    13 			<text dominant-baseline="middle" fill="#333" role="columnheader" text-anchor="middle" x="400.0" y="490.0">Pears</text>
   -1    14 			<text dominant-baseline="middle" fill="#333" role="columnheader" text-anchor="middle" x="560.0" y="490.0">Bananas</text>
   -1    15 		</g>
   -1    16 		<path d="M 80.0,239.0 L 240.0,159.0 400.0,159.0 560.0,79.0 560.0,479 400.0,479 240.0,479 80.0,479" fill="#e41a1c" stroke="white" />
   -1    17 		<g fill="#e41a1c" role="row" stroke="white">
   -1    18 			<circle cx="80.0" cy="239.0" r="3" role="cell">
   -1    19 				<title>3</title>
   -1    20 			</circle>
   -1    21 			<circle cx="240.0" cy="159.0" r="3" role="cell">
   -1    22 				<title>4</title>
   -1    23 			</circle>
   -1    24 			<circle cx="400.0" cy="159.0" r="3" role="cell">
   -1    25 				<title>4</title>
   -1    26 			</circle>
   -1    27 			<circle cx="560.0" cy="79.0" r="3" role="cell">
   -1    28 				<title>5</title>
   -1    29 			</circle>
   -1    30 		</g>
   -1    31 	</g>
   12    32 </svg>

diff --git a/tests/single_StackedColumnRenderer.svg b/tests/single_StackedColumnRenderer.svg

@@ -1,31 +1,31 @@
    1     1 <svg viewBox="-55 -25 700 530" xmlns="http://www.w3.org/2000/svg">
    2    -1 	<line stroke="#333" x1="0" x2="0" y1="0" y2="480" />
    3    -1 	<line stroke="#333" x1="0" x2="640" y1="480" y2="480" />
    4    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="480">0</text>
    5    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="240.0">3</text>
    6    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="0">6</text>
    7    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="middle" x="80.0" y="490.0">Apples</text>
    8    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="middle" x="240.0" y="490.0">Oranges</text>
    9    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="middle" x="400.0" y="490.0">Pears</text>
   10    -1 	<text dominant-baseline="middle" fill="#333" text-anchor="middle" x="560.0" y="490.0">Bananas</text>
   11    -1 	<g>
   12    -1 		<rect fill="#e41a1c" height="240.0" stroke="white" width="53.333333333333336" x="53.33333333333333" y="239.0">
   13    -1 			<title>Apples: 3</title>
   14    -1 		</rect>
   15    -1 	</g>
   16    -1 	<g>
   17    -1 		<rect fill="#e41a1c" height="320.0" stroke="white" width="53.333333333333336" x="213.33333333333334" y="159.0">
   18    -1 			<title>Oranges: 4</title>
   19    -1 		</rect>
   20    -1 	</g>
   21    -1 	<g>
   22    -1 		<rect fill="#e41a1c" height="320.0" stroke="white" width="53.333333333333336" x="373.3333333333333" y="159.0">
   23    -1 			<title>Pears: 4</title>
   24    -1 		</rect>
   25    -1 	</g>
   26    -1 	<g>
   27    -1 		<rect fill="#e41a1c" height="400.0" stroke="white" width="53.333333333333336" x="533.3333333333334" y="79.0">
   28    -1 			<title>Bananas: 5</title>
   29    -1 		</rect>
   -1     2 	<g role="table">
   -1     3 		<line stroke="#333" x1="0" x2="0" y1="0" y2="480" />
   -1     4 		<line stroke="#333" x1="0" x2="640" y1="480" y2="480" />
   -1     5 		<g aria-hidden="true">
   -1     6 			<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="480">0</text>
   -1     7 			<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="240.0">3</text>
   -1     8 			<text dominant-baseline="middle" fill="#333" text-anchor="end" x="-4" y="0">6</text>
   -1     9 		</g>
   -1    10 		<g role="row">
   -1    11 			<text dominant-baseline="middle" fill="#333" role="columnheader" text-anchor="middle" x="80.0" y="490.0">Apples</text>
   -1    12 			<text dominant-baseline="middle" fill="#333" role="columnheader" text-anchor="middle" x="240.0" y="490.0">Oranges</text>
   -1    13 			<text dominant-baseline="middle" fill="#333" role="columnheader" text-anchor="middle" x="400.0" y="490.0">Pears</text>
   -1    14 			<text dominant-baseline="middle" fill="#333" role="columnheader" text-anchor="middle" x="560.0" y="490.0">Bananas</text>
   -1    15 		</g>
   -1    16 		<g fill="#e41a1c" role="row" stroke="white">
   -1    17 			<rect height="240.0" role="cell" width="53.333333333333336" x="53.33333333333333" y="239.0">
   -1    18 				<title>3</title>
   -1    19 			</rect>
   -1    20 			<rect height="320.0" role="cell" width="53.333333333333336" x="213.33333333333334" y="159.0">
   -1    21 				<title>4</title>
   -1    22 			</rect>
   -1    23 			<rect height="320.0" role="cell" width="53.333333333333336" x="373.3333333333333" y="159.0">
   -1    24 				<title>4</title>
   -1    25 			</rect>
   -1    26 			<rect height="400.0" role="cell" width="53.333333333333336" x="533.3333333333334" y="79.0">
   -1    27 				<title>5</title>
   -1    28 			</rect>
   -1    29 		</g>
   30    30 	</g>
   31    31 </svg>