Addepar / ember-charts

https://opensource.addepar.com/ember-charts/
Other
784 stars 131 forks source link

Make labels in horizontal bar charts flush with edges #134

Closed pnachum closed 8 years ago

pnachum commented 8 years ago

This basically reverts 485001bfb93b4341df57723eb8ba3a4bf8d9050c for horizontal bar charts, but leaves it for pie charts. Instead of having a configurable labelWidthMultiplier, which was used to determine the horizontal margin on both sides of the chart, the left and right margins are now computed based on the longest label on either side of the chart. This means that the labels should always be close to flush with the edges of the chart container.

@Addepar/fire

Blue highlight to show how close to flush it is image

With Y axis title image

Positive and negative values image

All negative values image

Long label image

embooglement commented 8 years ago

Tests are failing :(

pnachum commented 8 years ago

Working on it

pnachum commented 8 years ago

@Addepar/fire Tests are passing. Please review. I'll add some new tests for horizontal bar charts after we finish these commitments

billy-addepar commented 8 years ago

LGTM besides a minor comment