Comments (3)
Hey @owaaa,
thanks for reporting. I have not experienced this issue yet, what are you passing in tho the dataset variable? A $promise
?
Perhaps the simple use of if (!scope.dataset) {}
isn't the best to determine if the dataset
key is present in the scope
.
from angular-chart.
I think the problem is the scope promise is from another directive vs a controller which already exists. Angular builds and links children first so the chart directive is post_linked before the link is called in my directive. Therefore nothing exists in dataset the first time its called. Normally this isn't an issue with other directives as when you compile the binding {{}} or use a watch angular will populate it when the parent has the data and everything works. I was tempted to fork and just remove the throw and let it continue to set up the watchers.
I just found a workaround where if I set an ng-if on the chart and wait for the dataset it works.
I have hence hit a second issue. I need to cap the y-axis to a max, but it doesn't seem to be respecting that option? I also can't seem to find a way to set a tick interval on the x/y axes?
from angular-chart.
I tried my best to handle all kind of promises and late assignment in the new release. Please try if it works like expected.
Furthermore setting ranges for the axes can be accomplished using the same api c3 provides, have a look a this grafiddle to see a working example.
from angular-chart.
Related Issues (20)
- charts don't render HOT 1
- some options don't work HOT 2
- Custom Legend Support? HOT 3
- Injecting chart containers HOT 3
- dimensions with predicate?
- Get data on click HOT 2
- Y axis goes below 0 when min is set to 0 and dataset starts at 1 HOT 1
- Is C3s data.xs supported? HOT 2
- request: function for line chart marker color in dimension configuration HOT 2
- Failed to parse x '2016-06-29 04:10:01' to Date object
- How to capture the x axis tick label HOT 1
- chart is not displaying in Chrome browser.
- How to implement on click event on piechart/bar chart using this directive HOT 2
- accesing $scope inside chart.data.onclick event of pie chart HOT 1
- show pie chart on click of bar chart(chart drilldown)
- Chart is generated with black color fill. HOT 2
- scatterplot implementation HOT 2
- Zoom should be called when chart is applicable for it HOT 4
- Move to billboard.js? HOT 1
- npm audit vulnerabilities found in v0.5.0
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-chart.