SymbologyClassedColorBins Collection
The SymbologyClassedColorBins collection contains the individual classed color bins in the symbology.
The following table provides the properties of the SymbologyClassedColorBins collection:
Property |
Description |
Returns the application object. Its a read-only property. |
|
Returns the number of bins in the collection. It is a read-only property. |
|
Returns the specified SymbologyClassedColorBin object. |
|
Returns the parent object. It is a read-only property. |
Remark
SymbologyClassedColorBins sets the classed colors of symbols.
Example 1
This example shows how to create classed colors.
Sub Main
Dim SurferApp As Object
Set SurferApp = GetObject(, "Surfer.Application")
SurferApp.Visible = True
Dim Doc As Object
Set Doc = SurferApp.Documents.Add
Set Map1 = Doc.Shapes.AddVectorBaseMap(SurferApp.Path+"\samples\FL2018.shp")
Set CColorsLayer = Map1.Overlays(1)
CColorsLayer.Name = "Classed Colors"
CColorsLayer.ApplySymbologyClassedColors(AttributeField:="F_65-69yrs", _
ShowMissingValues:=False, _
ClassMethod:=srfSymNaturalBreaks, _
Count:=7, _
ShowAllOthers:=True, _
UseColormap:=True)
CColorsLayer.SymbologyColormap(Type:=srfSymCMCC).LoadPreset("Green-Pink")
Set ColorClasses = CColorsLayer.SymbologyClassedColorsBins
ColorClasses.Item(3).ColorRGBA.Color = srfColorBlue
ColorClasses.Item(3).UpperValue = 18500
Map1.Top = 10
Map1.Axes(1).Title = "Classed Colors"
End Sub
Example 2
This example shows how to add a legend with classed color symbology.
Sub Main
Dim SurferApp As Object
Set SurferApp = GetObject(, "Surfer.Application")
SurferApp.Visible = True
Dim Doc As Object
Set Doc = SurferApp.Documents.Add
Set Legend1 = Doc.AddLegend
Legend1.FrameFill.Pattern = "None"
Legend1.ShowLayerName = False
Legend1.SampleFormat.Thousands = False
Legend1.Name = "Classed Colors Legend"
Set CColorsLegendLayer = Legend1.LegendLayers.Item(1)
CColorsLegendLayer.SampleFillSize = 0.2
CColorsLegendLayer.SampleSpacing = 0.2
End Sub