Commit graph

424 commits

Author SHA1 Message Date
Rico
6eff5912ca
fix: introduce individual spacing constant for legend
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.
2022-08-28 02:27:57 +02:00
Rico
1288c8d48d
fix: respect user defined legend style paddings
Prior to this commit the paddings passed within the style struct for the different legend objects were ignored. This commit fixes that behavior.
2022-08-28 02:27:42 +02:00
Rico
901d2bb313
fix: use fixed length for left stroked legend
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.
2022-08-28 02:10:53 +02:00
Rico
f0b283349e
fix: use padding in legend from passed style
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.
2022-08-28 02:10:48 +02:00
Rico
5407f1fdb4
docs: add example for legend with line on the left side 2022-08-28 02:10:40 +02:00
Rico
bbad84f537
feat: implement legend type with fixed length line on the left side
fixes #185
2022-08-28 02:10:32 +02:00
Will Charczuk
c1468e8ae4
Adds support for go mod (finally) (#164) 2020-11-22 16:45:10 -08:00
Jamie Isaacs
962b9abdec Add stacked bar chart value labels (#60) and a horizontal stacked bar chart (#39) (#114)
* 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
2019-12-06 11:22:51 -08:00
Will Charczuk
3a7bc55431 updates 2019-09-09 21:05:48 -07:00
Will Charczuk
60baf17927 updates 2019-09-09 21:04:05 -07:00
Will Charczuk
45fad0cfb8 switching to generators 2019-09-09 21:02:48 -07:00
Will Charczuk
2d5aeaf824 merging master 2019-09-09 20:24:15 -07:00
Will Charczuk
6d57cf4533 additions 2019-09-09 20:21:51 -07:00
Will Charczuk
602ff901f7 adds percent change series 2019-09-09 19:57:56 -07:00
Will Charczuk
fed210cc81 tweaks 2019-04-24 13:00:46 -07:00
Will Charczuk
762b314e86 removing go-sdk completely 2019-04-24 13:00:09 -07:00
Will Charczuk
07a9cdf513 removing go-sdk stuff 2019-04-24 12:58:05 -07:00
Alessandro
9852fce5a1 adding donut type chart, like a pie chart with a blank circle on the center and little trick for label position (#111)
(some way of improvement)
2019-02-19 10:52:03 -08:00
Justin Kromlinger
59451fbeb4 Add type classes on class output (#106)
* 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
2019-02-19 10:51:41 -08:00
Will Charczuk
0576aba75e removing debugging file 2019-02-16 11:17:53 -08:00
Will Charczuk
781a45d770 tests pass 2019-02-16 11:17:39 -08:00
Will Charczuk
fa93bd8abb updates 2019-02-13 19:13:29 -08:00
Will Charczuk
5f42a580a9 mostly working 2019-02-13 18:55:13 -08:00
Will Charczuk
26eaa1d898 snapshot 2019-02-13 16:09:26 -08:00
Justin Kromlinger
3cb33d48d3 Add ability to set custom stylesheets for SVG renderer (#105)
* 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
2018-10-12 09:43:30 -07:00
Will Charczuk
96acfc6a9f switching the build badge 2018-10-12 09:35:03 -07:00
Will Charczuk
31d235310c removing travis references 2018-10-12 09:28:44 -07:00
Will Charczuk
70d5b73afd fixing build 2018-10-12 09:26:46 -07:00
Will Charczuk
f5889c93ae copy pasta 2018-10-12 09:24:20 -07:00
Will Charczuk
4e6c06ca87 removing coverage artifact 2018-10-12 09:23:56 -07:00
Will Charczuk
3e352f140b adds circle ci 2018-10-12 09:23:30 -07:00
Justin Kromlinger
f97f94425f Add ability to set CSS classes instead of inline styles (#103)
* 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
2018-10-11 17:21:46 -07:00
Bernhard Reisenberger
6735e8990a draw circle if single value; do not position text on negative coordinates (#82) 2018-10-11 17:21:06 -07:00
nptrx
865ff54ab9 unification of sample and test coding styles will improve visibility (#67)
* "Style{Show: true}" to "StyleShow()"
* "Box{IsSet: true}" to "BoxZero"
2018-10-11 17:20:44 -07:00
Will Charczuk
0fb4aa53e9 adds a rerender example 2018-10-11 17:18:46 -07:00
MinJae Kwon
828d1952d8 Put a space between the badges (#101) 2018-10-04 23:57:51 -07:00
Will Charczuk
872b97b99f removing example 2018-09-10 13:14:46 -07:00
Will Charczuk
a7ff82d63f lots of changes 2018-09-10 13:11:25 -07:00
Will Charczuk
0e849b11bb sequence tweaks, removing market hours anything 2018-09-10 13:08:20 -07:00
Will Charczuk
1a09989055 fixing issues 2018-09-07 15:25:58 -07:00
Will Charczuk
1555902fc4 updates + tests 2018-09-07 12:52:30 -07:00
Will Charczuk
1144b80a46 latest go 2018-09-07 11:19:23 -07:00
Will Charczuk
1f159d195f adding IntValueFormatter 2018-09-07 11:17:11 -07:00
Yuji Yaginuma
4ed65028e4 Fix func name typo in examples (#91)
It seems that `RandomValuesWithMax` is correct.
9e3a080aa3/seq/random.go (L15)
2018-09-05 08:45:45 -07:00
David Mis
ac680bd82d Fixed order of arguments to assert.Len in test files. (#93)
* Fixed order of arguments to assert.Len in test files.

* Added BaseValue funtionality to bar chart
2018-09-05 08:45:19 -07:00
David Mis
3edccc4758 Added BaseValue funtionality to bar chart (#94) 2018-09-05 08:44:49 -07:00
Michael Bruce
d667b8c983 spelling correction (#98) 2018-09-05 08:43:52 -07:00
Andrew Poydence
0506f74600 Fix typo in example (#100) 2018-09-05 08:43:35 -07:00
Will Charczuk
9e3a080aa3 profanity tweaks 2018-04-15 16:53:01 -07:00
Will Charczuk
44990c63ed Merge branch 'master' of github.com:wcharczuk/go-chart 2018-04-15 12:43:40 -07:00