WebChart.ColorGrid: datetime, clickseries and zoom

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
yves bourgeois
Newbie
Newbie
Posts: 3
Joined: Wed Jul 13, 2005 4:00 am

WebChart.ColorGrid: datetime, clickseries and zoom

Post by yves bourgeois » Thu Feb 28, 2008 4:14 pm

Hi,

I've been using teecharts for 2 days now, and I have a few problems which I can't seem to solve myself

1) I am using a 2D colorgrid. Since I want that every square on this grid represents a value of a 2D array, I have put the CenteredPoints property of my colorgrid to true. This makes that the labels on the axes actually are shown in the middle, as desired. However, when I want to capture a click event on that grid (via the webchart_clickseries event), and I try to get the myColorGrid.XValues(valueindex), the values change depending on the position I click in one square. E.g. when I click in the bottom right corner, I get the indexes that I expected, but when I go over the middle (both up and down direction), I get a value which is one too high, as if the raster which divides the squares is different from the one used to determine the click event. Is there an other way to get the correct index, which I am unaware of?

2) An other problem I have encountered, is that, when I want to use a datetime on the z-axis (which is actually the vertical axis when the grid is in 2D view), the date always starts at the year 1899, in stead of the first date that I enter.

3) I read that it it not possible to combine both zoom and scroll on a webchart. But is it possible to combine click events and zoom? I have not tried this out myself, but it seems that I will always start a zoom-operation when I click (so that I start to draw a zoom-rectangle)

I am currently using Visual Studios 2005, VB.Net, and I am using version 2.0.2652.22325 of Teechart.net

Kind regards

Yves Bourgeois

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Feb 29, 2008 9:38 am

Hi Yves,

Please find below the answers to your questions:

1. Yes, this is a bug which (TF02012858) I've added to our defect list to be fixed for future releases.

2. This works fine for me using this code:

Code: Select all

			tChart1.Aspect.View3D = false;

			Steema.TeeChart.Styles.ColorGrid colorGrid1 = new Steema.TeeChart.Styles.ColorGrid(tChart1.Chart);

			colorGrid1.YValues.DateTime = true;

			Random y = new Random();

			for (int x = 0; x < 10; x++)
			{
				for (int z = 1; z < 10; z++)
				{
					colorGrid1.Add(x, y.Next(), DateTime.Parse(z + "/03/2008").ToOADate());
				}
			}
You can try porting it to VB.NET using any of those conversion engines:

Kamal Patel's conversor
Carlos Aguilar's conversor

If this doesn't help don't hesitate to let us know.

You may also be interested in reading System.DateTime's documentation.

3. This may depend on what you are trying to achieve. For example, using zooming together with HotSpots tool works fine for me here. If that's not what you are looking for please give us some more details about what your requests. You'll find more information about zoom and HotSpots tool at the ASP.NET example at TeeChart's program group.
I am currently using Visual Studios 2005, VB.Net, and I am using version 2.0.2652.22325 of Teechart.net
Please notice there's a newer release of TeeChart for .NET v2 as announced here.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

yves bourgeois
Newbie
Newbie
Posts: 3
Joined: Wed Jul 13, 2005 4:00 am

Post by yves bourgeois » Wed Mar 05, 2008 3:16 pm

Hi, Narcis

Thanks for the quick reply.

I have redirected your answer of the first question to my superiors, and they would like to know when this bug will be fixed. The reason for this, is that we would like to use the color grid in a project, and its deadline is set for the 23th of april. Is there any chance that a patch would be available before that?

Also, they were concidering upgrading our current version of teechart to the latest one.

Kind regards,

Yves Bourgeois
Siemens N.V. Belgium

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Mon Mar 10, 2008 8:32 am

Hi yves,

We will try to fix this before the 23rd of April. Please be aware at this forum for new release announcements and what's being fixed on them.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue Mar 11, 2008 10:37 am

Hi yves,

We have already fixed TF02012858 for next v2 and v3 maintenance releases. We expect them to be out in a month at the earliest so I've sent the assembly with the fix at your forums contact e-mail address.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

yves bourgeois
Newbie
Newbie
Posts: 3
Joined: Wed Jul 13, 2005 4:00 am

Post by yves bourgeois » Wed Mar 12, 2008 7:54 am

Hi, Narcis,


Thanks for the quick response.

We have upgraded to version 3 last week, and the assembly you have sent me is an evaluation version of v2. I have c\p the dll to the v3 directory, and everything does seem to work, but, on first notice, I now have black backgrounds for my line charts. Are there any bigger drawbacks of using the v2 assembly? Are there bigger differences between v2 and v3 that I should be aware of?


kind regards

yves

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Wed Mar 12, 2008 8:32 am

Hi yves,

The version I sent is not an evaluation version but it may appear like this if you don't have v2 Designtime license installed on the machine where you used it.

Anyway, I'm going to send a pre-release version of the v3 assembly for test purposes. It's most likely that a new v3 maintenance release is out before 23rd April.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

yves bourgeois
Newbie
Newbie
Posts: 29
Joined: Wed Mar 05, 2008 12:00 am

Post by yves bourgeois » Wed Mar 26, 2008 5:23 pm

Hi, Narcis

First, do you have an idea yet on when an official patch will be available to solve the first problem with the color grid?

Second, regarding to the other part of my original question. I am experiencing some problems using datetime on an axis. Consider the following code:

[code]
wcProfileViewer.Chart.Axes.Left.Labels.DateTimeFormat = "yyyy/MM/dd hh:MM:ss"
wcProfileViewer.Chart.Axes.Left.DateTimeIncrement(True, True, 0, 2, Steema.TeeChart.DateTimeSteps.OneMinute)
wcProfileViewer.Chart.Axes.Left.Automatic = True

...

'Fill a 2D colorgrid using the new array-method, for which I fill the X and Z arrays with an integer and a datetime respectively, and leave the Y-array to 0 (This is still a bit counter-intuitive for me, as for some reason, in 2D mode, I need to use the X and Z axes to fill the grid, and not the Y axis, but it does the job)

..

mColorGrid.YValues.DateTime = True
'This is really weird, as I now have to tell that the Y-axis is a datetime, even though I filled the grid using the Z-axis


mColorGrid.Chart.Axes.Left.SetMinMax(DateTime.Parse(z(0).ToString), DateTime.Parse(z(count - 1).ToString))


[/code]

The result of this is a grid which does not start at the time it should begin, it increments per hour iso per 2 minutes, and the axis seems not alined with the grid.

Could you give me a hint of where I am wrong? I've been struggling with this the entire afternoon, tried numerous possibilities, but for some reason, I can't seem to get the desired result.

I am using V3 for .Net of teechart

kind regards,

Yves Bourgeois

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Mar 27, 2008 9:11 am

Hi Yves,
First, do you have an idea yet on when an official patch will be available to solve the first problem with the color grid?
This issue has already been fixed and you can expect the fix to be included in the next maintenance release due to be out in a week approximately.
Second, regarding to the other part of my original question. I am experiencing some problems using datetime on an axis.
Could you please send us a simple example project we can run "as-is" to reproduce the problem here?

You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.

Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

yves bourgeois
Newbie
Newbie
Posts: 29
Joined: Wed Mar 05, 2008 12:00 am

Post by yves bourgeois » Thu Mar 27, 2008 12:08 pm

Hi, Narcis

thanks for the quick reply.

I have just submitted a rar file containing an exerpt of the problem. The result is that I get dates on the horizontal axis, but they increment by the hour, and the labels don't start/end at the correct time. The scale is also incorrect, I think.

I submitted the file under the name 'yves bourgeois', with a similar email address

Kind regards

Yves

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Mar 27, 2008 3:34 pm

Hi Yves,

Thank you very much for the example project. I'm sorry but I don't understand which are the exact problems you are having with it. This is the ColorGrid I obtain with your example project:

Image

Would you be so kind to point me out the exact problems you see here?

Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

yves bourgeois
Newbie
Newbie
Posts: 29
Joined: Wed Mar 05, 2008 12:00 am

Post by yves bourgeois » Thu Mar 27, 2008 3:56 pm

Hi, Narcis

I don't have any webspace, so I have submitted a picture of what it should look like, the same way that I have submitted the project. Unfortunatly the picture is called 'untitled.bmp', but that's the one.

I got this by replacing three lines of code in the sample project:

Code: Select all

dim z(14) as datetime --> dim z(14) as double
..

z(count) = date --> z(count) = zIndex

..


mColorGrid.YValues.Datetime = true --> mColorGrid.YValues.Datetime = false

This results in what was intended, and how the arrays are build up. Because of this, I suspect that the scale of the axis is not the same as the scale of the colorgrid, and that the colorgrid is actually stretched out, which in turn results in the fact that we can only see the bottom line. I have confirmed this myself by putting a click event on the chart, and checking the indexes I get from this event. These are not the same as the ones that are shown on the axis.

yves

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Mar 28, 2008 10:44 am

Hi Yves,

The left axis increment is because it is automatic and the grid is centered, you can see it more clearly like using this line:

Code: Select all

        mColorGrid.Chart.Axes.Left.Increment = 1
For seeing the Z values as you expect you should set ColorGrid like this:

Code: Select all

        'To set the labels of the axes in the middle of each row/file
        'mColorGrid.CenteredPoints = True
        mColorGrid.IrregularGrid = True
        mColorGrid.Marks.Visible = True
CenteredPoints seems problematic here. You also need to set IrregularGrid to true because of what I described on this thread. Please notice that the integer part of DateTime value represents the number of days since the starting DateTime value, the decimal part stands for the hours, minutes, seconds, ... in the day. This means Z values increment is different than one and therefore IrregularGrid needs to be set to one.

For DateTime definition please look here:

http://msdn2.microsoft.com/en-us/librar ... S.80).aspx
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

yves bourgeois
Newbie
Newbie
Posts: 29
Joined: Wed Mar 05, 2008 12:00 am

Post by yves bourgeois » Fri Mar 28, 2008 12:22 pm

Hi Narcis

thanks for the reply.

I now have the exact same problem as described in this post:
http://www.teechart.net/support/viewto ... f8204d751a

When I switch irregularGrid on, my colorgrid doesn't show any data anymore, except some blueish gradient color. After I finish this post, I will create a screenshot, and submit it to you, as I did before.

Is this an accidentely reinserted bug, maybe? I'm currently using Teechart Pro Version 3.2.2980.19082


And what did you mean when you said that there is a problem with the centeredPoints? Is it not getting along with the irregularGrid, and will this be something that can be fixed?

cheers

yves


edit: the upload page seems to be down..
edit2: there it is again.. picture is called 'blueishgradient.jpg'

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Mon Mar 31, 2008 2:29 pm

Hi Yves,
I now have the exact same problem as described in this post:
http://www.teechart.net/support/viewto ... f8204d751a
I don't think it's exactly the same issue.
When I switch irregularGrid on, my colorgrid doesn't show any data anymore, except some blueish gradient color. After I finish this post, I will create a screenshot, and submit it to you, as I did before.
Yes, I've been able to reproduce this. I think it is a bug and added it (TF02012931) to our defect list to be fixed for next releases.
And what did you mean when you said that there is a problem with the centeredPoints? Is it not getting along with the irregularGrid, and will this be something that can be fixed?
Yes, I've also added this in the bug definition. You'll see setting CenteredPoints=true doesn't even display the grid.

BTW: In your code your should set ZValues.DateTime=True not YValues.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply