Author Topic: increasing bar graph  (Read 13618 times)

MimmoA

  • Guest
increasing bar graph
« on: September 02, 2013, 09:39:36 AM »
Hi,
is there anybody that can help me with the bar graph?
I would like to make it increases according to my RPM or pressure. I know it's easy but I'm new with the Plus +1
My display is a SD DP250.
Thank you so much.
Mimmo.

Offline Jakob

  • PLUS+1 Expert
  • ****
  • Posts: 98
  • Karma: +2/-0
Re: increasing bar graph
« Reply #1 on: September 02, 2013, 12:03:48 PM »
Hi Mimmo
It can be as simple or as complicated as you want.
To learn Plus1 the simple way would be to make a fixed scale bargraph.

First, find the (x,y) coordinates for both the beginning and end of the bar.

Then Scale the input from x-start to x-end, or y if you want a vertical bargraph.

Connect those scaled values to a line in the design editor, and you have a working bargraph.

/Jakob

Offline swordfeather

  • PLUS+1 Developer
  • ***
  • Posts: 14
  • Karma: +1/-0
Re: increasing bar graph
« Reply #2 on: May 30, 2020, 10:07:12 AM »
Hi,

Did u get this to work? I can't manage to get my bar graph working.
Is there a way to adjust the width and height of an image?
Is it possible to adjust the color of the bargraph in a gradient way from green to green-orange to orange to red?

Thx in advance.

Offline acmall

  • PLUS+1 Guru
  • *****
  • Posts: 201
  • Karma: +37/-1
Re: increasing bar graph
« Reply #3 on: June 01, 2020, 09:11:20 AM »
You could create an image with the desired gradient, place the image on the screen then place a line on top of the image. Set the width and endpoints so that the line hides the image. You can then use a signal to move one of the endpoints to reveal a portion of the image creating a bar graph effect.

This could be made as a widget to make it easily reusable.

Offline swordfeather

  • PLUS+1 Developer
  • ***
  • Posts: 14
  • Karma: +1/-0
Re: increasing bar graph
« Reply #4 on: June 01, 2020, 09:33:48 AM »
Hi,

This is exactly what i've done. I managed to get it working ;)
Is it possible to set the coordinate system to the lower left corner instead of the upper left?

Thx in advance