MaximumOffset and MinimumOffset do not work on custom axes
MaximumOffset and MinimumOffset do not work on custom axes
I have created a demo project showing this problem. It looks like a bug to me. (Of course it could be something I'm doing incorrectly too.)
I really need some quick help with this problem and I sent an email to tech support with my demo project attached. However, I received the following response: "Please be aware that this email address is no longer in use."
Is there any way I can get some quick help on this issue? (I have a pro support contract.) I have a fast approaching deadline for demonstrating TeeChart and I've been going round and round on this issue for close to a week now.
I have just created a new demo project that shows the problem even more clearly. The code is a bit long, so I don't think it makes sense to post it here.
I really need some quick help with this problem and I sent an email to tech support with my demo project attached. However, I received the following response: "Please be aware that this email address is no longer in use."
Is there any way I can get some quick help on this issue? (I have a pro support contract.) I have a fast approaching deadline for demonstrating TeeChart and I've been going round and round on this issue for close to a week now.
I have just created a new demo project that shows the problem even more clearly. The code is a bit long, so I don't think it makes sense to post it here.
Hi David,
we've received your email with the demo project. We'll review it and let you know something asap.
Josep Lluis Jorge
http://support.steema.com
we've received your email with the demo project. We'll review it and let you know something asap.
Josep Lluis Jorge
http://support.steema.com
"MaximumOffset and MinimumOffset do not work on custom
Thank you, thank you! I'm really pushing hard on this deadline and I still have not found solutions for several problems. This one regarding MaximumOffset and MinimumOffset is one of the toughest for me. I appreciate your help.
Solution from Steema -- Thanks!
Thanks for sending me a work around. I'm posting here so everyone can benefit from the solution.
Regards,
David
//The next couple of lines are the workaround to the CustomVertAxis.MaximumOffset
//defect.
double offset = lineSeries.YValues.Maximum * 0.1;
lineSeriesAxes.SetMinMax(lineSeries.YValues.Minimum - offset, lineSeries.YValues.Maximum + offset);
//the lines below do not have the intended effect:
//no extra margin at the ends of the axis is set.
// lineSeries.CustomVertAxis.MaximumOffset = 5;
// lineSeries.CustomVertAxis.MinimumOffset = 5;
Regards,
David
//The next couple of lines are the workaround to the CustomVertAxis.MaximumOffset
//defect.
double offset = lineSeries.YValues.Maximum * 0.1;
lineSeriesAxes.SetMinMax(lineSeries.YValues.Minimum - offset, lineSeries.YValues.Maximum + offset);
//the lines below do not have the intended effect:
//no extra margin at the ends of the axis is set.
// lineSeries.CustomVertAxis.MaximumOffset = 5;
// lineSeries.CustomVertAxis.MinimumOffset = 5;
I found an issue when using this workaround. My line series often begin as a line with no slope thru the origin (i.e., y = 0 for all x).
Every line series like this (after the first one) causes the right custom axis to show zeros at each tick mark and the line series doesn't display.
The workaround I had to do is as follows:
public static void MinimumMaximumOffset(Series series, Axis axis)
{
if (series.YValues.Maximum == 0 && series.YValues.Minimum == 0)
{
return;
}
double offset = series.YValues.Maximum * 0.05;
axis.SetMinMax(
series.YValues.Minimum - offset,
series.YValues.Maximum + offset);
}//MinimumMaximumOffset
Every line series like this (after the first one) causes the right custom axis to show zeros at each tick mark and the line series doesn't display.
The workaround I had to do is as follows:
public static void MinimumMaximumOffset(Series series, Axis axis)
{
if (series.YValues.Maximum == 0 && series.YValues.Minimum == 0)
{
return;
}
double offset = series.YValues.Maximum * 0.05;
axis.SetMinMax(
series.YValues.Minimum - offset,
series.YValues.Maximum + offset);
}//MinimumMaximumOffset