jquery sparkline not showing first bar well

631 Views Asked by At

http://omnipotent.net/jquery.sparkline

this is my code

 $("#sparkline-1").sparkline([5, 6, 7], {
                type: 'bar',
                height: '150',
                barWidth: 45,
                zeroAxis: false,
                barColor: '#7c87ad',
                tooltipFormat: '<span style="color: {{color}}">&#9679;</span> {{offset:names}} {{value}}',
                tooltipValueLookups: {
                    names: {
                        0: 'In Progress',
                        1: 'Monitoring',
                        2: 'Open',

                        // Add more here
                    }
                },
                negBarColor: '#7c87ad',

            });

Problem

in the picture you can see the problem it makes the '5' (sparkline([5, 6, 7]) value like zero on the graph but if i add zero to the values it will be ok $("#sparkline-1").sparkline([0,5, 6, 7], {

enter image description here

i don't want to add another value i need to set only 3 values

1

There are 1 best solutions below

0
On

i found the solution need to set minimum

chartRangeMin :0,