Gauge Graph not working

there is no pointer in the gauge graph

Hi @rounak2002topdar
Check whether the code you had written is the same as below

setChartLibrary(‘google-chart’);
setChartTitle(‘Gauge Chart’);
setChartType(‘gauge’);
setAxisName(‘axis_name’);
setDimensions(400,400);
setMaxValue(1023);
setYellow(501,725);
setRed(726,1023);
setGreen(250,500);
plotChart(‘your_variable_name’);

If it worked, post as it worked…

3 Likes

Hi Rounak! If you type the following code…
tric

…then you get the proper gauge output with the pointer in the colour zone corresponding to their respective light intensity data values

Hope it helped! :slight_smile:

Hi @phaniraghavendra661
Thank you for the clear code.
I made a mistake at plotChart(‘variable_name’);
Got the correct output i.e., needle pointer…
Thank you once again.

1 Like

setChartLibrary(“google-chart”);
setChartTitle(‘Gauge Chart’);
setChartType(‘gauge’);
setAxisName(‘light’);
setDimensions(400, 400);
setMaxValue(1023);
setGreen(250, 500);
setYellow(501, 725);
setRed(726, 1023);
plotChart(‘light’); // light is the variable name

Please check whether you have used this code or not?

Hi @durgasuprika2299

It’s my pleasure

Thank you for the solution. :slightly_smiling_face:
I was also facing the same problem. But now I got the correct gauge graph.

It’s my pleasure :blush:

Hello!!!
@rounak2002topdar

Use this code for result:

setChartLibrary(“google-chart”);
setChartTitle(‘Gauge Chart’);
setChartType(‘gauge’);
setAxisName(‘light’);
setDimensions(400, 400);
setMaxValue(1023);
setGreen(250, 500);
setYellow(501, 725);
setRed(726, 1023);
plotChart(‘light’);

I think you had miss the code for chart title and just replaces some code lines.