ALIAS: hbullet
Example of Horizontal Bullet Chart:
JavaScript embedding code:
<script type="text/javascript"> FusionCharts.ready(function(){ var myChart = new FusionCharts({ "type": "hbullet", "dataFormat": "jsonurl", "dataSource": "chartdata.json" }); }); </script>
Data for this chart:
Chart Attributes
Functional Attributes
You can control a variety of functional elements on the chart. For example, you can opt to show/hide data labels, data values, y-axis values. You can also set chart limits and extended properties.
These attributes let you control the functional properties in a horizontal bullet chart.
Name | Type | Range | Description |
---|---|---|---|
animation |
Boolean | 0/1 | This attribute lets you set the configuration whether the chart should appear in an animated fashion. If you do not want to animate any part of the chart, set this as 0. |
clickURL |
URL in FusionCharts format | The entire chart can now act as a hotspot. Use this URL to define the hotspot link for the chart. The link can be specified in FusionCharts Link Format. | |
palette |
Number | 1-5 | Each chart has 5 pre-defined color palettes which you can choose from. Each palette renders the chart in a different color theme. |
paletteThemeColor |
Color Code | Hex Code | If you want your own palette derived from a particular hex color, you can specify the same here. All other colors on the chart will automatically derive from that palette. |
annRenderDelay |
Number | In seconds | If you've defined any annotation groups over the chart, using this attribute you can set the duration after which they'll render on the chart. The timer starts from the time the chart has initialized. |
showPrintMenuItem |
Boolean | 0/1 | Whether to show "Print Chart" item in the context menu of the chart? Even if you opt to hide the item in context menu, you can still opt to invoke `print()` JavaScript method of the chart to print the same. |
manageResize Since 3.2 |
Boolean | 0/1 | Setting this attribute to 1, you can allow the chart to automatically resize itself when the parent container of the chart is resized. |
Axis and Tick Mark Properties
These attributes let you configure the Axis & Tick mark properties.
Name | Type | Range | Description |
---|---|---|---|
setAdaptiveYMin |
Boolean | 0/1 | This attribute lets you set whether the y-axis lower limit will be 0 (in case of all positive values on chart) or should the y-axis lower limit adapt itself to a different figure based on values provided to the chart. |
upperLimit |
Number | This attribute helps you explicitly set the upper limit of the chart. If you don't specify this value, the chart automatically calculates the lower limit based on the data provided by you. | |
lowerLimit |
Number | This attribute helps you explicitly set the lower limit of the chart. If you don't specify this value, the chart automatically calculates the upper limit based on the data provided by you. | |
upperLimitDisplay |
String | If you want to display a string label instead of the chart upper limit, you can use this attribute. | |
lowerLimitDisplay |
String | If you want to display a string label instead of the chart lower limit, you can use this attribute. | |
showTickMarks |
Boolean | 0/1 | Whether to show tick marks? |
showTickValues |
Boolean | 0/1 | Whether to show tick values? |
showLimits |
Boolean | 0/1 | Whether to show limit values (chart upper and lower limit)? |
ticksBelowGraph |
Boolean | 0/1 | Whether tick marks & values will appear under the graph or above it? |
tickValueStep |
Number | If you want to skip showing every n-th tick value, you can specify it here. | |
majorTMNumber |
Number | Number of major tick marks displayed on the chart. The tick marks of the upper and lower limit will always be displayed. | |
majorTMColor |
Color Code | Hex Code | Color of the major tick marks. |
majorTMAlpha |
Number | 0-100 | Alpha of the major tick marks. |
majorTMHeight |
Number | In pixels | Height of the major tick marks. |
majorTMThickness |
Number | In pixels | Thickness of the major tick marks. |
minorTMNumber |
Number | Number of minor tick marks. Minor tick marks refer to the tick marks present in between two major tick marks. | |
minorTMColor |
Color Code | Hex Code | Color of minor tick marks. |
minorTMAlpha |
Number | 0-100 | Alpha of minor tick marks. |
minorTMHeight |
Number | In pixels | Height of minor tick marks. |
minorTMThickness |
Number | In pixels | Thickness of minor tick marks. |
tickMarkDistance |
Number | In pixels | Distance of tick mark from the color range. |
tickValueDistance |
Number | In pixels | Distance of tick value from tick marks/color range. |
adjustTM |
Boolean | 0/1 | Whether to automatically adjust number of major tick marks, so as to get best values? |
Chart Captions
These attributes let you configure chart captions.
Name | Type | Description |
---|---|---|
caption |
String | Caption of the chart. |
subCaption |
String | Sub-caption of the chart. |
Chart Caption Cosmetics
These attributes let you configure the cosmetics of chart caption and sub-caption.
Name | Type | Range | Description |
---|---|---|---|
captionFontSize |
Number | 0 - 72 | Sets the caption font size in pixels |
subCaptionFontSize |
Number | 0 - 72 | Sets the sub-caption font size (in pixels) |
captionFont |
String | Font Name | Sets the caption font family |
subCaptionFont |
String | Font Name | Sets the sub-caption font family |
captionFontColor |
Color | Hex Code | Sets the caption font color |
subCaptionFontColor |
Color | Hex Code | Sets the sub-caption font color |
captionFontBold |
Boolean | 0/1 | Whether the caption font should be displayed in bold |
subCaptionFontBold |
Boolean | 0/1 | Whether the sub caption font should be displayed in bold |
alignCaptionWithCanvas |
Boolean | 0/1 | Whether the caption is aligned with the canvas. Else, it will be aligned with the entire chart area |
Number Formatting Properties
FusionCharts XT offers you a lot of options to format your numbers on the chart.
Using the attributes below, you can control a myriad of options like:
- Formatting of commas and decimals
- Number prefixes and suffixes
- Decimal places to which the numbers will round to
- Scaling of numbers based on a user defined scale
- Custom number input formats
These attributes let you appropriately format the numbers displayed on the chart.
Name | Type | Range | Description |
---|---|---|---|
formatNumber |
Boolean | 0/1 | This configuration determines whether the numbers displayed on the chart will be formatted using commas, e.g., 40,000 if `"formatNumber":"1"` and 40000 if `"formatNumber":"0"`. |
numberPrefix |
String | Using this attribute, you could add prefix to all the numbers visible on the graph. For example, to represent all dollars figure on the chart, you could specify this attribute to ' $' to show like $40000, $50000. | |
numberSuffix |
String | Using this attribute, you could add suffix to all the numbers visible on the graph. For example, to represent all figures quantified as per annum on the chart, you could specify this attribute to ' /a' to show like 40000/a, 50000/a. | |
decimals |
Number | Number of decimal places to which all numbers on the chart will be rounded to. | |
forceDecimals |
Boolean | 0/1 | Whether to add 0 padding at the end of decimal numbers? For example, if you set decimals as 2 and a number is 23.4. If `forceDecimals` is set to 1, the number will automatically be converted to 23.40 (note the extra 0 at the end). |
formatNumberScale |
Boolean | 0/1 | Configuration whether to add K (thousands) and M (millions) to a number after truncating and rounding it - e.g., if `formatNumberScale` is set to 1, 1043 will become 1.04K (with decimals set to 2 places). Same with numbers in millions - an M will be added at the end. |
defaultNumberScale |
String | The default unit of the numbers that you're providing to the chart. | |
numberScaleUnit |
String | Unit of each block of the scale. | |
numberScaleValue |
String | Range of the various blocks that constitute the scale. | |
scaleRecursively |
Boolean | 0/1 | Whether recursive scaling should be applied. |
maxScaleRecursion |
Number | How many recursions to complete during recursive scaling? -1 completes the entire set of recursion. | |
scaleSeparator |
String | What character to use to separate the scales that are generated after recursion? | |
decimalSeparator |
String | This attribute helps you specify the character to be used as the decimal separator in a number. | |
thousandSeparator |
String | This attribute helps you specify the character to be used as the thousands separator in a number. | |
thousandSeparatorPosition Since 3.2 - SR1 |
Number | This option helps you specify the position of the thousand separator. | |
inDecimalSeparator |
String | In some countries, commas are used as decimal separators and dots as thousand separators. In XML/JSON, if you specify such values, it will give an error while converting to number. The chart accepts the input decimal and thousand separators from user, so that it can convert it accordingly into the required format. This attribute lets you input the decimal separators. | |
inThousandSeparator |
String | In some countries, commas are used as decimal separators and dots as thousand separators. In XML/JSON, if you specify such values, it will give an error while converting to number. The chart accepts the input decimal and thousand separators from user, so that it can convert it accordingly into the required format. This attribute lets you input the thousand separators. |
Data Plot Properties
Various other controls over plot cosmetics can be attained using this set of attributes.If the plots can show borders, you can control the border properties using the attributes listed below. Or, if they support gradient fills, you can again configure various properties of the gradient using these attributes.
These attributes let you configure how your plot (columns, lines, area, pie or any data that you're plotting) will appear on the chart.
Name | Type | Range | Description |
---|---|---|---|
showValue |
Boolean | 0/1 | Whether to show the value for the chart? |
plotAsDot |
Boolean | 0/1 | Whether to plot the value as bar or as dot? |
plotFillPercent |
Number | 0-100 | Width percent of the color range that the plot fill bar should occupy. |
targetFillPercent |
Number | 0-100 | Width percent of the color range that the target fill bar should occupy. |
plotFillColor |
Color Code | Hex Code | Fill color for the plot bar. |
plotFillAlpha |
Number | 0-100 | Fill alpha for the plot bar. |
showPlotBorder |
Boolean | 0/1 | Whether to show border for the bar? |
plotBorderColor |
Color Code | Hex Code | Border color for the bar. |
plotBorderThickness |
Number | In pixels | Border thickness for the bar. |
plotBorderAlpha |
Number | 0-100 | Border alpha for the bar. |
targetColor |
Color Code | Hex Code | Color for the target line. |
targetThickness |
Number | In pixels | Thickness for the target line. |
Color Range properties
The <colorRange> element lets you define numeric ranges or categories and the colors associated with the numeric ranges.
These attributes let you configure the <colorRange> element.
Name | Type | Range | Description |
---|---|---|---|
colorRangeFillMix |
String | Gradient fill formula for color range. | |
colorRangeFillRatio |
Numbers separated by comma | Ratio for each constituent color in the color range. | |
showColorRangeBorder |
Boolean | 0/1 | Whether to show border for color range? |
colorRangeBorderColor |
Color Code | Hex Code | Border color for the color range. |
colorRangeBorderThickness |
Number | In pixels | Border thickness for the color range. |
colorRangeBorderAlpha |
Number | 0-100 | Border alpha for the color range. |
showShadow |
Boolean | 0/1 | Whether to apply the shadow effect for color range? |
Chart Cosmetics
These attributes let you configure chart cosmetics like background color, background alpha, canvas color & alpha etc.
Name | Type | Range | Description |
---|---|---|---|
bgColor |
Color Code | Hex Code | This attribute sets the background color for the chart. You can set any hex color code as the value of this attribute. To specify a gradient as background color, separate the hex color codes of each color in the gradient using comma. Example: `#FF5904, #FFFFFF`. |
bgAlpha |
Number | 0-100 | Sets the alpha (transparency) for the background. If you've opted for gradient background, you need to set a list of alpha(s) separated by comma. |
bgRatio |
Numbers separated by comma | If you've opted for a gradient background, this attribute lets you set the ratio of each color constituent. | |
bgAngle |
Number | 0-360 | Angle of the background color, in case of a gradient. |
showBorder |
Boolean | 0/1 | Whether to show a border around the chart or not? |
borderColor |
Color Code | Hex Code | Border color of the chart. |
borderThickness |
Number | In pixels | Border thickness of the chart. |
borderAlpha |
Number | 0-100 | Border alpha of the chart. |
bgImage |
String | To place any image (JPG/PNG/GIF) as background of the chart, enter the (path and) name of the background image. It should be in the same domain as the chart. | |
bgImageAlpha |
Number | 0-100 | This attribute specifies the opacity for the loaded background image. |
bgImageDisplayMode Since 3.2 |
String | 'stretch', 'tile', 'fit', 'fill', 'center', 'none' | Helps you specify the mode in which the background image is to be displayed. Stretch - expands the image to fit the entire chart area, without maintaining original image constraints. Tile - the image is repeated as a pattern on the entire chart area. Fit - fits the image proportionately on the chart area. Fill -proportionately fills the entire chart area with the image. Center - the image is positioned at the center of the chart area. None - Default mode. |
bgImageVAlign Since 3.2 |
String | 'top', 'middle', 'bottom' | Helps you to vertically align the background image. |
bgImageHAlign Since 3.2 |
String | 'left', 'middle', 'right' | Helps you to horizontally align the background image. |
bgImageScale Since 3.2 |
Number | 0-300 | Helps you magnify the background image. This attribute will only work when the attribute `bgImageDisplayMode` is set to none, center, or tile. |
logoURL |
String | You can load an external logo (JPEG/PNG) to your chart, this attribute lets you specify the URL. Due to cross domain security restrictions it is advised to use a logo from the same domain name as your charts. | |
logoPosition |
String | 'TL', 'TR', 'BL', 'BR', 'CC' | Where to position the logo on the chart: TL - Top-left TR - Top-right BR - Bottom right BL - Bottom left CC - Center of screen |
logoAlpha |
Number | 0-100 | Once the logo has loaded on the chart, you can configure its opacity using this attribute. |
logoScale |
Number | 0-100 | You can also change the size of externally loaded logo at run-time by specifying a value for this parameter. |
logoLink |
String | If you want to link the logo to an external URL, specify the link in this attribute. The link can be in FusionCharts link format, allowing you to link to new windows, pop-ups, frames etc. |
Font Properties
These attributes let you define the generic font properties for all the text on the chart, allowing you a high level control over font properties.
Name | Type | Range | Description |
---|---|---|---|
baseFont |
Font Name | This attribute lets you set the font face (family) of all the text (data labels, values etc.) on chart. If you specify outCnvBaseFont attribute also, then this attribute controls only the font face of text within the chart canvas bounds. | |
baseFontSize |
Number | This attribute sets the base font size of the chart i.e., all the values and the names in the chart which lie on the canvas will be displayed using the font size provided here. | |
baseFontColor |
Color Code | Hex Code | This attribute sets the base font color of the chart i.e., all the values and the names in the chart which lie on the canvas will be displayed using the font color provided here. |
Tool-tip Properties
These attributes let you configure tool-tip properties.
Name | Type | Range | Description |
---|---|---|---|
showToolTip |
Boolean | 0/1 | Whether to show tooltip for the chart? |
toolTipBgColor |
Color Code | Hex Code | Background color for the tooltip |
toolTipColor |
Color Code | Hex Code | Font color for the tool-tip. |
toolTipBorderColor |
Color Code | Hex Code | Border Color for the tooltip. |
showToolTipShadow |
Boolean | 0/1 | Whether to show shadow for tooltips. |
Chart Padding & Margins
FusionWidgets XT allows you to manually customize the padding of various elements on the chart to allow advanced manipulation and control over chart visualization. Padding in FusionWidgets XT is always defined in pixels, unless the attribute itself suggests some other scale (like plotSpacePercent
).
You can also define the chart margins. Chart margins refer to the empty space left on the top, bottom, left, and right of the chart. That means, FusionWidgets XT will not plot anything in that space.
It is not necessary for you to specify any padding/margin values. FusionWidgets XT automatically assumes the best values for the same.
These attributes let you configure the functional and cosmetic properties of chart paddings and margins.
Name | Type | Range | Description |
---|---|---|---|
captionPadding |
Number | In pixels | This attribute lets you control the horizontal space (in pixels) between the caption and left side of chart canvas. |
valuePadding |
Number | In pixels | Distance between the value box and chart canvas. |
chartLeftMargin |
Number | In pixels | Amount of empty space that you want to put on the left side of your chart. Nothing is rendered in this space. |
chartRightMargin |
Number | In pixels | Amount of empty space that you want to put on the right side of your chart. Nothing is rendered in this space. |
chartTopMargin |
Number | In pixels | Amount of empty space that you want to put on the top of your chart. Nothing is rendered in this space. |
chartBottomMargin |
Number | In pixels | Amount of empty space that you want to put at the bottom of your chart. Nothing is rendered in this space. |