Graph widget scale and labeling controls

Not sure if this is just me but hoping to see some ability to control the y-axis scale values on the graph widget.
When reading analog values there are times where the default scale of 0-1023 is not useful. Labeling is yet another area of interest for both y and x graphing axis.

One thought in the meantime would be to use some mapping function to adjust any input analog value to make it fit the current default Blynk graph widget. map(value, fromLow, fromHigh, toLow, toHigh)

Thoughts?

@Smashim You can actually control the scale of the y-axis. Just tap on the two boxes (0 or 1023) next to the pin selection of the graph widget.
I dontreally know is this is what you meant. :slight_smile:
but it is possible to control the scale of the y-axis.

1 Like

By putting other values to min/max fields you can “filter” incoming data and change the scale. For example: you sensor never shows values > 500 and <100. Put 100 -500 into the min/max fields.

Also, we have a built in mapping. For this just tap and activate the icon on the line between min/max fields.

Example: you want to show amount of light in percentage 0-100. Your sensor reads 0-1023.

Put 0-100 into Min/Max fields and activate mapping. This will be equal to:
map(value, 0, 1023, 0, 100);

1 Like

Thanks for the clarification on the scaling controls. Too busy to notice the obvious and that works great!

Regarding the 2nd part of the feature request about at least having the ability to be able to assign y-axis labels? Any thoughts on that would be welcomed.

Label for Y sounds like a great idea. Not that much space there, but I like it! Thanks

Good point about space but two thoughts about that to consider:

1 - As things get crowded on the mobile device displays with more widgets you may get requests to also view the app in “landscape” mode that might open up some horizontal viewing space.
2 - I think you will also find that as you see many users using tablets this is where you will have plenty of space to do more creative use of adding labeling for graphs and other future widgets you guys have in mind.

Great work so far…this app has a ton of promise!

2 Likes

Pavel,

I tried to use the mapping funtion as described, but it does not work as written. No matter what values I use for the Max value, the graph always the displays the maximum when I turn on the mapping function. When I turn it off, it shows the ADC value. I’m using Analog Pin A0 on a Spark (Particle) Core.

Any thoughts on what I could do to correct this?

Thank you.

@Blynker442, are you on iOS or Android?

@Pavel, I’m using iOS 8.

Now I see, where is the problem. The issue is that iOS version is using incorrect min/max for Particle. It’s 0 - 4095, but app uses 0-1023 as a default Arduino input range. This is a known bug and it will be fixed soon.

It should work correctly on other boards except Particle. Sorry for that

@Pavel,

Does that mean that I can provide a signal to the Analog pin that is in the lower quarter of the range <1023 and the Blynk app will scale it correctly? Or should I just not worry about this until the next update?

Thanks!

If you will map your data to 0-1023 - then Mapping feature in the Blynk app should work correctly.

But if you are doing mapping on hardware side, then additional mapping in Blynk might not be necessary.

Hello Pavel,
I am setting the MIN and MAX values in the blynk app (iPhone6 - iOS 9.0.2) although the widgets display the Full scale values as the defined Min & Max values, the actual reading is still showing 1023 instead of 15 as defined in the Max field. So for me the scaling is not working. Any suggestions?