Gauge chart issue

I dont get analog pointer in gauge chart.

can you share the pic of your output bro?

use variable name in plotChart as light instead of light_data

plotChart(‘light’)

Try writing this code:
setChartLibrary(“google-chart”);
setChartTitle(‘Gauge Chart’);
setChartType(‘gauge’);
setAxisName(‘light_data’);
setDimensions(400, 400);
setMaxValue(1023);
plotChart(‘light_data’);




setChartLibrary(“google-chart”);
setChartTitle(‘Gauge Chart’);
setChartType(‘gauge’);
setAxisName(‘light_data’);
setDimensions(400, 400);
setMaxValue(1023);
plotChart(‘light’);

@adityajamkar283 this code worked…as i see in your screenshots in line1 google-chart is not in green color error in double quoteses…so if doesn’t work please type code rather than copy paste…if the nothing works then ping me…

1 Like

Your quotes must be ( ’ or " ) and not ( ‘ or ’ )
Your gauge and light_data is under ( ‘ and ’ )

Paste below code.

setChartLibrary("google-chart");
setChartTitle('Gauge Chart');
setChartType('gauge');
setAxisName('light_data');
setDimensions(400, 400);
setMaxValue(1023);
plotChart('light');

@adityajamkar283 check with qoutes(’ ') that you are entering …
check you’re line 3 and 4 it shoiuld be in green color…compare with the screenshot that i have provided

will u post screenshot of code plz

in few of the lines ur code is in white color instead of green i think u just copied and pasted the code… u better type the same code and only use “…” or ‘…’ in ur code dont use both and in the llast line use plotChart(‘light’);
if still not working change setAxisName(‘light’)

hope it works…main thing earse complete code and type dont paste

@adityajamkar283 in the hardware configurations you have named the A0 as light and in the product code you have used light_data variable so that is why the error is coming.

Replace it with light so that the values can be pushed to the cloud.

plotChart(‘light’)

I am sure the error will not come. The type of quotes don’t affect the code functioning. I guess this is the correct answer for your initial query, so do mark it as solution :slight_smile: