API / geotoolkit / gauges / axis / Region / Region
An axis region is a segment within axis range which has to be differentiated from the rest of the axis. Examples are the critical section of the pressure gauge or the red segment of the tachometer in your car.
A region can be highlighted by a different fillstyle and/or by a different linestyle than other parts of the gauge.
Multiple regions can be added. Not to be used as a value fill, because axes have a different mechanism for that purpose.
Constructors
Methods
Css Properties
| Name | Type | Description |
|---|---|---|
fillstyle | string | Fill style of the range |
fillstyle | FillStyle | Fill style of the range |
fillstyle-color | string | Color in CSS form |
fillstyle-evenoddmode | boolean | Even-odd fill mode |
fillstyle-fillpattern | Pattern | Pattern |
fillstyle-fillpattern-containername | string | An optional container name, which creates an image pattern. This parameter is used for serialization if you want to save are reference to pattern instead of the pattern itself |
fillstyle-fillpattern-patternname | string | Name of this pattern for indexing |
fillstyle-fillpattern-scalable | boolean | Flag that sets scalability of the pattern coordinates, or relative to the shape it is filling (It is not supported) |
fillstyle-foreground | string | Foreground color |
fillstyle-pattern | Pattern | Pattern |
high | number | Upper bound of the range |
linecap | CapStyle | Can be 'butt', 'square', or 'round' |
linestyle | string | Line style of the range |
linestyle | LineStyle | Line style of the range |
linestyle-color | string | Color in CSS form |
linestyle-fill | string | Optional fill style to be used to fill lines generated with this style |
linestyle-fill | FillStyle | Optional fill style to be used to fill lines generated with this style |
linestyle-linecap | CapStyle | The line cap style |
linestyle-linedashoffset | number | Line dash offset of dashed line |
linestyle-linejoin | JoinStyle | The line join style |
linestyle-pixelsnapmode | boolean | Pixel Snap Mode, default( |
linestyle-scalable | boolean | True if width should depend on transformation |
linestyle-unit | string | Optional unit for the width |
linestyle-width | number | string | The line thickness |
low | number | Maximum value Lower bound of the range |
name | string | Name of the region |
static | boolean | Defines if the range is static |
visible | boolean | Defines if the range is visible and should be rendered |
Constructors
• new Region(low?, high?, lineStyle?, fillStyle?)
Methods
▸ connectStyle(style, type, callback): Region
Connects style.
This convenience method subscribes a listener to given style for the specified type.
And automatically un-subscribes listener if node is disposed to prevent memory leaks
| Name | Type | Description |
|---|---|---|
style | EventDispatcher | connect style |
type | string | type of event or property |
callback | AttributeCallback<EventDispatcher> | function to be called |
this
▸ disconnectStyle(style, type, callback): Region
Disconnect style
This convenience method un-subscribes a listener to given style for the specified type.
| Name | Type | Description |
|---|---|---|
style | EventDispatcher | connect style |
type | string | type of event or property |
callback | AttributeCallback<EventDispatcher> | function to be called |
this
IStyleListener.disconnectStyle
▸ getClassName(): string
string
▸ getCssClass(): string
Returns class name for css reference
string
▸ getFillStyle(): FillStyle
Returns fill style set for the region
▸ getHigh(): number
Gets highest limit of the region
number
▸ getLineStyle(): LineStyle
Returns line style set for the region
▸ getLow(): number
Gets lowest limit of the region
number
▸ getName(): string
Returns the current name of the region
string
▸ getProperties(): OptionsOut
Returns properties pertaining to this object
properties
▸ getRange(): Range
Sets range that defines this region
▸ getVisible(): boolean
Gets visibility status
boolean
▸ isStatic(): boolean
Returns true if the region is static and visible at all times
boolean
▸ setFillStyle(fillStyle, merge?): Region
Sets fill style set for the region
| Name | Type | Description |
|---|---|---|
fillStyle | Type | a new fill style |
Optional merge | boolean | true if you want to merge lineStyle with existing attribute, false by default |
▸ setHigh(high): Region
Sets highest limit of the region
| Name | Type | Description |
|---|---|---|
high | number | New upper bound |
▸ setLineColor(color): Region
Sets line style set for the region
| Name | Type | Description |
|---|---|---|
color | string | RgbaColor | New color of the line |
▸ setLineStyle(lineStyle, merge?): Region
Sets line style set for the region
| Name | Type | Description |
|---|---|---|
lineStyle | Type | line style or options |
Optional merge | boolean | true if you want to merge lineStyle with existing attribute, false by default |
▸ setLow(low): Region
Sets lowest limit of the region
| Name | Type | Description |
|---|---|---|
low | number | New lower bound |
▸ setName(name): Region
Sets the name of the region
| Name | Type | Description |
|---|---|---|
name | string | New name for the region |
this
▸ setProperties(props?): Region
Sets properties pertaining to this object
| Name | Type | Description |
|---|---|---|
Optional props | Options | properties |
▸ setRange(range): Region
Sets range that defines this region
| Name | Type | Description |
|---|---|---|
range | Range | New range with min and max values |
▸ setStatic(isStatic): Region
Sets a flag defining if the region should be static and visible at all times
| Name | Type | Description |
|---|---|---|
isStatic | boolean | True |
▸ setVisible(visible): Region
Sets visible flag for the range
| Name | Type | Description |
|---|---|---|
visible | boolean | Visibility flag |
▸ Static getClassName(): string
string