com.vaadin.flow.component.charts.model.
Class PlotOptionsGauge
- java.lang.Object
-
- com.vaadin.flow.component.charts.model.AbstractConfigurationObject
-
- com.vaadin.flow.component.charts.model.AbstractPlotOptions
-
- com.vaadin.flow.component.charts.model.GaugeOptions
-
- com.vaadin.flow.component.charts.model.PlotOptionsGauge
-
All Implemented Interfaces:
public class PlotOptionsGauge extends GaugeOptions
General plotting options for the gauge series type. Requires
highcharts-more.js
See Also:
-
-
Constructor Summary
Constructors Constructor Description PlotOptionsGauge()
-
Method Summary
All Methods Modifier and Type Method Description void
addKey(String key)
Adds key to the keys array
Boolean
getAnimation()
Number
getAnimationLimit()
ChartType
getChartType()
String
getClassName()
Boolean
getClip()
Color
getColor()
Number
getColorIndex()
Boolean
getCrisp()
Cursor
getCursor()
DataLabels
getDataLabels()
String
getDescription()
Dial
getDial()
Boolean
getEnableMouseTracking()
Boolean
getExposeElementToA11y()
Dimension
getFindNearestPointBy()
Boolean
getGetExtremesFromAll()
String[]
getKeys()
String
getLinkedTo()
Color
getNegativeColor()
Number
getOpacity()
Number
getOvershoot()
Pivot
getPivot()
String
getPointDescriptionFormatter()
Boolean
getSelected()
Boolean
getShowCheckbox()
Boolean
getShowInLegend()
Boolean
getSkipKeyboardNavigation()
Boolean
getStickyTracking()
Number
getThreshold()
SeriesTooltip
getTooltip()
Boolean
getVisible()
Boolean
getWrap()
void
removeKey(String key)
Removes first occurrence of key in keys array
void
setAnimation(Boolean animation)
Enable or disable the initial animation when a series is displayed.
void
setAnimationLimit(Number animationLimit)
For some series, there is a limit that shuts down initial animation by default when the total number of points in the chart is too high.
void
setClassName(String className)
A class name to apply to the series' graphical elements.
void
setClip(Boolean clip)
Disable this option to allow series rendering in the whole plotting area.
void
setColor(Color color)
The main color or the series.
void
setColorIndex(Number colorIndex)
Styled mode only.
void
setCrisp(Boolean crisp)
When true, each point or column edge is rounded to its nearest pixel in order to render sharp on screen.
void
setCursor(Cursor cursor)
You can set the cursor to "pointer" if you have click events attached to the series, to signal to the user that the points and lines can be clicked.
void
setDataLabels(DataLabels dataLabels)
Data labels for the gauge.
void
setDescription(String description)
Requires Accessibility module
void
setDial(Dial dial)
Options for the dial or arrow pointer of the gauge.
void
setEnableMouseTracking(Boolean enableMouseTracking)
Enable or disable the mouse tracking for a specific series.
void
setExposeElementToA11y(Boolean exposeElementToA11y)
By default, series are exposed to screen readers as regions.
void
setFindNearestPointBy(Dimension findNearestPointBy)
Determines whether the series should look for the nearest point in both dimensions or just the x-dimension when hovering the series.
void
setGetExtremesFromAll(Boolean getExtremesFromAll)
Whether to use the Y extremes of the total chart width or only the zoomed area when zooming in on parts of the X axis.
void
setKeys(String... keys)
An array specifying which option maps to which key in the data point array.
void
setLinkedTo(String linkedTo)
The id of another series to link to.
void
setNegativeColor(Color negativeColor)
The color for the parts of the graph or points that are below the threshold.
void
setOpacity(Number opacity)
Opacity of a series parts: line, fill (e.g.
void
setOvershoot(Number overshoot)
Allow the dial to overshoot the end of the perimeter axis by this many degrees.
void
setPivot(Pivot pivot)
Options for the pivot or the center point of the gauge.
void
setPointDescriptionFormatter(String _fn_pointDescriptionFormatter)
void
setSelected(Boolean selected)
Whether to select the series initially.
void
setShowCheckbox(Boolean showCheckbox)
If true, a checkbox is displayed next to the legend item to allow selecting the series.
void
setShowInLegend(Boolean showInLegend)
Whether to display this particular series or series type in the legend.
void
setSkipKeyboardNavigation(Boolean skipKeyboardNavigation)
If set to
True
, the accessibility module will skip past the points in this series for keyboard navigation.void
setStickyTracking(Boolean stickyTracking)
Sticky tracking of mouse events.
void
setThreshold(Number threshold)
The threshold, also called zero level or base level.
void
setTooltip(SeriesTooltip tooltip)
A configuration object for the tooltip rendering of each single series.
void
setVisible(Boolean visible)
Set the initial visibility of the series.
void
setWrap(Boolean wrap)
When this option is
true
, the dial will wrap around the axes.
-
-
-
Method Detail
-
getChartType
public ChartType getChartType()
Overrides:
getChartType
in classAbstractPlotOptions
-
getAnimation
public Boolean getAnimation()
Specified by:
getAnimation
in classGaugeOptions
See Also:
-
setAnimation
public void setAnimation(Boolean animation)
Enable or disable the initial animation when a series is displayed. Please note that this option only applies to the initial animation of the series itself. For other animations, see
ChartModel.setAnimation(Boolean)
Specified by:
setAnimation
in classGaugeOptions
-
getAnimationLimit
public Number getAnimationLimit()
See Also:
-
setAnimationLimit
public void setAnimationLimit(Number animationLimit)
For some series, there is a limit that shuts down initial animation by default when the total number of points in the chart is too high. For example, for a column chart and its derivatives, animation doesn't run if there is more than 250 points totally. To disable this cap, set
animationLimit
toInfinity
.
-
getClassName
public String getClassName()
See Also:
-
setClassName
public void setClassName(String className)
A class name to apply to the series' graphical elements.
-
getClip
public Boolean getClip()
Specified by:
getClip
in classGaugeOptions
See Also:
-
setClip
public void setClip(Boolean clip)
Disable this option to allow series rendering in the whole plotting area. Note that clipping should be always enabled when chart.zoomType is set
Defaults to
true
.Specified by:
setClip
in classGaugeOptions
-
getColor
public Color getColor()
See Also:
-
setColor
public void setColor(Color color)
The main color or the series. In line type series it applies to the line and the point markers unless otherwise specified. In bar type series it applies to the bars unless a color is specified per point. The default value is pulled from the
options.colors
array.In styled mode, the color can be defined by the colorIndex option. Also, the series color can be set with the
.highcharts-series
,.highcharts-color-{n}
,.highcharts-{type}-series
or.highcharts-series-{n}
class, or individual classes given by theclassName
option.
-
getColorIndex
public Number getColorIndex()
See Also:
-
setColorIndex
public void setColorIndex(Number colorIndex)
Styled mode only. A specific color index to use for the series, so its graphic representations are given the class name
highcharts-color-{n}
.
-
getCrisp
public Boolean getCrisp()
Specified by:
getCrisp
in classGaugeOptions
See Also:
-
setCrisp
public void setCrisp(Boolean crisp)
When true, each point or column edge is rounded to its nearest pixel in order to render sharp on screen. In some cases, when there are a lot of densely packed columns, this leads to visible difference in column widths or distance between columns. In these cases, setting
crisp
tofalse
may look better, even though each column is rendered blurry.Defaults to
true
.Specified by:
setCrisp
in classGaugeOptions
-
getCursor
public Cursor getCursor()
Specified by:
getCursor
in classGaugeOptions
See Also:
-
setCursor
public void setCursor(Cursor cursor)
You can set the cursor to "pointer" if you have click events attached to the series, to signal to the user that the points and lines can be clicked.
Specified by:
setCursor
in classGaugeOptions
-
getDataLabels
public DataLabels getDataLabels()
Specified by:
getDataLabels
in classGaugeOptions
See Also:
-
setDataLabels
public void setDataLabels(DataLabels dataLabels)
Data labels for the gauge. For gauges, the data labels are enabled by default and shown in a bordered box below the point.
Specified by:
setDataLabels
in classGaugeOptions
-
getDescription
public String getDescription()
See Also:
-
setDescription
public void setDescription(String description)
Requires Accessibility module
A description of the series to add to the screen reader information about the series.
Defaults to: undefined
-
getDial
public Dial getDial()
See Also:
-
setDial
public void setDial(Dial dial)
Options for the dial or arrow pointer of the gauge.
In styled mode, the dial is styled with the
.highcharts-gauge-series .highcharts-dial
rule.
-
getEnableMouseTracking
public Boolean getEnableMouseTracking()
Specified by:
getEnableMouseTracking
in classGaugeOptions
See Also:
-
setEnableMouseTracking
public void setEnableMouseTracking(Boolean enableMouseTracking)
Enable or disable the mouse tracking for a specific series. This includes point tooltips and click events on graphs and points. For large datasets it improves performance.
Defaults to: true
Specified by:
setEnableMouseTracking
in classGaugeOptions
-
getExposeElementToA11y
public Boolean getExposeElementToA11y()
See Also:
-
setExposeElementToA11y
public void setExposeElementToA11y(Boolean exposeElementToA11y)
By default, series are exposed to screen readers as regions. By enabling this option, the series element itself will be exposed in the same way as the data points. This is useful if the series is not used as a grouping entity in the chart, but you still want to attach a description to the series.
Requires the Accessibility module.
Defaults to: undefined
-
getFindNearestPointBy
public Dimension getFindNearestPointBy()
See Also:
-
setFindNearestPointBy
public void setFindNearestPointBy(Dimension findNearestPointBy)
Determines whether the series should look for the nearest point in both dimensions or just the x-dimension when hovering the series. Defaults to
'xy'
for scatter series and'x'
for most other series. If the data has duplicate x-values, it is recommended to set this to'xy'
to allow hovering over all points.Applies only to series types using nearest neighbor search (not direct hover) for tooltip.
-
getGetExtremesFromAll
public Boolean getGetExtremesFromAll()
Specified by:
getGetExtremesFromAll
in classGaugeOptions
See Also:
-
setGetExtremesFromAll
public void setGetExtremesFromAll(Boolean getExtremesFromAll)
Whether to use the Y extremes of the total chart width or only the zoomed area when zooming in on parts of the X axis. By default, the Y axis adjusts to the min and max of the visible data. Cartesian series only.
Defaults to: false
Specified by:
setGetExtremesFromAll
in classGaugeOptions
-
getKeys
public String[] getKeys()
Specified by:
getKeys
in classGaugeOptions
See Also:
-
setKeys
public void setKeys(String... keys)
An array specifying which option maps to which key in the data point array. This makes it convenient to work with unstructured data arrays from different sources.
Specified by:
setKeys
in classGaugeOptions
-
addKey
public void addKey(String key)
Adds key to the keys array
Specified by:
addKey
in classGaugeOptions
Parameters:
key
- to addSee Also:
-
removeKey
public void removeKey(String key)
Removes first occurrence of key in keys array
Specified by:
removeKey
in classGaugeOptions
Parameters:
key
- to removeSee Also:
-
getOpacity
public Number getOpacity()
Specified by:
getOpacity
in classGaugeOptions
See Also:
-
setOpacity
public void setOpacity(Number opacity)
Opacity of a series parts: line, fill (e.g. area) and dataLabels.
Defaults to
1
.Specified by:
setOpacity
in classGaugeOptions
-
getLinkedTo
public String getLinkedTo()
See Also:
-
setLinkedTo
public void setLinkedTo(String linkedTo)
The id of another series to link to. Additionally, the value can be ":previous" to link to the previous series. When two series are linked, only the first one appears in the legend. Toggling the visibility of this also toggles the linked series.
-
getNegativeColor
public Color getNegativeColor()
See Also:
-
setNegativeColor
public void setNegativeColor(Color negativeColor)
The color for the parts of the graph or points that are below the threshold.
Defaults to: null
-
getOvershoot
public Number getOvershoot()
Specified by:
getOvershoot
in classGaugeOptions
See Also:
-
setOvershoot
public void setOvershoot(Number overshoot)
Allow the dial to overshoot the end of the perimeter axis by this many degrees. Say if the gauge axis goes from 0 to 60, a value of 100, or 1000, will show 5 degrees beyond the end of the axis.
Defaults to: 0
Specified by:
setOvershoot
in classGaugeOptions
-
getPivot
public Pivot getPivot()
See Also:
-
setPivot
public void setPivot(Pivot pivot)
Options for the pivot or the center point of the gauge.
In styled mode, the pivot is styled with the
.highcharts-gauge-series .highcharts-pivot
rule.
-
getPointDescriptionFormatter
public String getPointDescriptionFormatter()
-
setPointDescriptionFormatter
public void setPointDescriptionFormatter(String _fn_pointDescriptionFormatter)
-
getSelected
public Boolean getSelected()
Specified by:
getSelected
in classGaugeOptions
See Also:
-
setSelected
public void setSelected(Boolean selected)
Whether to select the series initially. If
showCheckbox
is true, the checkbox next to the series name will be checked for a selected series.Defaults to: false
Specified by:
setSelected
in classGaugeOptions
-
getShowCheckbox
public Boolean getShowCheckbox()
Specified by:
getShowCheckbox
in classGaugeOptions
See Also:
-
setShowCheckbox
public void setShowCheckbox(Boolean showCheckbox)
If true, a checkbox is displayed next to the legend item to allow selecting the series. The state of the checkbox is determined by the
selected
option.Defaults to: false
Specified by:
setShowCheckbox
in classGaugeOptions
-
getShowInLegend
public Boolean getShowInLegend()
Specified by:
getShowInLegend
in classGaugeOptions
See Also:
-
setShowInLegend
public void setShowInLegend(Boolean showInLegend)
Whether to display this particular series or series type in the legend. Defaults to false for gauge series.
Specified by:
setShowInLegend
in classGaugeOptions
-
getSkipKeyboardNavigation
public Boolean getSkipKeyboardNavigation()
See Also:
-
setSkipKeyboardNavigation
public void setSkipKeyboardNavigation(Boolean skipKeyboardNavigation)
If set to
True
, the accessibility module will skip past the points in this series for keyboard navigation.
-
getStickyTracking
public Boolean getStickyTracking()
Specified by:
getStickyTracking
in classGaugeOptions
See Also:
-
setStickyTracking
public void setStickyTracking(Boolean stickyTracking)
Sticky tracking of mouse events. When true, the
mouseOut
event on a series isn't triggered until the mouse moves over another series, or out of the plot area. When false, themouseOut
event on a series is triggered when the mouse leaves the area around the series' graph or markers. This also implies the tooltip. WhenstickyTracking
is false andtooltip.shared
is false, the tooltip will be hidden when moving the mouse between series. Defaults to true for line and area type series, but to false for columns, pies etc.Defaults to: true
Specified by:
setStickyTracking
in classGaugeOptions
-
getThreshold
public Number getThreshold()
See Also:
-
setThreshold
public void setThreshold(Number threshold)
The threshold, also called zero level or base level. For line type series this is only used in conjunction with negativeColor.
Defaults to: 0
-
getTooltip
public SeriesTooltip getTooltip()
Specified by:
getTooltip
in classGaugeOptions
See Also:
-
setTooltip
public void setTooltip(SeriesTooltip tooltip)
A configuration object for the tooltip rendering of each single series. Properties are inherited from tooltip, but only the following properties can be defined on a series level.
Specified by:
setTooltip
in classGaugeOptions
-
getVisible
public Boolean getVisible()
Specified by:
getVisible
in classGaugeOptions
See Also:
-
setVisible
public void setVisible(Boolean visible)
Set the initial visibility of the series.
Defaults to: true
Specified by:
setVisible
in classGaugeOptions
-
getWrap
public Boolean getWrap()
Specified by:
getWrap
in classGaugeOptions
See Also:
-
setWrap
public void setWrap(Boolean wrap)
When this option is
true
, the dial will wrap around the axes. For instance, in a full-range gauge going from 0 to 360, a value of 400 will point to 40. Whenwrap
isfalse
, the dial stops at 360.Defaults to: true
Specified by:
setWrap
in classGaugeOptions
-
-