Class BulletChart

java.lang.Object
com.jbstrap.ui.components.charts.BaseChart<BulletChart>
com.jbstrap.ui.components.charts.BulletChart
All Implemented Interfaces:
ClickableChartData<BulletChart>

public class BulletChart extends BaseChart<BulletChart> implements 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 Details

  • Constructor Details

    • BulletChart

      public BulletChart(String name, String... titles)
      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 is null
      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 class BaseChart<BulletChart>
    • getTitleFont

      protected Parameters getTitleFont(String title)
      Parameters:
      title - Chart item title If null 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

      protected Parameters getSubTitleFont(String title)
      Parameters:
      title - Chart item title If null 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

      protected Parameters getNumbersFont(String title)
      Parameters:
      title - Chart item title If null 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

      protected Parameters getStyle(String title)
      Parameters:
      title - Chart item title If null is specified, the method returns the style settings for the first chart item.
      Returns:
      Chart item style settings in a parameter class
    • getMarker

      protected Parameters getMarker(String title)
      Parameters:
      title - Chart item title If null 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

      protected Parameters getTick(String title)
      Parameters:
      title - Chart item title If null is specified, the method returns settings for the first chart item.
      Returns:
      Parameter class containing the tick settings for the specified chart item
    • getTitles

      public List<String> getTitles()
      Gets the name of all chart items on the chart.
      Returns:
      A list of all chart item names
    • getTitle

      public String getTitle()
      Gets the name of the first chart item on the chart.
      Returns:
      The name of the first chart item
    • setTitle

      public BulletChart setTitle(String title)
      Modifies the name of the first chart item.
      Parameters:
      title - Chart item title
      Returns:
      Chart instance
    • setTitle

      public BulletChart setTitle(String oldTitle, String title)
      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

      public String getSubTitle()
      Gets the subtitle of the first chart item.
      Returns:
      The subtitle of the first chart item
    • getSubTitle

      public String getSubTitle(String title)
      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

      public BulletChart setSubTitle(String subTitle)
      Modifies the title of the first chart item.
      Parameters:
      subTitle - The first chart item’s new subtitle
      Returns:
      Chart instance
    • setSubTitle

      public BulletChart setSubTitle(String title, String subTitle)
      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

      public String getTitleFontFamily()
      Gets the font of the first chart item’s title.
      Returns:
      The font of the first chart item’s title
    • getTitleFontFamily

      public String getTitleFontFamily(String title)
      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

      public BulletChart setTitleFontFamily(String fontFamily)
      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

      public BulletChart setTitleFontFamily(String title, String fontFamily)
      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

      public int getTitleFontSize(String title)
      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

      public BulletChart setTitleFontSize(int fontSize)
      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

      public BulletChart setTitleFontSize(String title, int fontSize)
      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

      public FontWeight getTitleFontWeight()
      Gets the first chart item’s title font weight.
      Returns:
      The first chart item’s title font weight
    • getTitleFontWeight

      public FontWeight getTitleFontWeight(String title)
      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

      public BulletChart setTitleFontWeight(FontWeight weight)
      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 enum FontWeight. If null is specified, the title is displayed using the regular FontWeight.REGULAR setting.
      Returns:
      Chart instance
    • setTitleFontWeight

      public BulletChart setTitleFontWeight(String title, FontWeight weight)
      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 enum FontWeight. If null is specified, the title is displayed using the regular FontWeight.REGULAR setting.
      Returns:
      Chart instance
    • getTitleFontColor

      public String getTitleFontColor()
      Gets the color of the first chart item’s title.
      Returns:
      The color of the first chart item’s title
    • getTitleFontColor

      public String getTitleFontColor(String title)
      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

      public BulletChart setTitleFontColor(String color)
      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

      public BulletChart setTitleFontColor(String title, String color)
      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

      public String getSubTitleFontFamily()
      Gets the font of the first chart item’s subtitle.
      Returns:
      The font of the first chart item’s subtitle
    • getSubTitleFontFamily

      public String getSubTitleFontFamily(String title)
      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

      public BulletChart setSubTitleFontFamily(String fontFamily)
      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

      public BulletChart setSubTitleFontFamily(String title, String fontFamily)
      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

      public int getSubTitleFontSize(String title)
      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

      public BulletChart setSubTitleFontSize(int fontSize)
      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

      public BulletChart setSubTitleFontSize(String title, int fontSize)
      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

      public FontWeight getSubTitleFontWeight()
      Gets the font weight of the first chart item’s subtitle.
      Returns:
      The first chart item’s subtitle font weight
    • getSubTitleFontWeight

      public FontWeight getSubTitleFontWeight(String title)
      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

      public BulletChart setSubTitleFontWeight(FontWeight weight)
      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 enum FontWeight. If null is specified, the subtitle is displayed using the regular FontWeight.REGULAR setting.
      Returns:
      Chart instance
    • setSubTitleFontWeight

      public BulletChart setSubTitleFontWeight(String title, FontWeight weight)
      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 enum FontWeight. If null is specified, the subtitle is displayed using the regular FontWeight.REGULAR setting.
      Returns:
      Chart instance
    • getSubTitleFontColor

      public String getSubTitleFontColor()
      Gets the first chart item’s subtitle color.
      Returns:
      The first chart item’s subtitle color
    • getSubTitleFontColor

      public String getSubTitleFontColor(String title)
      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

      public BulletChart setSubTitleFontColor(String color)
      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

      public BulletChart setSubTitleFontColor(String title, String color)
      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

      public String getNumbersFontFamily()
      Gets the font of the numbers on the first chart item.
      Returns:
      Number font on the first chart item
    • getNumbersFontFamily

      public String getNumbersFontFamily(String title)
      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

      public BulletChart setNumbersFontFamily(String fontFamily)
      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

      public BulletChart setNumbersFontFamily(String title, String fontFamily)
      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

      public int getNumbersFontSize(String title)
      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

      public BulletChart setNumbersFontSize(int fontSize)
      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

      public BulletChart setNumbersFontSize(String title, int fontSize)
      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

      public FontWeight 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

      public FontWeight getNumbersFontWeight(String title)
      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

      public BulletChart setNumbersFontWeight(FontWeight weight)
      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 enum FontWeight. If null is specified, the title is displayed using the regular FontWeight.REGULAR setting.
      Returns:
      Chart instance
    • setNumbersFontWeight

      public BulletChart setNumbersFontWeight(String title, FontWeight weight)
      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 enum FontWeight. If null is specified, the title is displayed using the regular FontWeight.REGULAR setting.
      Returns:
      Chart instance
    • getNumbersFontColor

      public String getNumbersFontColor()
      Gets the color of the numbers on the first chart item.
      Returns:
      The color of the numbers on the first chart item
    • getNumbersFontColor

      public String getNumbersFontColor(String title)
      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

      public BulletChart setNumbersFontColor(String color)
      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

      public BulletChart setNumbersFontColor(String title, String color)
      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

      public String getPrefix()
      Gets the prefix of the numbers on the first chart item.
      Returns:
      Prefix on the first chart item
    • getPrefix

      public String getPrefix(String title)
      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

      public BulletChart setPrefix(String prefix)
      Sets the prefix for the numbers displayed on the first chart item.
      Parameters:
      prefix - The prefix you want to set
      Returns:
      Chart instance
    • setPrefix

      public BulletChart setPrefix(String title, String prefix)
      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

      public String getPostfix()
      Gets the postfix of the numbers on the first chart item.
      Returns:
      Postfix on the first chart item
    • getPostfix

      public String getPostfix(String title)
      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

      public BulletChart setPostfix(String postfix)
      Sets the postfix of the numbers on the first chart item.
      Parameters:
      postfix - The postfix to be set
      Returns:
      Chart instance
    • setPostfix

      public BulletChart setPostfix(String title, String postfix)
      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

      public int getHeight(String title)
      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

      public BulletChart setHeight(int height)
      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

      public BulletChart setHeight(String title, int height)
      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

      public Long getLowLevelValue()
      Gets the low range value of the first chart item.
      Returns:
      Low range value of the first chart item
    • getLowLevelValue

      public Long getLowLevelValue(String title)
      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

      public Long getMediumLevelValue()
      Gets first chart item’s medium range value.
      Returns:
      The first chart item’s medium range value
    • getMediumLevelValue

      public Long getMediumLevelValue(String title)
      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

      public Long getHighLevelValue()
      Gets the first chart item’s high range value.
      Returns:
      The first chart item’s high range value
    • getHighLevelValue

      public Long getHighLevelValue(String title)
      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

      public BulletChart setLevels(Long lowLevel, Long mediumLevel, Long highLevel)
      Sets the ranges on the first chart item.
      Parameters:
      lowLevel - Low range value
      mediumLevel - Medium range value
      highLevel - High range value
      Returns:
      Chart instance
    • setLevels

      public BulletChart setLevels(String title, Long lowLevel, Long mediumLevel, Long highLevel)
      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 value
      mediumLevel - Medium range value
      highLevel - High range value
      Returns:
      Chart instance
    • getCurrentValue

      public Long getCurrentValue()
      Gets the first chart item’s current value.
      Returns:
      The first chart item’s current value
    • getCurrentValue

      public Long getCurrentValue(String title)
      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

      public BulletChart setCurrentValue(Long value)
      Sets the first chart item’s current value.
      Parameters:
      value - Current value
      Returns:
      Chart instance
    • setCurrentValue

      public BulletChart setCurrentValue(String title, Long value)
      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

      public Long getTargetValue()
      Gets the first chart item’s target value.
      Returns:
      The first chart item’s target value
    • getTargetValue

      public Long getTargetValue(String title)
      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

      public BulletChart setTargetValue(Long value)
      Sets the first chart item’s target value.
      Parameters:
      value - Target value
      Returns:
      Chart instance
    • setTargetValue

      public BulletChart setTargetValue(String title, Long value)
      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

      public String getMarkerColor()
      Gets the first chart item’s target value marker color.
      Returns:
      The first chart item’s target value marker color
    • getMarkerColor

      public String getMarkerColor(String title)
      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

      public BulletChart setMarkerColor(String color)
      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

      public BulletChart setMarkerColor(String title, String color)
      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

      public Integer getMarkerWidth()
      Gets the first chart item’s target value marker width.
      Returns:
      Target value marker width
    • getMarkerWidth

      public Integer getMarkerWidth(String title)
      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

      public BulletChart setMarkerWidth(Integer width)
      Sets the first chart item’s target value marker width.
      Parameters:
      width - Marker width If null is passed, the width is set to 0 px.
      Returns:
      Chart instance
    • setMarkerWidth

      public BulletChart setMarkerWidth(String title, Integer width)
      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 If null is passed, the width is set to 0 px.
      Returns:
      Chart instance
    • getTicksColor

      public String getTicksColor()
      Gets the first chart item’s tick color.
      Returns:
      The first chart item’s tick color
    • getTicksColor

      public String getTicksColor(String title)
      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

      public BulletChart setTicksColor(String color)
      Sets the first chart item’s tick color.
      Parameters:
      color - Tick color as defined in the CSS3 standard
      Returns:
      Chart instance
    • setTicksColor

      public BulletChart setTicksColor(String title, String color)
      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

      public Integer getTicksWidth()
      Gets the first chart item’s tick width.
      Returns:
      The first chart item’s tick width
    • getTicksWidth

      public Integer getTicksWidth(String title)
      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

      public BulletChart setTicksWidth(Integer width)
      Sets the first chart item’s tick width.
      Parameters:
      width - Tick width
      Returns:
      Chart instance
    • setTicksWidth

      public BulletChart setTicksWidth(String title, Integer width)
      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

      public String getLowLevelColor()
      Gets the first chart item’s low level color.
      Returns:
      The first chart item’s low level color
    • getLowLevelColor

      public String getLowLevelColor(String title)
      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

      public String getMediumLevelColor()
      Gets the medium level marker color from the first chart item.
      Returns:
      The medium level marker color on the first chart item
    • getMediumLevelColor

      public String getMediumLevelColor(String title)
      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

      public String getHighLevelColor()
      Gets the high level marker color on the first chart item.
      Returns:
      The high level marker color on the first chart item
    • getHighLevelColor

      public String getHighLevelColor(String title)
      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

      public BulletChart setLevelColors(String lowLevel, String mediumLevel, String highLevel)
      Sets the color of the ranges on the first chart.
      Parameters:
      lowLevel - The low level marker color as defined in the CSS3 standard
      mediumLevel - The medium level marker color as defined in the CSS3 standard
      highLevel - 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 standard
      mediumLevel - The medium level marker color as defined in the CSS3 standard
      highLevel - The high level marker color as defined in the CSS3 standard
      Returns:
      Chart instance
    • getCurrentValueColor

      public String getCurrentValueColor()
      Gets the first chart item’s current value color.
      Returns:
      The first chart item’s current value color.
    • getCurrentValueColor

      public String getCurrentValueColor(String title)
      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

      public BulletChart setCurrentValueColor(String color)
      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

      public BulletChart setCurrentValueColor(String title, String color)
      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

      public BulletChart addElement(String title)
      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

      public BulletChart removeElement(String title)
      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