New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text-align style property is not working in dataLabels #6282

Closed
MarcAragones opened this Issue Jan 23, 2017 · 2 comments

Comments

Projects
None yet
3 participants
@MarcAragones

MarcAragones commented Jan 23, 2017

Expected behaviour

The text in the bubble's label should be centered.

Actual behaviour

The text is left aligned.

Live demo with steps to reproduce

http://jsfiddle.net/jzawgwef/10/

Affected browser(s)

Chrome

@pawelfus

This comment has been minimized.

Show comment
Hide comment
@pawelfus

pawelfus Jan 23, 2017

Contributor

Thank you for reporting!

Workaround:
Use CSS:

.highcharts-data-label span {
  text-align: center
}

Demo: http://jsfiddle.net/jzawgwef/11/

Or set this CSS inline: http://jsfiddle.net/jzawgwef/13/

Contributor

pawelfus commented Jan 23, 2017

Thank you for reporting!

Workaround:
Use CSS:

.highcharts-data-label span {
  text-align: center
}

Demo: http://jsfiddle.net/jzawgwef/11/

Or set this CSS inline: http://jsfiddle.net/jzawgwef/13/

@TorsteinHonsi

This comment has been minimized.

Show comment
Hide comment
@TorsteinHonsi

TorsteinHonsi Jan 24, 2017

Collaborator

The fix applies to this case, but it still doesn't work when useHTML is falsy. See http://jsfiddle.net/highcharts/jzawgwef/14/, and note that textAlign must be written as camelCase.

Collaborator

TorsteinHonsi commented Jan 24, 2017

The fix applies to this case, but it still doesn't work when useHTML is falsy. See http://jsfiddle.net/highcharts/jzawgwef/14/, and note that textAlign must be written as camelCase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment