jQuery Sparkline Pie Chart custom tooltip
HTML
<script src="http://omnipotent.net/jquery.sparkline/2.1/jquery.sparkline.js"></script>
<p>
Sparkline appears here: <span id="sparkline">6,3</span>
</p>
<script>
$(function() {
$('#sparkline').sparkline('html', {
type: 'pie',
offset:'-90',
sliceColors:['#303030','#f2f2f2']
});
});
</script>
JavaScript
// jsfiddle configured to load jQuery Sparkline 2.1
// http://omnipotent.net/jquery.sparkline/
// Values to render
// Draw a sparkline for the #sparkline element
$('#sparkline').sparkline('html', {
type: "pie",
offset: "-90",
sliceColors: ['#303030','#f2f2f2'],
// Customize the tooltip
tooltipFormat: 'Available {{value}} - ({{percent.1}}%)'
});