I have a couple of divs like so
<div class="sparkline" data-values="[33,22,3,4,55,5]"></div>
<div class="sparkline" data-values="[100,12,33,48,58,60]"></div>
I want to init the sparklines using the data attribute but it's not working pretty sure it's just my jquery syntax can anyone point me in the right direction.
$(".sparkline").igSparkline({
dataSource: $(this).data('values'),
height: "300px",
width: "300px",
});
Hello barney,
Based on my understanding, if you want to generate multiple charts based on the series this would be one of the solution.
this works ok, any one going for anything better ?
$(".sparkline").each(
function () {
$(this).igSparkline({
})