Prediction Graph shows data count 0 always

I am using the LM35 sensor for taking readings into the analog pin and displaying it through a prediction graph. Bu the data count of the graph always shows 0. My code is as follows:

setChartLibrary(‘google-chart’);
setChartTitle(‘Polynomial Regression’);
setChartType(‘predictionGraph’);
setAxisName(‘time_stamp’,‘tttt’);
mul(0.0977)
plotChart(‘time_stamp’,‘tttt’);

I have used the same code for another product. The code worked fine then. But suddenly something is wrong. The code is not working on the old product as well as a newly created product. Please help!

Update: I tried displaying other types of graphs and it seems that none of the graphs seem to get displayed. I tried writing HTML code for buttons. That seems to work fine.

Did you try to paste it on the old product as well?

You can first try closing with semi colon ‘;’ eg. - mul(0.977);

Other issues while copy-pasting the codes arise with the apostrophes. You can try putting them on the code input by yourself. Just head to the apostrophes, erase with backspace, and add it manually to all of them.

I pasted it on an old product. It still doesn’t work. I have tried it with a semicolon and also by replacing all the apostrophes with self-written ones but to no avail. The strange thing is that I am able to read the sensor value via a python code. But the sensor value is not getting displayed on any graph.

You have to keep the window open when the bolt is reading the pin. When you close the page, it stops storing the data.

Can you send a screenshot of your configuration tab and the output window?

The readings were getting stored even if the window was closed. But now it isn’t working. Also, could you read the update that I have given on my question. I am providing screenshots of the output and the configuration page.

@rahul.singh1 Can you look into this sir?

I was having the same problem. I Pushed the data into cloud and it started working for me. The graph was plotted perfectly.

1 Like

I have tried this too. But it isn’t working

I think something is wrong with the google-chart library or it may be down.

@akshayan.sinha could you please create a new product and plot something using google charts and see whether it is working or not?
Or you could use my code. Because i am getting reports from several users that the plot is not getting displayed.

Yes it is working fine for me. I tried area graph as well as prediction graph. Are you not deploying the configuration before viewing it?

1 Like

Yes, I was deploying the configuration. The only thing I was doing wrong and realised it now was that I need to attach the Bolt module to the USB port while deploying the configuration. I was actually attaching the module to a charging port on the wall socket. On attaching the Bolt module to the USB port of the laptop and on deploying the configuration, the graph is getting plotted.

Absolutelt NOT. You don’t need the Bolt connected to the laptop in ANY way. When you deploy the configuration, it configures to your cloud. And the cloud run the webpage and collects data from the bolt accordingly.

It must be some other issue in your case. Nothing to do with connecting to the laptop.