API / geotoolkit / map / features / filters / DonutChartAnnotationOverlap / DonutChartAnnotationOverlap
filters.DonutChartAnnotationOverlap.DonutChartAnnotationOverlap
NoAnnotationOverlap filter that supports point features rendered with DonutChart as SymbolShape painter. Labels should be hidden on the shape itself.
Example
import {SymbolShape} from '@int/geotoolkit/scene/shapes/SymbolShape';
import {PieChart} from '@int/geotoolkit/controls/shapes/PieChart';
import {Point as MapTemplatePoint} from '@int/geotoolkit/map/features/templates/Point';
import {Vector} from '@int/geotoolkit/map/layers/Vector';
import {DonutChartAnnotationOverlap} from '@int/geotoolkit/map/features/filters/DonutChartAnnotationOverlap';
const template = new MapTemplatePoint({
'shape': new SymbolShape({
'sizeisindevicespace': true,
'width': 30,
'height': 30,
// use chart as a painter:
'painter': new PieChart({
'linestyle': {'color': '#e6e9ee', 'width': 2},
'label': {
'visible': false,
'format': (annotation: string, value: number) => ...,
},
// fill colors to use:
'fillstyles': ['#fdd835', '#1565c0']
}, ...)
});
const layer = new Vector({
'templates': [...],
// enable annotations:
'annotations': {
'visible': true,
'filter': [new DonutChartAnnotationOverlap()]
}
});↳
DonutChartAnnotationOverlap
Constructors
- [new DonutChartAnnotationOverlap(options, ignoreTypes)](/solutions/geotoolkit/GeoToolkit_JS/apis/classes/geotoolkit.map.features.filters-1.donutchartannotationoverlap.donutchartannotationoverlap.md#new donutchartannotationoverlap(options, ignoretypes))
Constructors
• new DonutChartAnnotationOverlap(options?, ignoreTypes?)
| Name | Type | Description |
|---|---|---|
Optional options | Options & Options | filter options |
Optional ignoreTypes | typeof AbstractFeature[] | feature types that should be passed without filtering |
NoAnnotationOverlap.constructor
Methods
▸ filterFeatures(iterator, context, layer): Iterator<AbstractFeature>
Gets iterator over filtered features
| Name | Type | Description |
|---|---|---|
iterator | Iterator<AbstractFeature> | input features iterator |
context | RenderingContext | rendering context |
layer | Template | feature layer |
iterator over features to render
NoAnnotationOverlap.filterFeatures
▸ getClassName(): string
string
NoAnnotationOverlap.getClassName
▸ reset(): DonutChartAnnotationOverlap
Resets itself
▸ Static getClassName(): string
string