Hi all,
I try to use variables which are set through a mysql querie in my metergauge.
Can anyone point me in the right direction on how to use these variables in the code?
<script>
$(document).ready(function() {
var chart_data = [ [23] ];
var chart_opt = {
title:'Temperatur',
seriesDefaults:{
renderer:$.jqplot.MeterGaugeRenderer,
rendererOptions: {
min: 00,
max: 50,
intervals:[10, 20, 30, 40, 50],
intervalColors:['#33ccff', '#66cc66', '#93b75f', '#E7E658', '#cc6666']
}
}
};
$.jqplot('chart4', chart_data, chart_opt);
});
</script>
I would like to replace the data in "
var chart_data = [ [23] ];
" with the variable $temp which is set outside the script.
Thanks