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

axis.settings.labels.fill does not support function #202

Open
peol opened this issue Sep 26, 2018 · 0 comments
Open

axis.settings.labels.fill does not support function #202

peol opened this issue Sep 26, 2018 · 0 comments
Labels
Type: Improvement Minor improvement of an existing feature

Comments

@peol
Copy link
Contributor

peol commented Sep 26, 2018

🐛 Bug report

As is common praxis with picasso.js nowadays, I expect to pass in a function to a property to programmatically control values in components.

This is not true for the axis labels fill property currently.

Steps to Reproduce

  1. Create an axis:
{
  type: 'axis',
  scale: 'y',
  settings: {
    labels: {
      _fill: 'blue',
      fill: v => (console.log(v), v < 50 ? 'red' : 'blue')
    }
  }
}
  1. Verify that the axis label is still black, and no values are logged to the console

Expected behavior

I expect to be able to control the value programmatically.

Actual behavior

It only takes a hardcoded (string) value.

Versions

  • picasso.js: 0.13.2
  • Browser: ?
@cbt1 cbt1 added the Type: Improvement Minor improvement of an existing feature label Oct 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Improvement Minor improvement of an existing feature
Projects
None yet
Development

No branches or pull requests

2 participants