Don in Discussions
上次活动时间: 2024-4-29

Now it's just a dial and pointer. There used to be a numeric value underneath. I mentioned this in another thread about the column function not working, but thought maybe it needs it's own thread to be noticed. This broke about the same time as the line/column problem and the not being able to move windows around anymore. 'Field Gauges' no longer have the actual values appear under the gauge. Thanks for pointing it out. We are aware, but the seperate thread is still helpful, plus it gives me a place to report when its fixed. I just tried it with a new gauge widget and it worked. Unfortuantely, you may have to recreate the field gauge widget. Please let us know if that works. Hi, the problem still exists. Gauges are not working it still isn't working, any idea when it might be fixed? @Satyam have you tried creating a new gage? i did tried making new widgets but it didn't showed any data, i am getting data on my graph but not on the gauge Dial and a pointer seem to be good progress. Have you checked the 'display value' checkbox in the gage options? What do you mean by the column function? I looked back at other threads you have posted in to see, but none that I found were related. Can you describe more in detail or show a screen shot? @Satyam I see the plot, but I dont see that you have tried a gage in this screen shot. Can you show a gage and the properties in a screen shot? I'm adding both the screenshot for gauge+ numeric value and parameters for gauge here is the second screenshot for parameters Just to make sure there is no issue with the data, can you share the values of some of your recent points? I see that the field plot is working, but the gage has a different parser so there may still be an issue with the data. You can get the last few values using this format when logged in https://api.thingspeak.com/channels/<channel ID>/feeds.json?results=2. If you arent logged in you might have to add &api_key=<CH_API_KEY> to the end. visualizations widget gauge gauge
Pedro in Discussions
上次活动时间: 2023-1-25

Hi, what would be the best approach to use the gauge widget to display calculated data? I have a channel that displays a value that needs some math applied to it to give a correct value. I have a matlab visualization that converts this value into what I need and plots it. However, i believe a gauge is more appropriate than a plot and it seems the matlab "uigauge" object does not work for thingspeak. Is there a way for the gauge widget to show my data coming out of the matlab script? Thanks! Gauge widget with matlab data There is a Gage widget built into thingSpeak. On the channel view, select Add Widget, and choose the gage widget. Select the channel, field, and propoerties of the gage widget and the channel where you want it to be displayed. See the widget help for more info. Hi Christopher, thank you for the feedback. I understand that there is a built in feature for that, but it seems seems like it only works for data from the fields that I publish. I wanted to have a gauge to show the result of a matlab script. Say if a channel publishes a 0-100 value, but I use matlab to conver it to a value between 5-35. How could I add a gauge for that? Are you using desktop MATLAB, or MATLAB analysis/viz in ThingSpeak? Either way, after the conversion, you can write back to a new channel and set the gage to read from that new channel. You can also write code in MATLAB to generate a gage visualization for you. A polar plot makes a good start. I mean in MATLAB analysis/viz in ThingSpeak. In regular MATLAB I can create a gauge with uigauge with no issues. I just wanted to see if I could do the same in ThingSpeak but it seems like I will have to write to a different channel. Most UI elements arent allowed in ThingSpeak due to the interface. I have some fairly medium quality gage code that would work in a MATLAB viz, Ive been meaning to post it on file exchange. Thanks for the push. Would something like this work for you? Its a MATLAB function you can run in ThingSpeak to make a gage in a MATLAB viz Absolutely! Thanks for your help! Im not going to get around to putting this on File exchange becasue its too sloppy of a solution, but if it works for you, here is the silly function I wrote (be careful if you use small numbers, the rounding will kill it). % Sample call mygage(475,1,3000,0,1200,1200,1800,1800,2800,25); function MakeGage = mygage(value, lowRange,highRange,greenLow,greenHigh,yellowLow,yellowHigh,redLow,redHigh,nTicks) % TODO range cannot be less than 1 due to rounding fullRange = highRange - lowRange; greenStart = 230 - (360-80) / fullRange * (greenLow - lowRange); greenEnd = 230 - (360 - 80) / fullRange * (greenHigh - lowRange); yellowStart = 230 - (360 - 80) / fullRange*(yellowLow - lowRange); yellowEnd = 230 -(360 - 80) / fullRange * (yellowHigh - lowRange); redStart = 230 - (360 - 80) / fullRange * (redLow - lowRange); redEnd = 230 - (360 - 80) / fullRange * (redHigh - lowRange); tickMove = fullRange / nTicks; green = [greenStart:-5:greenEnd]; green = green*2*pi/360; rgreen = ones(1,size(green,2)); polarplot(green, rgreen,'g','LineWidth',16); hold on yellow = yellowStart:-5:yellowEnd; yellow = yellow*2*pi/360; ryellow = ones(1,size(yellow,2)); polarplot(yellow, ryellow,'y','LineWidth',16); red = redStart:-5:redEnd; red = red*2*pi/360; rred = ones(1,size(red,2)); polarplot(red, rred,'r','LineWidth',16); valueAngle = 230 - (360-80) / fullRange * (value - lowRange); rblack = [0:0.1:1]; black = valueAngle * 2 * pi/360 * ones(1,size(rblack,2)); polarplot(black, rblack,'k','LineWidth',5); ax = gca; ax.RTickLabel = []; ax.RGrid = 'off'; width = 280 / nTicks; tickHold = 0:width:280; tickHold = tickHold-50; tickHold = [tickHold(tickHold>=0),tickHold(tickHold<0)+360]; ax.ThetaTick = tickHold; %ax.ThetaTick=[0:width:230,310:width:360]; tickLabels = round([highRange:-tickMove:lowRange],0); shift = round(50 / width); tickLabels = circshift(tickLabels,-shift); ax.ThetaTickLabel = tickLabels; ax.RLim = [0,1.05]; text(265*2*pi/360,0.8,string(value),'fontSize',20); hold off end matlab widgets gauge
Sydney in MATLAB Answers
上次活动时间: 2022-11-4

I am trying to use the iframe of the thingspeak widget to show the widget on an external website. I am using the gauge widget and when I add the widget to the website using iframe the background is a lot wider than the gauge. I only want the widget to be displayed as being as wide as the acutal information part, i.e., the gauge and the current temperature reading with its units. I do not want the extra background sections to be displayed. I have tried changing the iframe code to create a transparent background, as well as cropping the background within the iframe code using div container but any changes I make to the code do not reflect on the actual apperance of the widget at all on the website. I have tried just resizing the widget using on the website (I am using wix for the website if that helps) but instead of cropping the widget to fit properly within the box, it resizes it and allows the users of the website to scroll the widget around to get it aligned properly. I do not want my users to have to scroll to get the gauge to appear in the middle so if there is a way to crop the background of the widget or to make the background transparent that would be greatly appreciated. I have tried every option so far that I can find when searching for this problem.
Teemu Parta in MATLAB Answers
上次活动时间: 2020-10-27

Why my gauge gets range from 3 to 8 while im typing to set it to 3 to 5.5..? Screenshots included

关于 ThingSpeak

The community for students, researchers, and engineers looking to use MATLAB, Simulink, and ThingSpeak for Internet of Things applications. You can find the latest ThingSpeak news, tutorials to jump-start your next IoT project, and a forum to engage in a discussion on your latest cloud-based project. You can see answers to problems other users have solved and share how you solved a problem.