I was working on sparklines bar graph. Until now I am able to draw a simple bar graph, here is the Jquery code:
values = [0,8, 15, 10, 50, 25, 35, 70];
$('.sparkline').sparkline(values, {
type: 'bar',
height: '200px',
barWidth: 20,
barSpacing: 10,
barColor: '#56aaff',
zeroColor: '#000000',
enableTagOptions: true,
tagValuesAttribute: 'data-values',
colorMap: ["red", "green", "blue", "yellow", "orange", "#f2f2f2", "maroon", "pink"]
});
HTML
<p>
<span class="sparkline">Loading...</span>
</p>
Please refer my code at JSFIDDLE .
Now I want to add legends name as well as value of y-axis on each of the bar as shown below.
sun,mon,tue are legends and the value on white color at the top of the bars are y-axis value.
But I am not able to achieve it.
Any Help would be appreciated.