Skip to content

Commit

Permalink
new option labelAlign to manage label align
Browse files Browse the repository at this point in the history
  • Loading branch information
apsavin committed Feb 27, 2012
1 parent be60f79 commit 6319bd0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions js/plugins/labels.js
Expand Up @@ -45,10 +45,10 @@ Flotr.addPlugin('labels', {
}

if (!options.HtmlText && this.textEnabled) {
drawLabelNoHtmlText(this, a.x, 'center', 'top');
drawLabelNoHtmlText(this, a.x2, 'center', 'bottom');
drawLabelNoHtmlText(this, a.y, 'right', 'middle');
drawLabelNoHtmlText(this, a.y2, 'left', 'middle');
drawLabelNoHtmlText(this, a.x, a.x.options.labelAlign || 'center', 'top');
drawLabelNoHtmlText(this, a.x2, a.x2.options.labelAlign || 'center', 'bottom');
drawLabelNoHtmlText(this, a.y, a.y.options.labelAlign || 'right', 'middle');
drawLabelNoHtmlText(this, a.y2, a.y2.options.labelAlign || 'left', 'middle');

} else if ((
a.x.options.showLabels ||
Expand Down

1 comment on commit 6319bd0

@cesutherland
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ultimately we would like to manage all this with a stylesheet. See HumbleSoftware#44. It'll cut down a bit on code size / complexity, simplify the API some, and make these types of customizations easier.

Please sign in to comment.