Skip to content
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

Mirrored ticks are hard to distinguish depending on the chart colours #6784

Closed
joseraul opened this issue Nov 23, 2019 · 4 comments
Closed

Comments

@joseraul
Copy link
Contributor

joseraul commented Nov 23, 2019

Expected Behavior

Ticks can have a background colour that helps with contrast

Current Behavior

Mirrored ticks are hard to distinguish depending on the chart colours, this is a real example:

image

Possible Solution

We could expose a couple of properties like strokeStyle and lineWidth and internally do something like:

ctx.strokeStyle='white';
ctx.lineWidth=2;
ctx.strokeText(label, bar._model.x, bar._model.y);
ctx.fillText(label, bar._model.x, bar._model.y);

In this way, the texts will have a background color (white in this case) that I think will solve the issue. We could add a shadow also, to make it more smooth.

If someone points me in the correct direction, I would love to help with a PR.

Steps to Reproduce (for bugs)

This is a live example:
https://codepen.io/joseraul/pen/qBBwgpQ

Context

I can't use the colours of the project

@benmccann
Copy link
Contributor

The code is here:

_drawLabels() {

@joseraul
Copy link
Contributor Author

thanks @benmccann , I'm gonna work on this

@joseraul
Copy link
Contributor Author

oki! PR sent! #6787 :)

@etimberg
Copy link
Member

Done in #6787

@etimberg etimberg added this to the Version 3.0 milestone Jan 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants