Comments (8)
Hmm, that's strange. The last part of the demo tests angular-rickshaw against changes in series data, is it similar to what you're doing?
Maybe if you have a code snippet?
from angular-rickshaw.
I've created a wrapper directive on top of angular-rickshaw. I'm refreshing the data by reconstructing the rickshaw-series object (although the only truly changing values are in the .data arrays.
My template is simply
rickshaw(rickshaw-options="options", rickshaw-series="series", rickshaw-features="features")
And I'm updating the series with
scope.series = newSeriesObject();
It's not a basic scope.$apply issue, as the apply does nothing (and is not necessary according to my debugging).
from angular-rickshaw.
Could you try it without your wrapper directive? The problem may be caused by your wrapper.
The way the directive detects changes in the data did change from 0.5.0 to 0.6.0.
By default, it only watches for changes in the first series.
from angular-rickshaw.
I'm now fairly certain the bug is caused by this:
https://github.com/ngyewch/angular-rickshaw/blob/master/rickshaw.js#L139
The watchers are created to watch particular arrays when the directive is created. However, when the arrays are re-created or changed, the watchers are not updated. Therefore, they will continue to watch the old arrays which never change.
I implemented a workaround in my directive which reuses the same arrays which solves the issue.
One fix would be to revert the 'efficient' watcher change. I don't think it's majorly more efficient as the series objects are not that much larger than the data arrays.
from angular-rickshaw.
Another solution would be to create a "updateWatchers" type of function, which would recreate the watchers according to the new series object.
from angular-rickshaw.
Yeah, I think I'll revert it back to watch the entire object rather than just the series array.
from angular-rickshaw.
I've released 0.10.0 to address this issue. Hope this works for you.
from angular-rickshaw.
Thanks, 0.10.0 fixed the issue! 👍
from angular-rickshaw.
Related Issues (20)
- Use equality watch for Series HOT 3
- Resize of the window doesn't resize the graph HOT 2
- Add explicit injection to allow minify/uglify HOT 1
- Non-time xAxis HOT 2
- Multiple axis elements HOT 3
- Screen gets unresponsive for Realtime charts
- Add explicit injection
- Can't pass the hover.formatter through into hover config
- NPM availability HOT 2
- strange graph generation HOT 1
- tickTransformation
- d3 is not defined
- How to use Rickshaw.Series.FixedDuration?
- Rickshaw for Angular 2 with AoT supported
- Set width and height
- not published on bower.io HOT 2
- Resizable Charts HOT 2
- Observations
- Custom X Axis Labels HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-rickshaw.