Page 1 of 1

Line series visibility changes on re-sizing chart

Posted: Thu Nov 13, 2014 2:37 pm
by 16068452
2LastSeriesInvisible.png
Last series invisible on resizing chart
2LastSeriesInvisible.png (30.81 KiB) Viewed 6306 times
1AllSeriesVisible.png
default view without any problem
1AllSeriesVisible.png (22.51 KiB) Viewed 6295 times
SeriesVisibilityIssue.zip
Sample project exhibiting the issue
(11.52 KiB) Downloaded 643 times
Hi,

Here is one problem that we are facing with line series visibility while re-sizing chart horizontally.
We are using TeeChart for .NET version 4.1.2014.5092.

The chart which exhibits this behavior has multiple line series, each of which has been plotted using 2 points.
The y values for each of points in these line series range between 0 and 1.
The chart is rendered perfectly but when the window containing it is re-sized horizontally, one random series is set invisible.
Decrease/increase width by around 5-10% of original width, repeat this action for 2-3 times; one random series will get hidden.

Please find attached compressed folder containing sample project.
Extract the contents, open & run the solution; and follow above mentioned steps to get the problem reproduced.
Images are also attached for illustrating this issue.
Let me know if anything is not clearly stated.

Please suggest if there exists any solution to fix this issue.
Any help will be really appreciable.

Thanks,
Chandran

Re: Line series visibility changes on re-sizing chart

Posted: Thu Nov 13, 2014 4:17 pm
by Christopher
chandran wrote:Please suggest if there exists any solution to fix this issue.
Any help will be really appreciable.
Interesting problem, from a programmer's point of view, but apologies for this issue from a business-client point of view. I have found and resolved the issue, but unfortunately it requires a source-code change, and as such won't be available until the end of this month or the beginning of next month when the next maintenance release comes out.

For your interest, the issue is one of double precision and equivalence. Within the source code, a change has been made from:

Code: Select all

          if (firstVisible >= 0)
          {
            tmpMax = CalcMinMaxValue(r.Right, r.Bottom, r.Left, r.Top);

            if (notMandatory.Last <= tmpMax)
            {
              lastVisible = tmpLastIndex;
            }
to

Code: Select all

          if (firstVisible >= 0)
          {
            tmpMax = CalcMinMaxValue(r.Right, r.Bottom, r.Left, r.Top);

            if (!Utils.MinimalDifference(notMandatory.Last, tmpMax, 1) || notMandatory.Last <= tmpMax)
            {
              lastVisible = tmpLastIndex;
            }
where the MinimalDifference is a slight variation on this Microsoft-recommended method called HasMinimalDifference.

Re: Line series visibility changes on re-sizing chart

Posted: Thu Jan 08, 2015 6:00 am
by 16068452
Thanks Christopher.