Page 1 of 1

Animated Zoom Does Not Work

Posted: Tue Jun 07, 2005 9:59 pm
by 8129718
I am using TeeChart .NET version 1.1.1879.21176 and animated zoom does not work. I also had an issue with points in a bubble series showing up with random color, but I found a fix in another posting on this forum (but the odd behavior still seems like a bug to me -- I would expect it to work or not work, whereas partial random colors is weird behavior).

Here is the code:

Code: Select all

    private void Form1_Load(object sender, System.EventArgs e)
    {
      // "Animated Zoom" BUG: *Animated* zoom does not work (zoom works, but it is not animated).
      tChart1.Zoom.Allow = true;
      tChart1.Zoom.Animated = true;
      tChart1.Zoom.AnimatedSteps = 20;

      // "Easter Egg" BUG: All bubble points should be "BurlyWood" color, but some points aren't.
      const int seriesCount = 1;
      const int pointsPerSeries = 12;
      const int rowsPerSeries = 2;
      const int pointsPerRow = pointsPerSeries/rowsPerSeries;
      for (int iSeries = 0; iSeries < seriesCount; iSeries++)
      {
        Bubble series = new Bubble();
        series.Squared = false;
        // This will fix the bug: series.XValues.Order = ValueListOrder.None;
        for (int iPoint = 0; iPoint < pointsPerSeries; iPoint++)
        {
          series.Add(iPoint % pointsPerRow, iSeries * rowsPerSeries + iPoint / pointsPerRow, 0.45f, Color.BurlyWood);
        }
        tChart1.Series.Add(series);
      }
      UpdateMargin();
    }

    protected virtual void UpdateMargin()
    {
      double min = 0, max = 0;
      tChart1.Axes.Bottom.CalcMinMax(ref min, ref max);
      min--;
      max++;
      tChart1.Axes.Bottom.SetMinMax(min, max);

      tChart1.Axes.Left.CalcMinMax(ref min, ref max);
      min -= 0.5;
      max += 0.5;
      tChart1.Axes.Left.SetMinMax(min, max);
    }

Posted: Wed Jun 08, 2005 11:24 am
by narcis
Hi Walt,
I am using TeeChart .NET version 1.1.1879.21176 and animated zoom does not work.
It already works with the next maintenance release which is expected to be released this week.

Regarding the bubble series colors you should use:

Code: Select all

series.Color = Color.BurlyWood;
series.ColorEach = false;
// This will fix the bug: series.XValues.Order = ValueListOrder.None; 

Posted: Wed Jun 08, 2005 5:10 pm
by 8129718
narcis wrote: It already works with the next maintenance release which is expected to be released this week.
That's good news. :D Thanks!
narcis wrote: Regarding the bubble series colors you should use:

Code: Select all

series.Color = Color.BurlyWood;
series.ColorEach = false;
// This will fix the bug: series.XValues.Order = ValueListOrder.None; 
Well, in my actual application, I do need various colors, but for the code in my post, I hard-coded the color to Color.BurlyWood to make the weird behavior obvious (random colors are displayed for 3 of the bubbles). It is not obvious that I should set series.XValues.Order to ValueListOrder.None, although that does fix the problem.

Note, though, when I was using ActiveX version 5, I did not have that issue. I am hopeful that the .NET version of the control will surpass the ActiveX version in functionality and robustness.

Posted: Fri Jun 10, 2005 10:49 am
by narcis
Hi Walt,
It is not obvious that I should set series.XValues.Order to ValueListOrder.None, although that does fix the problem.
TeeChart cannot be expected to calculate if x or y values are being added in order or not, this has to be specified by the client.
Note, though, when I was using ActiveX version 5, I did not have that issue. I am hopeful that the .NET version of the control will surpass the ActiveX version in functionality and robustness.
In ActiveX/VCL the code is different with respect to colours. Basically because of the addition of clTeeColor in these versions, an enum which doesn't exist in .NET because in .NET there is a color structure, not a color enum.

Also notice TeeChart for .NET has about 2 years of developing behind it while ActiveX and VCL versions have many more. Anyway TeeChart for .NET has already taken advantage of its predecessors evolution.

Posted: Sat Jun 11, 2005 12:17 am
by 8129718
narcis wrote:TeeChart cannot be expected to calculate if x or y values are being added in order or not, this has to be specified by the client.
Fair enough, but I still think it is weird for some of the colors to show as I was expecting and a few to be random. I am happy to have a fix, but I'm just suggesting that it would be better to have some well-defined behavior (error or no display) when x/y bubbles are added in non-linear order and XValues.Order has not been set to ValueListOrder.None.
narcis wrote: Also notice TeeChart for .NET has about 2 years of developing behind it while ActiveX and VCL versions have many more. Anyway TeeChart for .NET has already taken advantage of its predecessors evolution.
Well, please keep squashing the bugs in version 1.1 of the control. I found a few more bugs:

A. Series List Flickers

Steps to reproduce:
1. Add multiple bubble series to chart.
2. Bring up chart editor.
3. Select last series.
4. Resize the chart editor dialog.

The series list will start flickering until you change the tab or close the dialog.

B. Series List Scrolls to Top

Steps to reproduce:
1. Add many bubble series to chart -- enough that you need to scroll to see the last few series.
2. Bring up chart editor.
3. Delete (or rename or change color of or change type of) the last series.

The series list will scroll back to the top. This makes it very difficult to tweak or delete the last few series because after every change, the list scrolls back to the top. If a series is deleted, the previous series should be selected. Otherwise, the selection should not change and the window should not scroll.

C. Bubbles Disappear When Zoomed In

I'm not certain how to reproduce this one with a simple example, but it happens often to me. I have a chart that has lots of bubbles plotted at various x/y coordinates, and when I zoom in, some bubbles disappear. Let me know if you've heard of any bug like this. If not, then I'll try to reproduce it for you.

Posted: Mon Jun 13, 2005 10:49 am
by narcis
Hi Walt,

A. This is related to .NET ListBox and CheckedListBox, just add one of those components to a form, dock the control to some form part and resize it, the flicker will also be present.

B. This doesn't happen with last release available at our customer download area.

C. You are right. I've been able to reproduce it and have included it to our bug list to be fixed for future releases.

Posted: Thu Jun 16, 2005 11:00 pm
by 8129718
narcis wrote:A. This is related to .NET ListBox and CheckedListBox, just add one of those components to a form, dock the control to some form part and resize it, the flicker will also be present.
Isn't there any workaround? Switching tabs stops the flicker, so maybe toggling the visibility of the list box would also work?
narcis wrote:B. This doesn't happen with last release available at our customer download area.
Are you referring to a version newer than this one?
Latest Binary version: 25th Feb. 2005 04:00 PM, Build 1.1.1879.21176

That is the version in which I encountered all the mentioned bugs. If there is a newer version, I don't see it on my "client access" page.
narcis wrote:C. You are right. I've been able to reproduce it and have included it to our bug list to be fixed for future releases.
ok, thanks.

Posted: Mon Jun 20, 2005 11:27 am
by narcis
Hi Walt,
Isn't there any workaround? Switching tabs stops the flicker, so maybe toggling the visibility of the list box would also work?
Not that we know of. You could ask Microsoft if they have any.
Are you referring to a version newer than this one?
Latest Binary version: 25th Feb. 2005 04:00 PM, Build 1.1.1879.21176

That is the version in which I encountered all the mentioned bugs. If there is a newer version, I don't see it on my "client access" page.
Yes, that's the version, it worked fine for me here. However next maintenence release will be released in the upcoming days.

Posted: Tue Jul 18, 2006 1:12 am
by 9638056
narcis wrote: C. You are right. I've been able to reproduce it and have included it to our bug list to be fixed for future releases.
Hi. It's been over a year, and this bug has not been fixed. It seems to occur for bubble points plotted with a negative Y value. Please look into this issue again as this has recently become much more important for me (since I now have charts that will more often require zooming).

If you need code to duplicate the issue, please let me know. (I can't use the newsgroup, but I know your (Narcis') email address.)

Posted: Tue Jul 18, 2006 1:26 am
by 9638056
Also note, I am using the following lines, but I still encounter the bug with bubble points disappearing when zooming in:

bubbleSeries.XValues.Order = ValueListOrder.None;
bubbleSeries.YValues.Order = ValueListOrder.None;

Posted: Tue Jul 18, 2006 8:50 am
by narcis
Hi Walt,

I can no longer reproduce this issue here using latest Debug Build available at the client area and this code:

Code: Select all

    private void Form1_Load(object sender, EventArgs e)
    {      

      bubble1.ColorEach = true;

      for (int i = 0; i < 100; i++)
      {
        bubble1.Add(i, (i % 10) - 5, 0.25);
      }

    }
Can you reproduce the issue here using the debug build and that code? Please feel free to modify the code or send me an example so that we can reproduce the issue here.

Thanks in advance.