|
LabelCategory | Labels.AddCategory (string Name) |
| Adds a visualization category for labels. More...
|
|
void | Labels.ApplyCategories () |
| Maps labels to the visualization categories. More...
|
|
void | Labels.ApplyColorScheme (tkColorSchemeType Type, ColorScheme ColorScheme) |
| Applies color scheme to the visualization categories. More...
|
|
void | Labels.ApplyColorScheme2 (tkColorSchemeType Type, ColorScheme ColorScheme, tkLabelElements Element) |
| Applies color scheme to the visualization categories. More...
|
|
void | Labels.ApplyColorScheme3 (tkColorSchemeType Type, ColorScheme ColorScheme, tkLabelElements Element, int CategoryStartIndex, int CategoryEndIndex) |
| Applies color scheme to the visualization categories. More...
|
|
void | Labels.ClearCategories () |
| Removes all the visualization categories. More...
|
|
bool | Labels.GenerateCategories (int FieldIndex, tkClassificationType ClassificationType, int numClasses) |
| Generates visualization categories for labels based on certain field from the attribute table of the parent shapefile. More...
|
|
LabelCategory | Labels.get_Category (int Index) |
| Gets the visualization category (LabelCategory) with the specified index. More...
|
|
LabelCategory | Labels.InsertCategory (int Index, string Name) |
| Inserts a new visualization category at the given position of the list. More...
|
|
bool | Labels.MoveCategoryDown (int Index) |
| Moves a specified label category down in the list. More...
|
|
bool | Labels.MoveCategoryUp (int Index) |
| Moves a specified label category up in the list. More...
|
|
bool | Labels.RemoveCategory (int Index) |
| Removes a visualization category with specified index. More...
|
|
void | Labels.set_Category (int Index, LabelCategory pVal) |
| Sets the visualization category at the given position in the list. More...
|
|
Here is a list of properties and methods to work with visualization categories for labels represented by LabelCategory class. This module is a part of the documentation of Labels class.
Graph description
A visualization category is designed to provide a common visualization options for a group of labels with similar attributes.
Visualization categories can be added in several ways.
1. Automatic generation. This example demonstrates how to create 6 categories with frame color ranging from orange to blue.
{
}
tkClassificationType
The type of the classification available for ShapefileCategories.Generate and Labels....
Definition: Enumerations.cs:227
tkLabelElements
Lists the parts of the label. Can be used to specify particular parts to apply color scheme to.
Definition: Enumerations.cs:803
tkMapColor
A list of named constants for some of the well-known colors.
Definition: Enumerations.cs:951
tkColorSchemeType
The type of color scheme. Determines how colors will be extracted from the color scheme (see Shapefil...
Definition: Enumerations.cs:305
Provides methods for random colour generation and colour interpolation based on the specific set of c...
Definition: ColorScheme.cs:65
void SetColors2(tkMapColor Color1, tkMapColor Color2)
Clears all the existing breaks and creates 2 breaks with the specified colours.
Definition: ColorScheme.cs:156
Provides a functionality for accessing and editing ESRI shapefiles.
Definition: Shapefile.cs:72
Labels Labels
Gets or sets the instance of the Labels class associated with the shapefile.
Definition: Shapefile.cs:184
bool GenerateCategories(int FieldIndex, tkClassificationType ClassificationType, int numClasses)
Generates visualization categories for labels based on certain field from the attribute table of the ...
Definition: Labels.cs:323
void ApplyColorScheme2(tkColorSchemeType Type, ColorScheme ColorScheme, tkLabelElements Element)
Applies color scheme to the visualization categories.
Definition: Labels.cs:385
bool FrameVisible
Gets or sets the values which indicates whether label's frame is visible.
Definition: Labels.cs:1357
2. Manual creation. In this scenario particular labels can be attributed to the category by:
In this example a new category with yellow background will be created and objects with area greater than 100 units will be mapped to it.
if (ct2 != null)
{
}
Represents visualization options for labels displayed on the map.
Definition: LabelCategory.cs:115
string Expression
Gets or sets expression which defines shapes that belong to this category.
Definition: LabelCategory.cs:148
uint FrameBackColor
Gets or sets the back color of the frame.
Definition: LabelCategory.cs:278
void ApplyCategories()
Maps labels to the visualization categories.
Definition: Labels.cs:300
LabelCategory AddCategory(string Name)
Adds a visualization category for labels.
Definition: Labels.cs:290
This time a category with gray background will be added and then all the labels with even index will be attributed to it.
if (ct != null)
{
{
}
}
int Category
The index of visualization category the label belongs to.
Definition: LabelClass.cs:73
int NumCategories
Number of visualization categories associated with this instance of class.
Definition: Labels.cs:364
Label get_Label(int Index, int Part)
Gets label with the specified index.
Definition: Labels.cs:574
int Count
Gets the number of labels.
Definition: Labels.cs:476
Don't forget to redraw the map in the end (AxMap.Redraw).
◆ AddCategory()
◆ ApplyCategories()
void Labels.ApplyCategories |
( |
| ) |
|
Maps labels to the visualization categories.
LabelCategory.Expression property is analysed. Afterwards Label.Category property is changed for all labels whose attributes comply with the expression.
◆ ApplyColorScheme()
Applies color scheme to the visualization categories.
- Parameters
-
Type | The method of interpolation. |
ColorScheme | Color scheme to take colors from. |
◆ ApplyColorScheme2()
Applies color scheme to the visualization categories.
Allows to choose the part of label to apply colors to.
- Parameters
-
Type | The method of interpolation. |
ColorScheme | Color scheme object to borrow colors from. |
Element | The element of the label to apply colors to. Labels.ApplyColorScheme is shortcut for using leDefault option. |
◆ ApplyColorScheme3()
Applies color scheme to the visualization categories.
- Parameters
-
Type | The method of interpolation. |
ColorScheme | Color scheme object to borrow colors from. |
Element | The element of the label to apply colors to. Labels.ApplyColorScheme is shortcut for using leDefault option. |
CategoryStartIndex | The index of the first visualization category to apply colors to. |
CategoryEndIndex | The index of the last visualization category to apply colors to. |
◆ ClearCategories()
void Labels.ClearCategories |
( |
| ) |
|
Removes all the visualization categories.
◆ GenerateCategories()
bool Labels.GenerateCategories |
( |
int |
FieldIndex, |
|
|
tkClassificationType |
ClassificationType, |
|
|
int |
numClasses |
|
) |
| |
Generates visualization categories for labels based on certain field from the attribute table of the parent shapefile.
Use Labels.ApplyCategories to map particular labels to the generated categories based on the LabelCategory.Expression property.
- Parameters
-
FieldIndex | The index of field from the attribute table. |
ClassificationType | The type of classification. |
numClasses | Number of categories to be generated. It will be ignored for ctUniqueValues. |
- Returns
- True on successful generation and false otherwise.
◆ get_Category()
Gets the visualization category (LabelCategory) with the specified index.
- Parameters
-
Index | The index of the category to get. |
- Returns
- The reference to the category or null in case of the incorrect index.
◆ InsertCategory()
Inserts a new visualization category at the given position of the list.
- Parameters
-
Index | The index to insert the new category at. Should be greater or equal to 0 and less then Labels.numCategories. |
Name | The name of the new category. |
- Returns
- The reference to the newly created category.
◆ MoveCategoryDown()
bool Labels.MoveCategoryDown |
( |
int |
Index | ) |
|
Moves a specified label category down in the list.
- Parameters
-
Index | The index of the category to move. |
- Returns
- True on successful operation and false otherwise.
◆ MoveCategoryUp()
bool Labels.MoveCategoryUp |
( |
int |
Index | ) |
|
Moves a specified label category up in the list.
- Parameters
-
Index | The index of the category to move. |
- Returns
- True on successful operation and false otherwise.
◆ RemoveCategory()
bool Labels.RemoveCategory |
( |
int |
Index | ) |
|
Removes a visualization category with specified index.
- Parameters
-
Index | The index of category to be removed. |
- Returns
- True on successful removal and false otherwise.
◆ set_Category()
Sets the visualization category at the given position in the list.
In fact the method replaces the category at the given index with the new one.
- Parameters
-
Index | The index to set the category at. It should be less then Labels.NumCategories. |
pVal | The reference to the category to set. |
◆ NumCategories
Number of visualization categories associated with this instance of class.