palantir / plottable

:bar_chart: A library of modular chart components built on D3
http://plottablejs.org/
MIT License
2.97k stars 224 forks source link

stack bar label being cut off #3435

Closed sixinli closed 6 years ago

sixinli commented 6 years ago

Bug report

Live example URL: http://jsfiddle.net/2bzs9eoq/

Expected behavior

label 23 to show up in full

Actual behavior

label `23 gets cut off

Possible Solution

Context

only happen when the chart is small - if change size to 600*400 this is fine

Environment

themadcreator commented 6 years ago

In order to make room for the text above the label, you'll need to modify the y scale.

Try yscale.padProportion(0.2) which will add more padding above the stacked bars. and try yscale.snappingDomainEnabled(false) which will prevent the domain from snapping to a "nice" value

themadcreator commented 6 years ago

We're not going to install a fix for this other than manually setting these values

themadcreator commented 6 years ago

see http://jsfiddle.net/2bzs9eoq/1/