문제

I want to create a bar chart application in windows based .net application, i want that on the runtime whenever user enter some value in textBox and click on the button the bar should actually grow or shrink according to the value given by the user, i tried the same everything is working except, i am not getting how to make the bar increase vertically bottom to top, as the height param of the FillRectangle always makes it increase from top to bottom i want reverse functionality..

Please anyone help me for this, as it is of utmost important. Thanks and Regards Abbas Electricwala

도움이 되었습니까?

해결책

You have to position the bar at the point on the graph where giving it a height fills the rectangle so that it just touches the bottom of the graph.

For example, if the bottom of the graph is at 320 pixels and the bar needs to be a height of 40, you would create the rectangle so that it appears at 320 - 40, or 280, then give it a height of 40. That will make it appear at the right spot and be the correct height.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top