Skip to content

Commit

Permalink
Merge pull request #1 from astrails/master
Browse files Browse the repository at this point in the history
fix for rendering series of bar chart lablels
  • Loading branch information
mobz committed Jun 28, 2011
2 parents 4a42fe8 + 685adf8 commit 7ed03ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/g.bar.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ Raphael.fn.g.barchart = function (x, y, width, height, values, opts) {
for (var i = 0; i < len; i++) {
for (var j = 0; j < (multi || 1); j++) {
// did not remove the loop because don't yet know whether to accept multi array input for arrays
var label = paper.g.labelise(multi ? labels[0] && labels[0][i] : labels[i], multi ? values[0][i] : values[i], total);
L = paper.g.text(bars[0][i].x, isBottom ? y + 5 + height - barvgutter / 2 : bars[0][i].y - 10, label);
var label = paper.g.labelise(multi ? labels[j] && labels[j][i] : labels[i], multi ? values[j][i] : values[i], total);
L = paper.g.text(bars[j][i].x, isBottom ? y + 5 + height - barvgutter / 2 : bars[j][i].y - 10, label);
if (rotate) {
L.rotate(90);
// If we rotated it, we need to move it as well. Still have to use the width
Expand Down

0 comments on commit 7ed03ae

Please sign in to comment.