In the attachment "Right Side Rectangle Attempt#1 you can see the red rectangle below the zero line.
In this line of code:
Rectangle rect = new Rectangle(X,Y, 23,54);
For "Y" I'm using:
int Y = (bounds.Y + bounds.Height) - ((int) ((( 0 - min) / ChartControl.MaxMinusMin(max, min)) * bounds.Height))-1;
Which seems to work good and gives me the zero reference.
But for the height term, I'm currently inserting 54 which is approximately the correct value. This is not the correct term as it is only a fixed value.
But before I can determine the algorithmic term for the height I need to first understand why when I use a negative term, it does not plot a rectangle. Example, if I use -54, no rectangle appears.
I'm still very confused on how to best get the Y and the Height terms to dynamically plot the rectangles.
regards,
taddypole...
Comment