Is there a simple method to animate a rectangle as a bar chart? Fill from bottom to top based upon variable value. 0 is no fill. 100 is full. Background color stays the same. Fill color stays the same color and "overlays" the background color. The provided bar chart takes too much room on the screen and if "shrunk" it essentially eliminates the bar.
Just trying to make a simple PID faceplate.
Thanks
Bar Chart Animation
-
- Posts: 824
- Joined: Tue Mar 13, 2012 9:53 am
Re: Bar Chart Animation
You can use the following Rectangle properties to change the size and placement of the object via C#.
If you change the height of the rectangle, you may need to move it at the same time so that the rectangle ends up in the position that you want it to. Changing the Height will grow/shrink one size of the rectangle, while the other size stays put.
If the top moves down, while the bottom stays in the same position, you would need to move the rectangle up so that it looks like the bottom side is the one that is moving.
Code: Select all
this.Rectangle1.Height += 1;
this.Rectangle1.Top += 1;
If the top moves down, while the bottom stays in the same position, you would need to move the rectangle up so that it looks like the bottom side is the one that is moving.
Best Regards,
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer