Hi,
I recently noticed that the MinimumOffset and MaximumOffset of an axis do not behave the same anymore. That is when using it in combination with a Volume series. I'm using the latest stable TeeChart v3 release btw.
Now when you have a Volume series on your chart, the offset of the axes do not work anymore. That is as long as Automatic (min and max) of the axis is on. From the moment you turn Automatic off, changing MinimumOffset and MaximumOffset works again. When you have the chart editor open btw, and you put Automatic on again, this automatically clears the offset fields (shouldn't be doing this). This is very weird, since with other series you don't have this (other Cartesian series styles that we use: fastline, line, point). I don't know whether other series types are impacted.
You can easily reproduce this just by creating a chart and a volume series. Then open the chart editor and try to adapt the offsets of the Bottom Axis, and you will see that it is broken. With other series you can change this on-the-fly, and you can immediately see the result. With a Volume, it is just not moving.
We use this offset to make sure the first vertical line and last of a volume series are always visible (typically they fall off unless you set this offset). This is something I reported years ago by the way, but which was never implemented (http://www.teechart.net/support/viewtopic.php?t=4872). We decided to use this offset, since there was not really a fix in sight. However, now because of this change, there is no way anymore to fix this, and we would like to see the behavior back as it has been before for years.
I don't know what has changed exactly. I tried to look with Reflector for a clue, but couldn't find one. Can you tell me whether this is gonna be fixed, or give me a solution to bring the "old" behavior back again.
regards,
Change of behavior: axis offset
Re: Change of behavior: axis offset
Btw... while playing along a little bit more (with Reflector), I found the culprit.
Volume inherits from CustomPoint. Apparently there you override the CalcHorizMargins(ref int, ref int, ref bool). The last parameter can force to reset the Minimum- and MaximumOffset of an axis. Something must has changed here in one of the more recent TeeChart version, which puts this Force parameter to true now.
I currently fixed it by making my own Volume series, just by inheriting from it with my custom class, and overriding this method again and going back to the default:
Anyway. Just wanted to share this information.
Volume inherits from CustomPoint. Apparently there you override the CalcHorizMargins(ref int, ref int, ref bool). The last parameter can force to reset the Minimum- and MaximumOffset of an axis. Something must has changed here in one of the more recent TeeChart version, which puts this Force parameter to true now.
I currently fixed it by making my own Volume series, just by inheriting from it with my custom class, and overriding this method again and going back to the default:
Code: Select all
/// <summary>
/// Calculate the horiz margins.
/// </summary>
/// <param name="LeftMargin"></param>
/// <param name="RightMargin"></param>
/// <param name="Force"></param>
protected override void CalcHorizMargins(ref int LeftMargin, ref int RightMargin, ref bool Force)
{
this.CalcHorizMargins(ref LeftMargin, ref RightMargin);
Force = false;
}
Re: Change of behavior: axis offset
Hi dimitrig,
I'd like you to know that I've reproduced the problem in the latest v3, but also note that it works fine with the actual v2009.
I'd like you to know that I've reproduced the problem in the latest v3, but also note that it works fine with the actual v2009.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |