Page 1 of 1

Different behavior between v5 and v7 in Maps Series

Posted: Wed Sep 14, 2005 1:36 pm
by 6927799
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?

Posted: Fri Sep 16, 2005 3:18 pm
by Pep
Hi Hermes,

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

Posted: Fri Sep 16, 2005 4:04 pm
by 6927799
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.

Posted: Mon Sep 19, 2005 11:42 am
by narcis
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.

Posted: Mon Sep 19, 2005 1:36 pm
by 6927799
I've just did it.

Posted: Wed Sep 21, 2005 11:42 am
by narcis
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.

Posted: Wed Sep 21, 2005 1:27 pm
by 6927799
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.

Posted: Mon Sep 26, 2005 7:19 am
by Pep
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).

Posted: Mon Sep 26, 2005 3:19 pm
by 6927799
It will be appreciated, thank you.

Posted: Wed Nov 23, 2005 6:29 pm
by 6927799
Is there any news abuot this?

thank you

Posted: Fri Nov 25, 2005 12:39 pm
by narcis
Hi Hermes,

We expect it to be ready before the end of the next week.

Posted: Tue Dec 13, 2005 3:43 pm
by 6927799
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.

Posted: Thu Dec 15, 2005 12:51 pm
by 6927799
Please, could you give me some info before the weekend?
It would be good to give an explanation to my customers...

thank you

Posted: Thu Dec 15, 2005 4:54 pm
by narcis
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]).

Posted: Fri Dec 16, 2005 2:39 pm
by 6927799
It works,
excellent!!!

Thank you