Class BulletChart
- All Implemented Interfaces:
ClickableChartData<BulletChart>
This chart type visualizes a measurement and compares it one or more other measurements. It helps you to compare a target value to the current value and the current value to three ranges designating a low, a medium and a high performance range. The chart is visualized as a horizontal bar split into three ranges with different colors. From left to right, ranges denote low, medium and high values, respectively. In the center of the chart, a bar extends from left to right, denoting the current value. Also, a vertical line designates the place of the target value on the chart.
This chart does not support modifying the tooltip, it only supports the tooltip DOT
. However, the chart
enables you to create custom tooltips using any JBStrap component. If you want to display a tooltip that is different from the default one,
you need to create it on your own using ChartTooltipRenderer
. You only need to implement one method which returns the tooltip as a component.
In order to do this, you can reuse any JBStrap component. It is possible to display a button, a list or even another chart on the tooltip.
The chart also supports click event handling. This means that you can implement server-side business logic for the event that is triggered when a user clicks on
chart data. This is when a ChartClick
event is triggered. This event provides you information on where and which chart
the user clicked on. This can be reused in various ways, e.g. to update a list.
- Since:
- 4.0
- Author:
- JBStrap
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
Fields inherited from class com.jbstrap.ui.components.charts.BaseChart
brushable, canvas, DATA, defaultTooltipType, handlers, NAME, params, supportedTooltipTypes, tooltipContent, tooltipType, zoomable
-
Constructor Summary
ConstructorDescriptionBulletChart
(String name, String... titles) Creates a bullet chart and specifies the display item titles. -
Method Summary
Modifier and TypeMethodDescriptionaddElement
(String title) Creates a new chart item on the chartGets the first chart item’s current value.getCurrentValue
(String title) Gets a chart item’s current value.Gets the first chart item’s current value color.getCurrentValueColor
(String title) Gets the current color of a chart item.int
Gets the height of the first chart item.int
Gets the height of a chart item.Gets the high level marker color on the first chart item.getHighLevelColor
(String title) Gets the high level marker color on a chart item.Gets the first chart item’s high range value.getHighLevelValue
(String title) Gets a chart item’s high range value.Gets the first chart item’s low level color.getLowLevelColor
(String title) Gets the low level marker color from a chart item.Gets the low range value of the first chart item.getLowLevelValue
(String title) Gets the low range value of a chart item.protected Parameters
Gets the first chart item’s target value marker color.getMarkerColor
(String title) Gets a chart item’s target value marker color.Gets the first chart item’s target value marker width.getMarkerWidth
(String title) Gets a chart item’s target value marker width.Gets the medium level marker color from the first chart item.getMediumLevelColor
(String title) Gets the medium level marker color on the chart item.Gets first chart item’s medium range value.getMediumLevelValue
(String title) Gets a chart item’s medium range value.protected Parameters
getNumbersFont
(String title) Gets the color of the numbers on the first chart item.getNumbersFontColor
(String title) Gets the color of the numbers on a chart item.Gets the font of the numbers on the first chart item.getNumbersFontFamily
(String title) Gets the font of the numbers on a chart item.int
Gets the font size of the numbers on the first chart item.int
getNumbersFontSize
(String title) Gets the font size of the numbers on a chart item.Gets the font weight of the numbers on the first chart item.getNumbersFontWeight
(String title) Gets the font weight of the numbers on a chart item.Gets the postfix of the numbers on the first chart item.getPostfix
(String title) Gets the postfix of the numbers on a chart item.Gets the prefix of the numbers on the first chart item.Gets the prefix of the numbers on a chart item.protected Parameters
Gets the subtitle of the first chart item.getSubTitle
(String title) Gets the subtitle of a chart item.protected Parameters
getSubTitleFont
(String title) Gets the first chart item’s subtitle color.getSubTitleFontColor
(String title) Gets the chart item’s subtitle color.Gets the font of the first chart item’s subtitle.getSubTitleFontFamily
(String title) Gets the font of a chart item’s subtitle.int
Gets the first chart item’s subtitle font size.int
getSubTitleFontSize
(String title) Gets a chart item’s subtitle font size.Gets the font weight of the first chart item’s subtitle.getSubTitleFontWeight
(String title) Gets the font weight of a chart item’s subtitle.Gets the first chart item’s target value.getTargetValue
(String title) Gets a chart item’s target value.protected Parameters
Gets the first chart item’s tick color.getTicksColor
(String title) Gets the chart item tick color.Gets the first chart item’s tick width.getTicksWidth
(String title) Gets a chart item’s tick width.getTitle()
Gets the name of the first chart item on the chart.protected Parameters
getTitleFont
(String title) Gets the color of the first chart item’s title.getTitleFontColor
(String title) Gets the title color of the first chart item.Gets the font of the first chart item’s title.getTitleFontFamily
(String title) Gets the font type of a chart item title.int
Gets the first chart item’s title font size.int
getTitleFontSize
(String title) Gets the font size of a chart item.Gets the first chart item’s title font weight.getTitleFontWeight
(String title) Gets the font weight of a chart item’s title.Gets the name of all chart items on the chart.protected void
init()
Chart initialization.removeElement
(String title) Deletes a chart item from the chart by its name.setCurrentValue
(Long value) Sets the first chart item’s current value.setCurrentValue
(String title, Long value) Sets a chart item’s current value.setCurrentValueColor
(String color) Sets the color of the first chart item’s current value.setCurrentValueColor
(String title, String color) Sets the color for a chart item’s current value.setHeight
(int height) Sets the height of the first chart item.Sets the height of a chart item.setLevelColors
(String lowLevel, String mediumLevel, String highLevel) Sets the color of the ranges on the first chart.setLevelColors
(String title, String lowLevel, String mediumLevel, String highLevel) Sets the chart range colors.Sets the ranges on the first chart item.Sets the range values on a chart item.setMarkerColor
(String color) Sets the first chart item’s target value marker color.setMarkerColor
(String title, String color) Sets a chart item’s target value marker color.setMarkerWidth
(Integer width) Sets the first chart item’s target value marker width.setMarkerWidth
(String title, Integer width) Sets a chart item’s target value marker width.setNumbersFontColor
(String color) Sets the first chart item’s number color.setNumbersFontColor
(String title, String color) Sets the color of the numbers on a chart item.setNumbersFontFamily
(String fontFamily) Sets the font of the numbers on the first chart item.setNumbersFontFamily
(String title, String fontFamily) Sets the font of the numbers on a chart item.setNumbersFontSize
(int fontSize) Sets the font size of the numbers on the first chart item.setNumbersFontSize
(String title, int fontSize) Sets the font size of the numbers on a chart item.setNumbersFontWeight
(FontWeight weight) Sets the font weight of the numbers on the first chart item.setNumbersFontWeight
(String title, FontWeight weight) Sets the font weight of the numbers on a chart item.setPostfix
(String postfix) Sets the postfix of the numbers on the first chart item.setPostfix
(String title, String postfix) Sets the postfix of the numbers on the first chart item.Sets the prefix for the numbers displayed on the first chart item.Sets the prefix for the numbers on a chart item.setSubTitle
(String subTitle) Modifies the title of the first chart item.setSubTitle
(String title, String subTitle) Modifies the title of a chart item.setSubTitleFontColor
(String color) Sets the first chart item’s subtitle color.setSubTitleFontColor
(String title, String color) Sets a chart item’s subtitle color.setSubTitleFontFamily
(String fontFamily) Sets the font of the first chart item’s subtitle.setSubTitleFontFamily
(String title, String fontFamily) Sets the font of a chart item’s subtitle.setSubTitleFontSize
(int fontSize) Sets the font size of the first chart item’s subtitle.setSubTitleFontSize
(String title, int fontSize) Sets the font size of a chart item’ subtitle.setSubTitleFontWeight
(FontWeight weight) Sets the font weight of the first chart item’s subtitle.setSubTitleFontWeight
(String title, FontWeight weight) Sets the font weight of a chart item’s subtitle.setTargetValue
(Long value) Sets the first chart item’s target value.setTargetValue
(String title, Long value) Sets a chart item’s target value.setTicksColor
(String color) Sets the first chart item’s tick color.setTicksColor
(String title, String color) Sets a chart item’s tick color.setTicksWidth
(Integer width) Sets the first chart item’s tick width.setTicksWidth
(String title, Integer width) Sets a chart item’s tick width.Modifies the name of the first chart item.Modifies the name of a chart item.setTitleFontColor
(String color) Sets the first chart item’s title color.setTitleFontColor
(String title, String color) Sets the first chart item’s title color.setTitleFontFamily
(String fontFamily) Sets the font of the first chart item.setTitleFontFamily
(String title, String fontFamily) Sets the font of a chart item’s title.setTitleFontSize
(int fontSize) Sets the font size of the first chart item’s title.setTitleFontSize
(String title, int fontSize) Sets the font size of a chart item’s title.setTitleFontWeight
(FontWeight weight) Sets the font weight of the first chart item’s title.setTitleFontWeight
(String title, FontWeight weight) Sets the font weight of the chart item’s title.Methods inherited from class com.jbstrap.ui.components.charts.BaseChart
generateJSON, getCanvas, getDefaultTooltipType, getHandlers, getName, getSupportedTooltipTypes, refreshData, runJs, setParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.jbstrap.ui.components.charts.ClickableChartData
addClickHandler
-
Field Details
-
TITLE
- See Also:
-
SUB_TITLE
- See Also:
-
TITLE_FONT
- See Also:
-
SUB_TITLE_FONT
- See Also:
-
NUMBERS_FONT
- See Also:
-
PREFIX
- See Also:
-
POSTFIX
- See Also:
-
HEIGHT
- See Also:
-
RANGES
- See Also:
-
MEASURES
- See Also:
-
MARKERS
- See Also:
-
STYLE
- See Also:
-
FONT_FAMILY
- See Also:
-
FONT_SIZE
- See Also:
-
FONT_WEIGHT
- See Also:
-
COLOR
- See Also:
-
RANGE_COLORS
- See Also:
-
MEASURE_COLOR
- See Also:
-
MARKER
- See Also:
-
TICK
- See Also:
-
WIDTH
- See Also:
-
-
Constructor Details
-
BulletChart
Creates a bullet chart and specifies the display item titles.- Parameters:
name
- Chart name (required)titles
- A list of chart item titles (at least one item is required)- Throws:
NullPointerException
- Thrown if the parameter name of the given chart isnull
IllegalArgumentException
- Thrown if no display items are specified
-
-
Method Details
-
init
protected void init()Description copied from class:BaseChart
Chart initialization.- Specified by:
init
in classBaseChart<BulletChart>
-
getTitleFont
- Parameters:
title
- Chart item title Ifnull
is specified, the method returns the settings for the first chart item title.- Returns:
- Parameter class containing the font settings of the specified chart item
-
getSubTitleFont
- Parameters:
title
- Chart item title Ifnull
is specified, the method returns the settings for the first chart item title.- Returns:
- Parameter class containing the font settings of the specified chart item’s subtitle
-
getNumbersFont
- Parameters:
title
- Chart item title Ifnull
is specified, the method returns the number settings for the first chart item.- Returns:
- Parameter class containing the number settings for the specified chart item
-
getStyle
- Parameters:
title
- Chart item title Ifnull
is specified, the method returns the style settings for the first chart item.- Returns:
- Chart item style settings in a parameter class
-
getMarker
- Parameters:
title
- Chart item title Ifnull
is specified, the method returns the marker settings for the first chart item.- Returns:
- Parameter class containing the target marker settings in the specified chart item
-
getTick
- Parameters:
title
- Chart item title Ifnull
is specified, the method returns settings for the first chart item.- Returns:
- Parameter class containing the tick settings for the specified chart item
-
getTitles
Gets the name of all chart items on the chart.- Returns:
- A list of all chart item names
-
getTitle
Gets the name of the first chart item on the chart.- Returns:
- The name of the first chart item
-
setTitle
Modifies the name of the first chart item.- Parameters:
title
- Chart item title- Returns:
- Chart instance
-
setTitle
Modifies the name of a chart item.- Parameters:
oldTitle
- Chart item olf title. If you specify a chart item name that is not included in the chart, the method does nothing.title
- Chart item title- Returns:
- Chart instance
-
getSubTitle
Gets the subtitle of the first chart item.- Returns:
- The subtitle of the first chart item
-
getSubTitle
Gets the subtitle of a chart item.- Parameters:
title
- Chart item title- Returns:
- The subtitle of the specified chart item or
null
if there is no chart item by the specified title
-
setSubTitle
Modifies the title of the first chart item.- Parameters:
subTitle
- The first chart item’s new subtitle- Returns:
- Chart instance
-
setSubTitle
Modifies the title of a chart item.- Parameters:
title
- Chart item title If you specify a name that references no chart items, the method does nothing.subTitle
- The specified chart item’s new subtitle- Returns:
- Chart instance
-
getTitleFontFamily
Gets the font of the first chart item’s title.- Returns:
- The font of the first chart item’s title
-
getTitleFontFamily
Gets the font type of a chart item title.- Parameters:
title
- Chart item title- Returns:
- The font of the specified chart item or
null
if there is no chart item with the specified title
-
setTitleFontFamily
Sets the font of the first chart item. Default font: Roboto.- Parameters:
fontFamily
- The name of the font to be set- Returns:
- Chart instance
-
setTitleFontFamily
Sets the font of a chart item’s title. Default font: Roboto.- Parameters:
title
- Chart item title If you specify a name that references no chart items, method does nothing.fontFamily
- The name of the font to be set- Returns:
- Chart instance
-
getTitleFontSize
public int getTitleFontSize()Gets the first chart item’s title font size.- Returns:
- The chart item’s title size in pixels
-
getTitleFontSize
Gets the font size of a chart item.- Parameters:
title
- Chart item title- Returns:
- The font size of the specified chart item in pixels or
null
if there are is no chart item with the specified title
-
setTitleFontSize
Sets the font size of the first chart item’s title. Default title font size: 12 pixels.- Parameters:
fontSize
- Title font size in pixels- Returns:
- Chart instance
-
setTitleFontSize
Sets the font size of a chart item’s title. Default title font size: 12 pixels.- Parameters:
title
- Chart item title If you specify a title that references no chart items, the method does nothing.fontSize
- Title font size in pixels- Returns:
- Chart instance
-
getTitleFontWeight
Gets the first chart item’s title font weight.- Returns:
- The first chart item’s title font weight
-
getTitleFontWeight
Gets the font weight of a chart item’s title.- Parameters:
title
- Chart item title- Returns:
- The font weight of the specified chart item or
null
if there is no chart item with the specified title
-
setTitleFontWeight
Sets the font weight of the first chart item’s title. Default font weight setting:FontWeight.BOLD
.- Parameters:
weight
- The font weight to be set Available font weights are listed in the enumFontWeight
. Ifnull
is specified, the title is displayed using the regularFontWeight.REGULAR
setting.- Returns:
- Chart instance
-
setTitleFontWeight
Sets the font weight of the chart item’s title. Default font weight setting:FontWeight.BOLD
.- Parameters:
title
- Chart item title If a title is specified that is not on the chart, the method does nothing.weight
- The font weight to be set Available font weights are listed in the enumFontWeight
. Ifnull
is specified, the title is displayed using the regularFontWeight.REGULAR
setting.- Returns:
- Chart instance
-
getTitleFontColor
Gets the color of the first chart item’s title.- Returns:
- The color of the first chart item’s title
-
getTitleFontColor
Gets the title color of the first chart item.- Parameters:
title
- Chart item title- Returns:
- The color of the specified chart item title or
null
if there is no chart item with the specified title
-
setTitleFontColor
Sets the first chart item’s title color. Default title color: #666C73- Parameters:
color
- The color to be set (CSS3 standard format)- Returns:
- Chart instance
-
setTitleFontColor
Sets the first chart item’s title color. Default title color: #666C73- Parameters:
title
- Chart item title If you specify a title that references no chart items, the method does nothing.color
- The color to be set (CSS3 standard format)- Returns:
- Chart instance
-
getSubTitleFontFamily
Gets the font of the first chart item’s subtitle.- Returns:
- The font of the first chart item’s subtitle
-
getSubTitleFontFamily
Gets the font of a chart item’s subtitle.- Parameters:
title
- Chart item title- Returns:
- The subtitle font of the specified chart item or
null
if there is no chart item with the specified title
-
setSubTitleFontFamily
Sets the font of the first chart item’s subtitle. Default font: Roboto.- Parameters:
fontFamily
- The name of the font to be set- Returns:
- Chart instance
-
setSubTitleFontFamily
Sets the font of a chart item’s subtitle. Default font: Roboto.- Parameters:
title
- Chart item title If you specify a name that references no chart items, the method does nothing.fontFamily
- The name of the font to be set- Returns:
- Chart instance
-
getSubTitleFontSize
public int getSubTitleFontSize()Gets the first chart item’s subtitle font size.- Returns:
- The font size of the first chart item in pixels
-
getSubTitleFontSize
Gets a chart item’s subtitle font size.- Parameters:
title
- Chart item title- Returns:
- The font size of the specified chart item’s subtitle in pixels or
null
if there is no chart item with the specified title
-
setSubTitleFontSize
Sets the font size of the first chart item’s subtitle. Default font size: 11 pixels- Parameters:
fontSize
- The subtitle font size in pixels- Returns:
- Chart instance
-
setSubTitleFontSize
Sets the font size of a chart item’ subtitle. Default font size: 11 pixels- Parameters:
title
- Chart item title If you specify a title that references no chart items, the method does nothing.fontSize
- The subtitle font size in pixels- Returns:
- Chart instance
-
getSubTitleFontWeight
Gets the font weight of the first chart item’s subtitle.- Returns:
- The first chart item’s subtitle font weight
-
getSubTitleFontWeight
Gets the font weight of a chart item’s subtitle.- Parameters:
title
- Chart item title- Returns:
- Subtitle font weight or
null
if there is no chart item with the specified title
-
setSubTitleFontWeight
Sets the font weight of the first chart item’s subtitle. Default font weight setting:FontWeight.REGULAR
.- Parameters:
weight
- The font weight to be set Available font weights are listed in the enumFontWeight
. Ifnull
is specified, the subtitle is displayed using the regularFontWeight.REGULAR
setting.- Returns:
- Chart instance
-
setSubTitleFontWeight
Sets the font weight of a chart item’s subtitle. Default font weight setting:FontWeight.REGULAR
.- Parameters:
title
- Chart item title If a title is specified that is not on the chart, the method does nothing.weight
- The font weight to be set Available font weights are listed in the enumFontWeight
. Ifnull
is specified, the subtitle is displayed using the regularFontWeight.REGULAR
setting.- Returns:
- Chart instance
-
getSubTitleFontColor
Gets the first chart item’s subtitle color.- Returns:
- The first chart item’s subtitle color
-
getSubTitleFontColor
Gets the chart item’s subtitle color.- Parameters:
title
- Chart item title- Returns:
- Chart item subtitle color or
null
if there is no chart item with the specified title
-
setSubTitleFontColor
Sets the first chart item’s subtitle color. Default title color: #666C73- Parameters:
color
- The color to be set (CSS3 standard format)- Returns:
- Chart instance
-
setSubTitleFontColor
Sets a chart item’s subtitle color. Default title color: #666C73- Parameters:
title
- Chart item title If you specify a title that references no chart items, the method does nothing.color
- The color to be set (CSS3 standard format)- Returns:
- Chart instance
-
getNumbersFontFamily
Gets the font of the numbers on the first chart item.- Returns:
- Number font on the first chart item
-
getNumbersFontFamily
Gets the font of the numbers on a chart item.- Parameters:
title
- Chart item title- Returns:
- The font on the specified chart item or
null
if there is no chart item with the specified title
-
setNumbersFontFamily
Sets the font of the numbers on the first chart item. Default font: Roboto.- Parameters:
fontFamily
- The name of the font to be set- Returns:
- Chart instance
-
setNumbersFontFamily
Sets the font of the numbers on a chart item. Default font: Roboto.- Parameters:
title
- Chart item title If you specify a name that references no chart items, the method does nothing.fontFamily
- The name of the font to be set- Returns:
- Chart instance
-
getNumbersFontSize
public int getNumbersFontSize()Gets the font size of the numbers on the first chart item.- Returns:
- The font size of the numbers on the first chart item in pixels
-
getNumbersFontSize
Gets the font size of the numbers on a chart item.- Parameters:
title
- Chart item title- Returns:
- Font size of the numbers on the specified chart item or
null
if there is no chart item with the specified title
-
setNumbersFontSize
Sets the font size of the numbers on the first chart item. Default font size: 11 pixels- Parameters:
fontSize
- Title font size in pixels- Returns:
- Chart instance
-
setNumbersFontSize
Sets the font size of the numbers on a chart item. Default font size: 11 pixels- Parameters:
title
- Chart item title If you specify a title that references no chart items, the method does nothing.fontSize
- Title font size in pixels- Returns:
- Chart instance
-
getNumbersFontWeight
Gets the font weight of the numbers on the first chart item.- Returns:
- The font weight of the numbers on the first chart item
-
getNumbersFontWeight
Gets the font weight of the numbers on a chart item.- Parameters:
title
- Chart item title- Returns:
- The font weight of numbers displayed on the chart item with the specified title or
null
if there is no chart item with the specified title
-
setNumbersFontWeight
Sets the font weight of the numbers on the first chart item. Default font weight setting:FontWeight.REGULAR
.- Parameters:
weight
- The font weight to be set Available font weights are listed in the enumFontWeight
. Ifnull
is specified, the title is displayed using the regularFontWeight.REGULAR
setting.- Returns:
- Chart instance
-
setNumbersFontWeight
Sets the font weight of the numbers on a chart item. Default font weight setting:FontWeight.REGULAR
.- Parameters:
title
- Chart item title If a title is specified that is not on the chart, the method does nothing.weight
- The font weight to be set Available font weights are listed in the enumFontWeight
. Ifnull
is specified, the title is displayed using the regularFontWeight.REGULAR
setting.- Returns:
- Chart instance
-
getNumbersFontColor
Gets the color of the numbers on the first chart item.- Returns:
- The color of the numbers on the first chart item
-
getNumbersFontColor
Gets the color of the numbers on a chart item.- Parameters:
title
- Chart item title- Returns:
- Chart item number color or
null
if there is no chart item with the specified title
-
setNumbersFontColor
Sets the first chart item’s number color. Default title color: #666C73- Parameters:
color
- The color to be set (CSS3 standard format)- Returns:
- Chart instance
-
setNumbersFontColor
Sets the color of the numbers on a chart item. Default title color: #666C73- Parameters:
title
- Chart item title If you specify a title that references no chart items, the method does nothing.color
- The color to be set (CSS3 standard format)- Returns:
- Chart instance
-
getPrefix
Gets the prefix of the numbers on the first chart item.- Returns:
- Prefix on the first chart item
-
getPrefix
Gets the prefix of the numbers on a chart item.- Parameters:
title
- Chart item title- Returns:
- Prefix of the numbers on the specified chart item or
null
if there is no chart item is with the specified title
-
setPrefix
Sets the prefix for the numbers displayed on the first chart item.- Parameters:
prefix
- The prefix you want to set- Returns:
- Chart instance
-
setPrefix
Sets the prefix for the numbers on a chart item.- Parameters:
title
- Chart item title If you specify a title that references no chart items, the method does nothing.prefix
- The prefix you want to set- Returns:
- Chart instance
-
getPostfix
Gets the postfix of the numbers on the first chart item.- Returns:
- Postfix on the first chart item
-
getPostfix
Gets the postfix of the numbers on a chart item.- Parameters:
title
- Chart item title- Returns:
- Postfix for the numbers on the specified chart item or
null
if there is no chart item with the specified title
-
setPostfix
Sets the postfix of the numbers on the first chart item.- Parameters:
postfix
- The postfix to be set- Returns:
- Chart instance
-
setPostfix
Sets the postfix of the numbers on the first chart item.- Parameters:
title
- Chart item title If you specify a title that references no chart items, the method does nothing.postfix
- The prefix to be set- Returns:
- Chart instance
-
getHeight
public int getHeight()Gets the height of the first chart item.- Returns:
- The height of the first chart item in pixels
-
getHeight
Gets the height of a chart item.- Parameters:
title
- Chart item title- Returns:
- The height of the specified chart item or
null
if there is no chart item with the specified title
-
setHeight
Sets the height of the first chart item. Default chart item height: 40 pixels.- Parameters:
height
- Chart item height in pixels- Returns:
- Chart instance
-
setHeight
Sets the height of a chart item. Default chart item height: 40 pixels.- Parameters:
title
- Chart item title If you specify a name that references no chart items, the method does nothing.height
- Chart item height in pixels- Returns:
- Chart instance
-
getLowLevelValue
Gets the low range value of the first chart item.- Returns:
- Low range value of the first chart item
-
getLowLevelValue
Gets the low range value of a chart item.- Parameters:
title
- Chart item title- Returns:
- Low range value of the specified chart item or
null
if there is no chart item with the specified title
-
getMediumLevelValue
Gets first chart item’s medium range value.- Returns:
- The first chart item’s medium range value
-
getMediumLevelValue
Gets a chart item’s medium range value.- Parameters:
title
- Chart item title- Returns:
- Medium range value of the specified chart item or
null
if there is no chart item with the specified title
-
getHighLevelValue
Gets the first chart item’s high range value.- Returns:
- The first chart item’s high range value
-
getHighLevelValue
Gets a chart item’s high range value.- Parameters:
title
- Chart item title- Returns:
- High range value of the specified chart item or
null
if there is no chart item with the specified title
-
setLevels
Sets the ranges on the first chart item.- Parameters:
lowLevel
- Low range valuemediumLevel
- Medium range valuehighLevel
- High range value- Returns:
- Chart instance
-
setLevels
Sets the range values on a chart item.- Parameters:
title
- Chart item title If you specify a title that references no chart items, the method does nothing.lowLevel
- Low range valuemediumLevel
- Medium range valuehighLevel
- High range value- Returns:
- Chart instance
-
getCurrentValue
Gets the first chart item’s current value.- Returns:
- The first chart item’s current value
-
getCurrentValue
Gets a chart item’s current value.- Parameters:
title
- Chart item title- Returns:
- The specified chart item’s current value or
null
if there is no chart item with the specified title
-
setCurrentValue
Sets the first chart item’s current value.- Parameters:
value
- Current value- Returns:
- Chart instance
-
setCurrentValue
Sets a chart item’s current value.- Parameters:
title
- Chart item title If you specify a title that references no chart items, the method does nothing.value
- Current value- Returns:
- Chart instance
-
getTargetValue
Gets the first chart item’s target value.- Returns:
- The first chart item’s target value
-
getTargetValue
Gets a chart item’s target value.- Parameters:
title
- Chart item title- Returns:
- The target value of a specified chart item or
null
if there is no chart item with the specified title
-
setTargetValue
Sets the first chart item’s target value.- Parameters:
value
- Target value- Returns:
- Chart instance
-
setTargetValue
Sets a chart item’s target value.- Parameters:
title
- Chart item title If you specify a title that references no chart items, the method does nothing.value
- Target value- Returns:
- Chart instance
-
getMarkerColor
Gets the first chart item’s target value marker color.- Returns:
- The first chart item’s target value marker color
-
getMarkerColor
Gets a chart item’s target value marker color.- Parameters:
title
- Chart item title- Returns:
- Target marker color for the chart item with the specified title or
null
if there is no chart item with the specified title
-
setMarkerColor
Sets the first chart item’s target value marker color.- Parameters:
color
- The marker color as defined by the CSS3 standard- Returns:
- Chart instance
-
setMarkerColor
Sets a chart item’s target value marker color.- Parameters:
title
- Chart item title If you specify a title that references no chart items, the method does nothing.color
- The marker color as defined by the CSS3 standard- Returns:
- Chart instance
-
getMarkerWidth
Gets the first chart item’s target value marker width.- Returns:
- Target value marker width
-
getMarkerWidth
Gets a chart item’s target value marker width.- Parameters:
title
- Chart item title- Returns:
- The specified chart item’s marker width or
null
if there is no chart item with the specified title
-
setMarkerWidth
Sets the first chart item’s target value marker width.- Parameters:
width
- Marker width Ifnull
is passed, the width is set to 0 px.- Returns:
- Chart instance
-
setMarkerWidth
Sets a chart item’s target value marker width.- Parameters:
title
- Chart item title If you specify a chart item title that is not included in the chart, the method does nothing.width
- Marker width Ifnull
is passed, the width is set to 0 px.- Returns:
- Chart instance
-
getTicksColor
Gets the first chart item’s tick color.- Returns:
- The first chart item’s tick color
-
getTicksColor
Gets the chart item tick color.- Parameters:
title
- Chart item name- Returns:
- Tick color of the specified chart item or
null
if there is no chart item with the specified name
-
setTicksColor
Sets the first chart item’s tick color.- Parameters:
color
- Tick color as defined in the CSS3 standard- Returns:
- Chart instance
-
setTicksColor
Sets a chart item’s tick color.- Parameters:
title
- Chart item title If a title is specified that is not on the chart, the method does nothing.color
- Tick color as defined in the CSS3 standard- Returns:
- Chart instance
-
getTicksWidth
Gets the first chart item’s tick width.- Returns:
- The first chart item’s tick width
-
getTicksWidth
Gets a chart item’s tick width.- Parameters:
title
- Chart item name- Returns:
- Tick width on the specified chart item or
null
if there is no chart item with the specified name
-
setTicksWidth
Sets the first chart item’s tick width.- Parameters:
width
- Tick width- Returns:
- Chart instance
-
setTicksWidth
Sets a chart item’s tick width.- Parameters:
title
- Chart item title If you specify a title that references no chart items, the method does nothing.width
- Tick width- Returns:
- Chart instance
-
getLowLevelColor
Gets the first chart item’s low level color.- Returns:
- The first chart item’s low level color
-
getLowLevelColor
Gets the low level marker color from a chart item.- Parameters:
title
- Chart item title- Returns:
- The low level marker color on a chart item with the specified title or
null
if there is no chart item on the chart with the specified title
-
getMediumLevelColor
Gets the medium level marker color from the first chart item.- Returns:
- The medium level marker color on the first chart item
-
getMediumLevelColor
Gets the medium level marker color on the chart item.- Parameters:
title
- Chart item title- Returns:
- The medium level marker color on the chart item with the specified title or
null
if there is no chart item on the chart with the specified title
-
getHighLevelColor
Gets the high level marker color on the first chart item.- Returns:
- The high level marker color on the first chart item
-
getHighLevelColor
Gets the high level marker color on a chart item.- Parameters:
title
- Chart item title- Returns:
- The high level marker color on the chart item with the specified title or
null
if there is no chart item on the chart with the specified title
-
setLevelColors
Sets the color of the ranges on the first chart.- Parameters:
lowLevel
- The low level marker color as defined in the CSS3 standardmediumLevel
- The medium level marker color as defined in the CSS3 standardhighLevel
- The high level marker color as defined in the CSS3 standard- Returns:
- Chart instance
-
setLevelColors
public BulletChart setLevelColors(String title, String lowLevel, String mediumLevel, String highLevel) Sets the chart range colors.- Parameters:
title
- Chart item title If you specify a chart item title that is not included in the chart, the method does nothing.lowLevel
- The low level marker color as defined in the CSS3 standardmediumLevel
- The medium level marker color as defined in the CSS3 standardhighLevel
- The high level marker color as defined in the CSS3 standard- Returns:
- Chart instance
-
getCurrentValueColor
Gets the first chart item’s current value color.- Returns:
- The first chart item’s current value color.
-
getCurrentValueColor
Gets the current color of a chart item.- Parameters:
title
- Chart item title- Returns:
- The specified chart item’s current color or
null
if there is no chart item with the specified title
-
setCurrentValueColor
Sets the color of the first chart item’s current value.- Parameters:
color
- The color to be set as defined in the CSS3 standard- Returns:
- Chart instance
-
setCurrentValueColor
Sets the color for a chart item’s current value.- Parameters:
title
- Chart item title If you specify a chart item title that is not included in the chart, the method does nothing.color
- The color to be set as defined in the CSS3 standard- Returns:
- Chart instance
-
addElement
Creates a new chart item on the chart- Parameters:
title
- Chart item title The specified title must be unique within the chart.- Returns:
- Chart instance
- Throws:
IllegalArgumentException
- This exception is thrown if you specify a title that is no longer on the chart
-
removeElement
Deletes a chart item from the chart by its name.- Parameters:
title
- Chart item title If a title that is not included in the chart is specified, the method does nothing.- Returns:
- Chart instance
-