Different behavior between v5 and v7 in Maps Series

TeeChart for ActiveX, COM and ASP
Post Reply
Hermes
Newbie
Newbie
Posts: 54
Joined: Tue Feb 04, 2003 5:00 am
Location: Montevideo, Uruguay

Different behavior between v5 and v7 in Maps Series

Post by Hermes » Wed Sep 14, 2005 1:36 pm

Hi, I've recently upgraded from version 5 to 7 and a change in a behavior cause a problem. In version 5 when I have a map serie, I load the map and set data for the first time it sets the max and min values to color the map, when I load a new set of data the max and min Z values was reset to fit the new values so the colours are correct for the new view. But in version 7 the min and max values are not reset when a new set of data is entered so the colours does not looks correctly. I do not find any way to force the calculation of the new limits, Is there any way to do this? Is there other way to simulate the behavior of version 5 (for my app, the correct one) in version 7?

Pep
Site Admin
Site Admin
Posts: 3278
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Fri Sep 16, 2005 3:18 pm

Hi Hermes,

could you please show me a code to reproduce the problem ?
Have you tried to use the ClearPalette method ?

Hermes
Newbie
Newbie
Posts: 54
Joined: Tue Feb 04, 2003 5:00 am
Location: Montevideo, Uruguay

Post by Hermes » Fri Sep 16, 2005 4:04 pm

the chart has the UseColorRange = true and the shp file is loaded only the first time.

Code: Select all

1060    Set lrdoQ = gConexionRDO.MiDataBase.CreateQuery("NroPoligonoEnEsquema", lstrSQL)
1070    lrdoQ.rdoParameters(0).Type = rdTypeVARCHAR
1080    For lIndex = 1 To spreadDatos.MaxRows - FRM_CANT_FILAS_TOTALES
1090        spreadDatos.Row = lIndex
1100        spreadDatos.Col = mColumnaCodigo
1110        lstrCodigoItem = spreadDatos.Text
1120        lrdoQ.rdoParameters(0).value = lstrCodigoItem
1130        Set lrdoRS = lrdoQ.OpenResultset
1140        If Not lrdoRS.EOF Then
1150            lNroPol = NVL(lrdoRS("nro_poligono").value, 0)
1160            If lNroPol >= 0 Then
1170                If spreadDatos.GetFloat(vColIndic, lIndex, lValor) Then
1180                    spreadDatos.Col = 0
1190                    spreadDatos.Row = lIndex
1200                    tchGrafico.Series(0).asMap.Shapes.Polygon(lNroPol).Z = lValor
1210                    tchGrafico.Series(0).asMap.Shapes.Polygon(lNroPol).Text = spreadDatos.Text
1220                End If
1230            End If
1240        End If
1250        lrdoRS.Close
1260    Next
What the code does is to take the selected part of the spread and put the values in the corresponding polygon (cell <-> polygon). The selection is made by the user dynamically.
The problem is when this code is called for second (thirdth,....) time, the new data set to the polygons may vary a lot from one call to another (first call range Min=632000; Max=1.100.000, second call range Min=2, Max =15)
In version 5 the color range change with the new values but in version 7 not, so when the second call is made the map lets all white.

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 Sep 19, 2005 11:42 am

Hi Hermes,

I'm afraid your code snippet doesn't help us much identifying your problem. Could you please send us an example application we can run "as-is" to reproduce the problem here?

You can post your files at [url]news://www.steema.net/steema.public.attachments[/url] newsgroup.
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

Hermes
Newbie
Newbie
Posts: 54
Joined: Tue Feb 04, 2003 5:00 am
Location: Montevideo, Uruguay

Post by Hermes » Mon Sep 19, 2005 1:36 pm

I've just did it.

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 Sep 21, 2005 11:42 am

Hi Hermes,

Thanks for your example.

We have been able to reproduce this problem. It's obvious that for some reason we actually don't know this behaviour changed. I've added this bug to our defect list to be fixed for future releases. In the meantime, a workaround is adding the series every time the values are changed.
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

Hermes
Newbie
Newbie
Posts: 54
Joined: Tue Feb 04, 2003 5:00 am
Location: Montevideo, Uruguay

Post by Hermes » Wed Sep 21, 2005 1:27 pm

It is not possible because the application needs to be rapid, you know that to load a map may be a time consuming task. Please I need a solution in the shortest time possible.

Pep
Site Admin
Site Admin
Posts: 3278
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Mon Sep 26, 2005 7:19 am

Hi Hermes,

ok, we're going to try to find a solution for the next maintenance release which will be out soon (in a month moreorless).

Hermes
Newbie
Newbie
Posts: 54
Joined: Tue Feb 04, 2003 5:00 am
Location: Montevideo, Uruguay

Post by Hermes » Mon Sep 26, 2005 3:19 pm

It will be appreciated, thank you.

Hermes
Newbie
Newbie
Posts: 54
Joined: Tue Feb 04, 2003 5:00 am
Location: Montevideo, Uruguay

Post by Hermes » Wed Nov 23, 2005 6:29 pm

Is there any news abuot this?

thank you

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 Nov 25, 2005 12:39 pm

Hi Hermes,

We expect it to be ready before the end of the next week.
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

Hermes
Newbie
Newbie
Posts: 54
Joined: Tue Feb 04, 2003 5:00 am
Location: Montevideo, Uruguay

Post by Hermes » Tue Dec 13, 2005 3:43 pm

This bug was not solved in the new release, for me is very important and i've understood it will be solved in this release, please give some information.

Hermes
Newbie
Newbie
Posts: 54
Joined: Tue Feb 04, 2003 5:00 am
Location: Montevideo, Uruguay

Post by Hermes » Thu Dec 15, 2005 12:51 pm

Please, could you give me some info before the weekend?
It would be good to give an explanation to my customers...

thank you

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 Dec 15, 2005 4:54 pm

Hi Hermes,

We've found the error and fixed it for v7.0.0.7. In the meantime, while this version is not released, you should add TChart1.Series(0).asMap.ZValues.Modified = True to the project you sent as shown here:

Code: Select all

Public Sub CargarDatos(valores() As Double)
    Dim lIndex As Integer
    On Error GoTo err_CargarDatos
    For lIndex = 0 To 2
        TChart1.Series(0).asMap.Shapes.Polygon(lIndex).Z = valores(lIndex)
    Next lIndex
    
    TChart1.Series(0).asMap.ZValues.Modified = True
    
    Exit Sub
err_CargarDatos:
    MsgBox Err.Number & " -> " & Err.Description
End Sub
BTW: I'm going to attach the modified project to the our attachments newsgroup ([url]news://www.steema.net/steema.public.attachments[/url]).
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

Hermes
Newbie
Newbie
Posts: 54
Joined: Tue Feb 04, 2003 5:00 am
Location: Montevideo, Uruguay

Post by Hermes » Fri Dec 16, 2005 2:39 pm

It works,
excellent!!!

Thank you

Post Reply