Skip to content

Commit

Permalink
Merge pull request #29 from calebthebrewer/big-zero-value
Browse files Browse the repository at this point in the history
Wide "small" value, fixes LC-1302
  • Loading branch information
cazzer committed Sep 1, 2015
2 parents 8adc0a9 + b85ee19 commit 6e127d0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions ampersand-chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -869,9 +869,11 @@
})
.attr('x', function(d) {
if (d.percent < 10) {
this.style.textAnchor = 'start';
return (this.parentElement.offsetWidth * (d.percent / 100)) + 5 + 'px';
}

this.style.textAnchor = 'end';
return d.percent + '%';
})
.style('fill', function(d) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ampersand-chart",
"version": "0.1.23",
"version": "0.1.24",
"description": "Ampersand module for drawing a charts.",
"main": "ampersand-chart.js",
"scripts": {
Expand Down

0 comments on commit 6e127d0

Please sign in to comment.