Skip to content
This repository has been archived by the owner on Nov 7, 2019. It is now read-only.

Use axisLabelColour (if set) for html labels, or omit inline css color #23

Merged
merged 1 commit into from
May 4, 2014

Conversation

apinkney97
Copy link

HTML labels are currently hardcoded to use this.opts.color, which is used by flot for colouring gridlines. Since this is set as inline css, it's impossible to override with a stylesheet (using eg .axisLabels {color: black;}) and effectively means that the axis labels have to be the same colour as the gridlines.

This should probably use this.opts.axisLabelColour if it's been set, and otherwise omit the inline color declaration so that some global style can be applied.

Specifically the line

'color: ' + this.opts.color + '; ' + 

should be replaced with something like

(this.opts.axisLabelColour ? 'color: ' + this.opts.axisLabelColour + '; ' : '') +

markrcote pushed a commit that referenced this pull request May 4, 2014
Use axisLabelColour (if set) for html labels, or omit inline css color
@markrcote markrcote merged commit fc38d82 into markrcote:master May 4, 2014
@markrcote
Copy link
Owner

Good point. Thanks!

@markrcote
Copy link
Owner

Actually, I decided to remove that line altogether. Everything else (font family, size, etc.) is configurable via CSS, so there's no point in having an explicit option for colour (plus plain HTML mode doesn't support it).

Regardless, thanks for getting me thinking about it. :) I added you to the list of contributors.

@apinkney97 apinkney97 deleted the html_axisLabelColour branch May 9, 2014 12:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants