Is it possible to change the width of the colourlines used for drawing the start and end of the colourbands??
I'm in to a situation in that if the user zooms in a lot and makes a colourband too small, then on zoom out it doesn't appear as it is too thin, so I was going to see if the thickness of the lines could be changed - i'm not sure what else could be done!
Regards,
Chris
colorband start and end lines
Hi Chris,
You could calculate the minimum difference between values that make them visible doing this after a first draw:
And then force the values of your colorband to have this minimum visible distance at OnUndoZoom event.
As you can see here you should add some code to save the old end colorband value and restore it at OnZoom event.
Another possibility could be drawing a line directly to the canvas using OnAfterDraw event.
I hope these ideas will help you.
You could calculate the minimum difference between values that make them visible doing this after a first draw:
Code: Select all
OnePixelIncrement = tChart1.Axes.Left.CalcPosPoint(0) - tChart1.Axes.Left.CalcPosPoint(1);
Code: Select all
void tChart1_UndoneZoom(object sender, EventArgs e)
{
if (Math.Abs(colorband1.Start - colorband1.End) < Math.Abs(OnePixelIncrement))
{
colorband1.End = colorband1.Start + 2*OnePixelIncrement;
}
}
Another possibility could be drawing a line directly to the canvas using OnAfterDraw event.
I hope these ideas will help you.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |