-->

Unable to get sparklines working in AngularJS vers

2019-03-04 16:44发布

问题:

I have started a angularjs seed project with SmarrAdmin template.

I would like to create a sparkline in a view like this

<div class="sparkline" data-sparkline-type="bar" 
data-sparkline-width="50px" 
data-sparkline-bar 
data-sparkline-height="25px">
50,40,70
</div>

But the chart doesn't show up and all i see is "50, 40, 70"...

回答1:

After creating a seed angular project i had to add/uncomment the module 'app.graphs' in app.js.

The sparkline container is a directive implemented in this module.