How To Add "Chart is Rendering..." Indicator
-
When the chart initially renders, or re-renders when the user changes the data, I want to provide some graphic indication, such as an animated gif, that appears anytime my chart is changing, then automatically goes away when that change has completed.
Is there a built-in Mango Dashboards way to do that, or a loading flag I can access to do this myself?
-
You could try something like this -
<div layout layout-align="center center" style="height: 300px"> <md-progress-circular class="md-accent" md-diameter="70" ng-if="!(point1Values.length && point2Values.length)"></md-progress-circular> <ma-serial-chart style="height: 100%; width: 100%" ng-if="point1Values.length && point2Values.length" ....etc... ></ma-serial-chart> </div>
-
Thanks Jared. Where can I find API docs for md-progress-circular? I only know of the Dashboard API, and I don't see it there.
-
It's part of Angular Material, which is a component framework that's included in the dashboard module.
That specific directive is documented here: https://material.angularjs.org/latest/api/directive/mdProgressCircular
Angular Material is documented in general here: https://material.angularjs.org/latest/ -
@phildunlap Thanks. Very helpful.