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

Colors of dynamically added bars in bar graph are the default color instead of specified color #42

Closed
ron opened this issue Feb 22, 2017 · 4 comments
Milestone

Comments

@ron
Copy link

ron commented Feb 22, 2017

Expected Behavior

When I update the chartData of a barchart containing a dynamic number of bars and an array of backgroundColors I expect the added bars to have the background color specified in the array.

For example:
I have a graph with 2 bars and a backgroundColors array of ['orange','green'] it displays correctly. When I update the data and it contains 3 bars with ['orange','green','blue'] the last bar is not blue but the default grey color.

I'm using the reactiveProp mixin.

Actual Behavior

The last bar is grey, not the color specified in the array.

Environment

  • OS: OSX
  • NPM Version: 2.3.5
@apertureless
Copy link
Owner

Confirmed.

It's because the mixin set's only the data in the watcher, not the whole dataset object.

Will be fixed in 2.3.6

@apertureless apertureless added this to the 2.3.6 milestone Feb 22, 2017
@ron
Copy link
Author

ron commented Feb 22, 2017

Nice.
Can you recommend a quickfix for me so I can fix this now? I tried to add a watcher on chartData but got stuck on updating the backgroundColors.

apertureless added a commit that referenced this issue Feb 22, 2017
apertureless added a commit that referenced this issue Feb 22, 2017
🐛 Fix reactiveMixins issue #42
@apertureless
Copy link
Owner

2.3.6 is now in npm. Just update the package. ;)

@ron
Copy link
Author

ron commented Feb 22, 2017

It works, many thanks!

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

2 participants