@php $targets = json_decode($reports[$i]['targets']); $gauge = "var opts = { angle: 0, lineWidth: 0.15, radiusScale: 1, pointer: { length: 0.39, strokeWidth: 0.064, color: '#FFF' }, limitMax: false, limitMin: false, colorStart: '#6FADCF', colorStop: '#8FC0DA', strokeColor: '#E0E0E0', generateGradient: true, highDpiSupport: true, renderTicks: { divisions: 3, divWidth: 1.9, divLength: 0.41, divColor: '#333333', subDivisions: 5, subLength: 0.24, subWidth: 0.9, subColor: '#666666' }, staticLabels: { font: '12px Roboto', color: '#FFF', labels: [".intval($targets->low_from).", ".intval($targets->low_to).", ".intval($targets->mid_to).", ".intval($targets->top_to)."], fractionDigits: 0 }, staticZones: [ {strokeStyle: '#F03E3E', min: ".intval($targets->low_from).", max: ".intval($targets->low_to)."}, {strokeStyle: '#FFDD00', min: ".intval($targets->mid_from).", max: ".intval($targets->mid_to)."}, {strokeStyle: '#30B32D', min: ".intval($targets->top_from).", max: ".intval($targets->top_to)."}, ], }; var target = document.getElementById('g_".$i."'); var gauge = new Gauge(target).setOptions(opts); gauge.maxValue = ".intval($targets->top_to)."; gauge.setMinValue(".intval($targets->low_from)."); gauge.animationSpeed = 52; gauge.set(f_value)"; @endphp {!! $gauge !!}