I have been using gauge.js on my site to plot the number of sales on my website, however when my value goes over the set max limit the gauge is going around again, have done some research and found that I need to set my 'limitMax' to true and it should solve the problem. But it hasn't any ides?
Here is my JS:
<script>
var opts1 = {
lines: 12,
angle: 0,
lineWidth: 0.4,
pointer: {
length: 0.75,
strokeWidth: 0.042,
color: '#1D212A'
},
limitMax: 'true',
colorStart: '#27ABE2',
colorStop: '#27ABE2',
strokeColor: '#F0F3F3',
generateGradient: true
};
var target = document.getElementById('foo'),
gauge1 = new Gauge(target).setOptions(opts1);
gauge1.maxValue = 100000;
gauge1.animationSpeed = 10;
gauge1.set(<?php echo $depotSales['TotalSales']; ?>);
</script>
I also tried wrapping the value in an if statement to force it to be 100000 but still no look, here it is:
<?php
$maxValue = $depotSales['TotalSales'];
if(($maxValue > 100000)){
$maxValue == 100000;
}else{
$maxValue == $depotSales['TotalSales'];
}
?>