I am working on a little dashboard overview of a ticket system which runs a little graph on the side. This graph is rendered via the jqx graphs. The rendering itself works fine, but its the tooltip that causes me some headaches.
$(document).ready(function() {
var over = <?php echo '100'; ?>;
var totaal = <?php echo '400'; ?>;
$('#bar-gauge-uren').jqxBarGauge({
colorScheme: "scheme04",
values: [over],
max: [totaal],
relativeInnerRadius: 0.8,
tooltip: {
visible: true,
formatFunction: function(over, totaal) {
var realVal = parseInt(over);
var totaalVal = parseInt(totaal);
alert(totaalVal);
return ('Totaal aantal uren: ' + totaalVal + ' <br/>Price Index:' + realVal);
},
}
});
});
I am trying to acces in my function 2 variables. The totaal variable and the over variable. The over variable works fine, which is being displayed in the overview just fine, but the totaal variable isn't. I tried to alert it out, but it returns 0, while it works fine when it's being called in the graph rendering (it displays 400 on the bar as a total, since my red bar is only filled to 100 see image )
I am not sure what i do wrong. Do I pass my variable wrong in the function?
