Dear Support
I'm using a colored countour and a coloured grid series to represent some animated data in 2D. I use a color range legend to indicate the values of the colors. Unfortunately I cannot fix the minimum and the maxixmum value of the color range. So displaying a distribution the min and max values of the color legend automatically adjust themselvs to the current slide, i.e. the min and the max values change, as I display different slides. This in ot ok, since in this way I cannot compare to slides to show the user what's going on. My question: is there a way to fix the min and max values of the color range legend? I can change set the steps between min and max, but cannot set min and max itself.
Tx in advance, best regards
Andras
fixing color range min and max
Hi Andras,
you should be able to set a specific color for the Min and Max values using :
TChart1.Series(0).asContour.StartColor = vbRed
TChart1.Series(0).asContour.EndColor = vbYellow
you should be able to set a specific color for the Min and Max values using :
TChart1.Series(0).asContour.StartColor = vbRed
TChart1.Series(0).asContour.EndColor = vbYellow
Pep Jorge
http://support.steema.com
http://support.steema.com
Hi Andras,
in that case you can use the AddPallete :
From the TeeChart Pro Help file under the Index 'AddPalette':
*****************************************************
ICustom3DPaletteSeries.AddPalette
ICustom3DPaletteSeries
Function AddPalette(Value: Double; Color: OLE_COLOR): Integer;
Type Library
TeeChartX
Description
This method adds a new color Palette entry to the end of Palette list. Add
returns the position of the entry in the Palette list. The Color parameter
will be used to fill polygons with Y values up to the Value parameter.
Custom color palettes can be created using this method. The UsePalette
property should be True to use the palette entries.
Example [Visual Basic]:
This code creates a customized color palette. Polygons with Y values lower
than or equal to 3000 will be filled in Green color, Polygons with Y values
lower than or equal to 2000 will be filled in Yellow color and Polygons with
Y values lower than or equal to 1000 will be filled in Red color.
With TChart1
.Series(0).asSurface.ClearPalette
.Series(0).asSurface.AddPalette 1000, vbRed
.Series(0).asSurface.AddPalette 2000, vbYellow
.Series(0).asSurface.AddPalette 3000, vbGreen
.Repaint
End With
**********************************************************
in that case you can use the AddPallete :
From the TeeChart Pro Help file under the Index 'AddPalette':
*****************************************************
ICustom3DPaletteSeries.AddPalette
ICustom3DPaletteSeries
Function AddPalette(Value: Double; Color: OLE_COLOR): Integer;
Type Library
TeeChartX
Description
This method adds a new color Palette entry to the end of Palette list. Add
returns the position of the entry in the Palette list. The Color parameter
will be used to fill polygons with Y values up to the Value parameter.
Custom color palettes can be created using this method. The UsePalette
property should be True to use the palette entries.
Example [Visual Basic]:
This code creates a customized color palette. Polygons with Y values lower
than or equal to 3000 will be filled in Green color, Polygons with Y values
lower than or equal to 2000 will be filled in Yellow color and Polygons with
Y values lower than or equal to 1000 will be filled in Red color.
With TChart1
.Series(0).asSurface.ClearPalette
.Series(0).asSurface.AddPalette 1000, vbRed
.Series(0).asSurface.AddPalette 2000, vbYellow
.Series(0).asSurface.AddPalette 3000, vbGreen
.Repaint
End With
**********************************************************
Pep Jorge
http://support.steema.com
http://support.steema.com
Hi Andras,
yes, using similar code to the following should work fine :
yes, using similar code to the following should work fine :
Code: Select all
Private Sub Command1_Click()
With TChart1
.Series(0).asContour.UseColorRange = False
.Series(0).asContour.UsePalette = True
.Series(0).asContour.ClearPalette
.Series(0).asContour.AddPalette 0, vbRed
.Series(0).asContour.AddPalette 100, vbYellow
.Series(0).asContour.AddPalette 200, vbGreen
.Repaint
End With
End Sub
Pep Jorge
http://support.steema.com
http://support.steema.com