Currently, I am embarking on a project that involves utilizing the AngularJS version of the SmartAdmin Bootstrap template foundhere.
Within this project scope, I am required to integrate sparklines into various pages. I have successfully implemented them with static data like so:
<div id="revenue-chart" class="sparkline no-padding bg-dark-orange"
data-sparkline-type="line"
data-fill-color="#ffc65d"
data-sparkline-line-color="#ffc65d"
data-sparkline-spotradius="0"
data-sparkline-width="100%"
data-sparkline-height="180px"> 90,60,50,75,30,42,19,100,99,76,89,65 </div>
The feature in the SmartAdmin template facilitates the integration of jQuery sparklines without direct javascript manipulation through the use of data-* directives.
Upon switching the code to the following structure below, the graph ceases to display:
<div id="revenue-chart" class="sparkline no-padding bg-dark-orange"
data-sparkline-type="line"
data-fill-color="#ffc65d"
data-sparkline-line-color="#ffc65d"
data-sparkline-spotradius="0"
data-sparkline-width="100%"
data-sparkline-height="180px"> {{revenue.points}} </div>
I appended
<div> {{revenue.points}} </div>
to the page which successfully prints the values, indicating the successful transfer of values to the page.
My speculation suggests that the rendering of the graph occurs before Angular code processing hence resulting in an absence of data for graphical representation. Is there any code snippet I can introduce to prompt the graph to redraw post Angular substitution? Alternatively, is it feasible to postpone the graph drawing until after substitution completion?
Being relatively new to Angular and Bootstrap, I acknowledge that there may be overlooking something crucial, although uncertain what other avenues to explore within this context.
This particular template integrates Bootstrap 3.3 and Angular 1.4.2.