Airikr
Airikr

Reputation: 6436

The bar chart from Sparklines won't load

I have two charts from Sparklines: one as pie and one as bar. The pie chart works fine but the bar chart dosen't even load. On my local web server, the bar chart loads fine. I'm getting no errors at all!

<div id="bar"><div id="chart">96,96,96,96,39,48,97,89,96,96,96,60,96,96,96,96,97,96,96,90,80,97,96,98,96,96,96,67,96,96,94,94,96,96,96,96,96,96,96,96</div></div>

$('div#bar > div#chart').sparkline('html', {
    type: 'bar',
    barColor: 'white',
    height: '30px',
    borderWidth: 5,
    borderColor: '#f5f5f5',
    tooltipFormat: '{{value}}'
});

You can find the website with the charts here. Only the data for the bar chart are visible. Any idea why it is like this?

Upvotes: 0

Views: 281

Answers (1)

Airikr
Airikr

Reputation: 6436

Success! It was the double div#chart that was the "error". When I changed it to div#pchart for the pie chart and div#bchart for the bar chart, the bar chart was finally visible!

Upvotes: 0

Related Questions