I have a problem with teechart wpf version 3.5.3700.30575.
In my chart there are 13 series of type "Bar". I want the X-axis has a fixed value range from 0 to 14. The first load of the chart works perfectly, but when I refill the chart and set the axis minimum and maximum limits the wrong limits are displayed. The call of DoInvalidate() also takes no effect.
Here a code snippet, Automatic, AutomaticMinimum and AutomaticMaximum of X axis is set to False.
Code: Select all
private static void CheckMinMax(Chart aChart, bool isAuto)
{
try
{
aChart.tchart.Axes.Bottom.Automatic = isAuto;
if (!isAuto)
{
//if (aChart.XMin != double.MinValue)
//{
// aChart.tchart.Axes.Bottom.Minimum = aChart.XMin;
//}
//if (aChart.XMax != double.MaxValue)
//{
// aChart.tchart.Axes.Bottom.Maximum = aChart.XMax;
//}
if (aChart.XMin != double.MinValue && aChart.XMax != double.MaxValue)
{
aChart.tchart.Axes.Bottom.SetMinMax(aChart.XMin, aChart.XMax);
}
}
aChart.tchart.DoInvalidate();
}
catch (Exception _e)
{
Trace.WriteLine(_e.Message + " " + _e.StackTrace);
}
}
Thanks