jettro / jettro/c3-angular-directive

Data Not Rendering From Custom Service

Open
#137 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
201
Forks
96
PR merge metrics
No merged PRs in 30d

Description

Hey Bud, great job on this package, really works great.

Having a bit of an issue I've been racking my brain trying to fix for the last three days. I built a custom service that my controller is assigning $scope variables from and then I'm trying to interpolate those $scope variables into the gauge charts at the "column-values" attribute.

When I try to do this without the custom service, the $scope variables interpolate just fine and the gauge shows the data from the $scope variables. When I use the custom service however, the gauge seems to be rendering before the data is returned from the service. When I look in the HTML, the data is _there_ in the "column-values" attribute, but it seems the gauge itself already rendered from null values (thus displaying 0.0%) before the interpolated values were inserted.

Is there a way I can delay the chart from rendering until the data is returned? Either that or reload the chart after some setTimeout period? Really lost on this, checked everywhere on Github and StackOverflow.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.