Profile Picture

Axes Issues

Posted By Pedram . 11 Years Ago
Author
Message
Pedram .
Posted 11 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)

Group: Forum Members
Last Active: 11 Years Ago
Posts: 7, Visits: 1
I have a few questions with regards to Axes.

1) When is NAxis.IsUsed updated? For example, if I do Chart.Series.Clear() to clear all Series from the chart, I expect all the axes on the chart to immediately update and IsUsed == false. However it takes "time" for that to be updated, and if I have immediate code checking IsUsed==true. If I run this code "later", ie after a button press, they will be updated and IsUsed will correctly be false;.

ie

(assuming there is an axis with axis.axisid=5)
......
Chart.Series.Clear
List NotUsedAxes = new List();
foreach(NAxis axis in Chart.Axes)
{
if(!axis.IsUsed && axis.AxisId>4)
NotUsedAxes.Add(axis);
}

foreach(NAxis axis in NotUsedAxes)
Chart.Axes.Remove(axis);
.........

the expected result is that axis.axisId==5 should have axis.IsUsed = false; but is true and doesn't get removed.

2)

If I run the above code at a "later" time, and open the Chart Editor from the ChartCommandBar I get an exception, relating to Nevron.Chart.NSeriesBase.IsDisplayedOnAxis(Int32 axisId). I think there may be some coherence issue and I've included the stacktrace in the attached file.

In summary, what's the best way to remove an axis from the chart that may have a Series on it?

Attachments
stacktrace.txt (102 views, 5.00 KB)

Threaded View



Similar Topics


Reading This Topic