Page 1 of 2

Index outside the bounds of the array.

Posted: Wed Apr 11, 2012 11:54 am
by 15660562
Hi,

if I create a realy simple graph, zoom in and subsequently mouse-click in the graph in order to start a zoom-out, I get an exception in InsertChartValue. This is 100 % reproducable. We've been using older versions of TeeChart with only a few well-known problems, but today I upgraded to 2012. I hope someone out there has a suggestion or two.

Regards,
Petter / stigbert

Re: Index outside the bounds of the array.

Posted: Wed Apr 11, 2012 1:41 pm
by 10050769
Hello stigbert,

Can you please, send us a simple code, because we can reproduce your problem here and try to find a good solution for you?

Thanks,

Re: Index outside the bounds of the array.

Posted: Wed Apr 11, 2012 1:49 pm
by 15660562
Sorry Sandra, I know how important good information is in problem solving after working for UNISYS some 20 years ago, but this application is not on internet and will never be. I don't even have a development environment on the internet connection.

I was hoping that someone had had some similar experience. I find it a bit strange that a mouse-click (left or right) in the graph should trigger of an attempt to InsertChartValue and that someone would react on that.

Is there something I could do on the target to collect more information?

Thanks,
Petter / stigbert

Re: Index outside the bounds of the array.

Posted: Wed Apr 11, 2012 2:42 pm
by 15660562
I did some preliminary work on our upgrade to new TeeChart last november using the october 2011 release. I just tried that again and the problem disappeared.

It is extra surprising that right click of the mouse triggers that problem to on 2012. Right mouse click should really open a context menu.

Regards
Petter / stigbert

Re: Index outside the bounds of the array.

Posted: Wed Apr 11, 2012 3:10 pm
by 10050769
Hello stigbert,

I am glad that in last version of TeeChart.Net :)

Thanks,

Re: Index outside the bounds of the array.

Posted: Thu Apr 12, 2012 6:05 am
by 15660562
Maybe I was a bit unclear in my previous post. The october 2011 release works but the 2012 doesn't.

Re: Index outside the bounds of the array.

Posted: Thu Apr 12, 2012 8:37 am
by 10050769
Hello stigbert,
Maybe I was a bit unclear in my previous post. The october 2011 release works but the 2012 doesn't.
Sorry, I understand that in last version of TeeChart 2012 the problem disappears.
I know how important good information is in problem solving after working for UNISYS some 20 years ago, but this application is not on internet and will never be. I don't even have a development environment on the internet connection.
I understand you, but we need only thant you make a simple project where the problem appears, because we can reproduce it here,so, we can not reproduce it. To send us a project, you only have attache the project in the thread without TeeChart.dll.

Thanks,

Re: Index outside the bounds of the array.

Posted: Thu Apr 12, 2012 8:53 am
by 15660562
The problem is that the nature of our application means that we cannot be on internet. We don't even have any development capabillites at all on internet connected computers.

I suspect that it will not be long until someone with internet connection hit's the same problem. In my case a very simple TChart diagram with just a few data series that can be zoomed-in but not zoom-out because of some kind of malfunction in handling of mouse events.

Regards,
Petter / stigbert

Re: Index outside the bounds of the array.

Posted: Thu Apr 12, 2012 12:11 pm
by 10050769
Hello Petter,

Good, in this case I recommend see the next code that I have made,where I have used Zoom, Unzoom and MouseClick and works fine for me. Please,could you modify my code, because we can reproduce exactly your problem?

Code: Select all

public Form1()
        {
            InitializeComponent();
            InitializeChart();
        }
        Steema.TeeChart.Styles.Line line1;
        bool zoomed;
        int ZoomCount = 1;
        private void InitializeChart()
        {
            tChart1.Aspect.View3D = false;
            line1 = new Line(tChart1.Chart);
            line1.Color = Color.Blue;
            line1.FillSampleValues(100);
            tChart1.MouseClick += new MouseEventHandler(tChart1_MouseClick);
            tChart1.UndoneZoom += new EventHandler(tChart1_UndoneZoom);
            tChart1.Zoomed += new EventHandler(tChart1_Zoomed);   
        }

        void tChart1_UndoneZoom(object sender, EventArgs e)
        {
            line1.Color = Color.Blue;
            ZoomCount = 1;
        }
        void tChart1_MouseClick(object sender, MouseEventArgs e)
        {
            if (zoomed)
            {
                if (ZoomCount == 3)
                {
                    line1.Color = Color.Green;
                }
                else if (ZoomCount == 6)
                {
                    line1.Color = Color.Red;
                }
                else if (ZoomCount == 9)
                {
                    line1.Color = Color.Black;
                }
            }
            this.Text = ZoomCount.ToString();
        }

        void tChart1_Zoomed(object sender, EventArgs e)
        {
            zoomed = true;
            ZoomCount++;
        }
Thanks,

Re: Index outside the bounds of the array.

Posted: Fri Apr 13, 2012 5:58 am
by 15660562
Hi Sandra!

It seems to be parts missing, the code you supplied doesn't compile.

Regards,
Petter / stigbert

Re: Index outside the bounds of the array.

Posted: Fri Apr 13, 2012 8:39 am
by 10050769
Hello stigbert,

I have attached my project without TeeChart.dll and to run it you only need add your TeeChart.dll. Can you tell us if it works as you expect?
SendProject.zip
(17 KiB) Downloaded 440 times
Thanks,

Re: Index outside the bounds of the array.

Posted: Thu Apr 19, 2012 12:24 pm
by 15660562
Hi Sandra!
I am sorry, I haven't been able to reproduce the problem using and modifying your project. I don't know where we're going with this at the moment. I have been trying out the october release some more, but I have some problems with that too.
Regards,
Petter / stigbert

Re: Index outside the bounds of the array.

Posted: Thu Apr 19, 2012 2:13 pm
by 10050769
Hello stigbert,
I am sorry, I haven't been able to reproduce the problem using and modifying your project. I don't know where we're going with this at the moment. I have been trying out the october release some more, but I have some problems with that too.
We haven't reproduced your problem here using last version of TeeChart.Net, for this reason, I have made a simple example where I combined Zoom and MouseClick and your problem doesn't appear. We need reproduce your problem here because we try to find a solution, but if we cannot reproduce it, will be very difficult achieve a good solution, but I try to help you it. Ok, can you tell us which IDE are you using(Winforms, Asp.Net, Wpf, Silverlight)?

Thanks,

Re: Index outside the bounds of the array.

Posted: Fri Apr 20, 2012 6:18 am
by 15660562
Hi again Sandra!,
We use WinForms, VS 2010, .NET Framework 4.0.

One problem we have with our current very old TeeChart is that when resizing tthe window when showing a bar chart, sometimes one or more bars become invisible. This problem seemed to have been resolved on the october 2011 release, but I found out yesterday that it is only more rare and when it occurs all bars becomes invisible. This is however slightly better than before, and we're about to choose the october 2011 release anyway.

Another problem we have is when showing a chart with HH:MM:SS X-values and double-clicking in the graph, the label of the vertical line is the most significant part of the strange date and time used. We would rather have HH:MM:SS, but have not been able to figure it out.

Regards,
Petter /stigbert

Re: Index outside the bounds of the array.

Posted: Fri Apr 20, 2012 3:40 pm
by 10050769
Hello Petter,
One problem we have with our current very old TeeChart is that when resizing tthe window when showing a bar chart, sometimes one or more bars become invisible. This problem seemed to have been resolved on the october 2011 release, but I found out yesterday that it is only more rare and when it occurs all bars becomes invisible. This is however slightly better than before, and we're about to choose the october 2011 release anyway
Using next code I can not reproduce your problem with last version 2012:

Code: Select all

 public Form1()
        {
            InitializeComponent();
            InitializeChart();
        }
        private void InitializeChart()
        {
            tChart1.Dock = DockStyle.Fill;
             Steema.TeeChart.Styles.Bar bar1 = new Bar(tChart1.Chart);
            bar1.FillSampleValues(5);
        }
Can you please, check if using previous code your problem occurs?
Another problem we have is when showing a chart with HH:MM:SS X-values and double-clicking in the graph, the label of the vertical line is the most significant part of the strange date and time used. We would rather have HH:MM:SS, but have not been able to figure it out.
I recommend you take a look in the Tutorial 4: Axis Label, concretely in Increment part where you find as you do to use the DateTime values.

On the other hand, about the problem of zoom, Could you try to send a simple project so we can try to solve the problem here? If you don't have connection in your developer machine you can copy the project you have done in a pen drive and in the computer you have internet, attach it in this thread. I am very grateful if you can do it :).

Thanks,