Legends need to use their individual text spacing - not use the Tick spacing. For vertical lists it looks a lot better to use a spacing of 10 instead of 20. Prior to this commit this couldn't be set in the defaults without also manipulating the axis tick spacing.
Using their own constant, this can be now easily configured.
The stroke length was just way too long, so I first tried to decrease the length by subtracting the padding from it, but it was not a big difference.
I ended up using a hardcoded value because it gave the best visual results on different resolutions.
Prior to this commit we simply defined a hardcoded padding. This commit respects the passed style and inherits from a default padding defined in legendDefaults.
* Add stacked bar chart value labels (#60)
* Add horizontal render option to stacked bar chart (#39)
* Pulling 100% inside the canvasBox to remain visible.
* Use correct margins for YAxis.TextHorizontalAlign: chart.TextHorizontalAlignRight
* Fixed Show to Hidden due to 5f42a580a9
* Add type classes on class output
Without this it is quite difficult to differentiate between fill and
stroke elements, f.e. with basic charts with fillings or legends
generally:
`svg path:nth-last-of-type(2).legend`
Text elements needed to be accessed with text.classname which
isn't really best practise.
This way they can be accessed easier:
`svg .legend.fill`
* Add type classes to examples
* Fix import in custom_stylesheets example
* Add ability to set custom stylesheets for SVG renderer
This allow to set custom inline CSS and a optional CSP nonce. This
solves the problem mentioned in #103 and is best used with it, as seen
in the added examples. Without this one would have to write a custom
renderer.
* Add note with link to the custom_stylesheets example
* Add ability to set CSS classes instead of inline styles
This allows to set a `ClassName` field in `Style` structs. Setting this
field to anything but "" will cause all other styles to be ignored. The
element will then have a `class=` tag instead with the corresponding name.
Possible reasons to use this:
* Including multiple SVGs on the same webside, using the same styles
* Desire to use strict CSP headers
* Add warning that setting `ClassName` will drop all other inline styles