Quick Links (within this page) |
Spark Line chart looks as under: |
![]() |
Sample XML / JSON for SparkLine chart: |
<chart palette="2" caption="Cisco" setAdaptiveYMin="1"> { "chart": { "palette": "2", "caption": "Cisco", "setadaptiveymin": "1" }, "dataset": [ { "data": [ { "value": "27.26" }, { "value": "37.88" }, { "value": "38.88" }, { "value": "22.9" }, { "value": "39.02" }, { "value": "23.31" }, { "value": "30.85" }, { "value": "27.01" }, { "value": "33.2" }, { "value": "21.93" }, { "value": "34.51" }, { "value": "24.84" }, { "value": "39.32" }, { "value": "37.04" }, { "value": "27.81" }, { "value": "22.95" }, { "value": "24.73" }, { "value": "37.63" }, { "value": "29.75" }, { "value": "22.35" }, { "value": "34.35" }, { "value": "27.6" }, { "value": "27.97" }, { "value": "32.36" }, { "value": "22.56" }, { "value": "24.15" }, { "value": "24.93" }, { "value": "35.82" }, { "value": "23.45" }, { "value": "37.64" }, { "value": "26.99" }, { "value": "29.48" }, { "value": "36.63" }, { "value": "35.58" }, { "value": "32.19" }, { "value": "27.59" }, { "value": "26.94" }, { "value": "32.35" }, { "value": "22.63" }, { "value": "25.97" }, { "value": "25.28" }, { "value": "26.73" }, { "value": "23.47" }, { "value": "20.55" }, { "value": "34.58" }, { "value": "29.16" }, { "value": "34.97" }, { "value": "24.57" }, { "value": "20.7" }, { "value": "32.61" } ] } ] } |
Back to top ![]() |
Chart Objects | |||
Custom defined Styles can be applied to the chart objects listed below. The table contains the names of the chart objects, short descriptions, list of supported Styles and list of supported animation parameters. |
Object Name | Description | Features Supported | Animation Parameters Supported |
BACKGROUND | Background refers to the background for entire chart. |
|
|
CAPTION | Caption of the chart. |
|
|
SUBCAPTION | Sub-caption of the chart. |
|
|
PLOT | Line plot on the chart |
|
|
ANCHORS | Anchors on the chart. |
|
|
OPENVALUE | Textbox showing opening value. |
|
|
CLOSEVALUE | Textbox showing closing value. |
|
|
HIGHLOWVALUE | Textbox showing high value & low value. |
|
|
TRENDLINES | Trend lines, if any defined. |
|
|
Back to top ![]() |
<chart> element |
Functional Attributes |
These attributes let you 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. |
Attribute Name | Type | 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. | |
defaultAnimation | Boolean (0/1) | By default, each chart animates some of its elements. If you wish to switch off the default animation patterns, you can set this attribute to 0. It can be particularly useful when you want to define your own animation patterns using the Styles feature. | |
connectNullData | Boolean (0/1) | This attributes lets you control whether empty datasets in your data will be connected to each other OR will they appear as broken datasets? | |
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. | |
yAxisMinValue | Number | This attribute helps you explicitly set the lower limit of the chart. If you don't specify this value explicitly, the chart automatically calculates the lower limit based on the data provided by you. | |
yAxisMaxValue | Number | This attribute helps you explicitly set the upper limit of the chart. If you don't specify this value explicitly, the chart automatically calculates the upper limit based on the data provided by you. | |
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. Valid values are 1-5. | |
paletteThemeColor | Color 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 (seconds) | If you've defined any annotation groups over 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. | |
showAboutMenuItem | Boolean (0/1) | Setting this to 1 displays a custom context menu in the chart; this can be customized to show your text and can be linked to your URL. For e.g., you can set the context menu of the chart to include "About your company name" and then link to your company home page. By default, the chart shows "About FusionCharts" when right clicked. | |
aboutMenuItemLabel | String | The menu item label for the custom context menu item. | |
aboutMenuItemLink | String | Link for the custom context menu item. You can specify the link in FusionCharts link format to be able to open the same in new window, pop-ups, frames or as JavaScript links. | |
manageResize Since v 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. | |
useEllipsesWhenOverflow Since v 3.2
|
Boolean (0/1) | When enabled in auto mode, long data labels are truncated by adding ellipses to prevent them from overflowing the chart background. The default value is 1. | |
Back to top ![]() |
Chart captions | ||
Using these attributes, you can set the various headings and titles of chart like caption, sub-caption. |
Attribute Name | Type | Description | |
caption | String | Caption of the chart. | |
subCaption | String | Sub-caption of the chart. | |
Back to top ![]() |
Number Formatting Properties |
Using the attributes below, you can control a myriad of options like:
|
Attribute Name | Type | 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. For more details, please see Advanced Charting > Number Formatting section. | |
numberSuffix | String | Using this attribute, you could add suffix to all the numbers visible on the graph. For example, to represent all figure quantified as per annum on the chart, you could specify this attribute to ' /a' to show like 40000/a, 50000/a. For more details, please see Advanced Charting > Number Formatting section. | |
decimals | Number | Number of decimal places to which all numbers on the chart will be rounded to. For more details see Advanced Charting > Number Formatting section. | |
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). For more details see Advanced Charting > Number Formatting section. | |
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. For more details, please see Advanced Charting > Number Formatting section. | |
defaultNumberScale | String | The default unit of the numbers that you're providing to the chart. For more details, please see Advanced Charting > Number Formatting section. | |
numberScaleUnit | String | Unit of each block of the scale. For more details, please see Advanced Charting > Number Formatting section. | |
numberScaleValue | String | Range of the various blocks that constitute the scale. For more details, please see Advanced Charting > Number Formatting section. | |
scaleRecursively | Boolean (0/1) | Whether to scale the number recursively? For more details, please see Advanced Charting > Number Formatting section. | |
maxScaleRecursion | Number | How many recursions to complete during recursive scaling? -1 completes the entire set of recursion. For more details see Advanced Charting > Number Formatting section. | |
scaleSeparator | String | What character to use to separate the scales that generated after recursion? | |
decimalSeparator | String | This option helps you specify the character to be used as the decimal separator in a number. For more details, please see Advanced Charting > Number Formatting section. | |
thousandSeparator | String | This option helps you specify the character to be used as the thousands separator in a number. For more details, please see Advanced Charting > Number Formatting section. | |
thousandSeparatorPosition Since XT - SR1
|
Number | This option helps you specify the position of the thousand separator. For more details, please see Advanced Charting > Number Formatting > Basics page. | |
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. For more details, please see Advanced Charting > Number Formatting section. | |
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. For more details, please see Advanced Charting > Number Formatting section. | |
Back to top ![]() |
Data Plot (line) Properties |
These attributes let you configure how your plot (lines) will appear on the chart. |
Attribute Name | Type | Description | |
lineColor | Color Code | Color using which the lines on the chart will be drawn. | |
lineThickness | Number (Pixels) | Thickness of the lines on the chart. | |
lineAlpha | Number (0-100) | Alpha of the lines on the chart. | |
drawAnchors | Boolean (0/1) | Whether to draw anchors on the chart? If the anchors are not shown, then the tooltip and links won't work. | |
anchorSides | Number | This attribute sets the number of sides the anchor will have. For e.g., an anchor with 3 sides will represent a triangle, with 4 it will be a square and so on. | |
anchorRadius | Number (Pixels) | This attribute sets the radius (in pixels) of the anchor. Greater the radius, bigger will be the anchor size. | |
anchorColor | Color Code | Lets you set the color of anchors. | |
anchorAlpha | Number (0-100) | Lets you set the alpha of anchors. | |
Back to top ![]() |
Open, close, high & low properties |
The spark line chart highlights the open, close, high & low points and also shows their value. Using the following attributes, you can configure the chart to:
|
Attribute Name | Type | Description | |
openColor | Color Code | Color for opening value anchor. | |
closeColor | Color Code | Color for closing value anchor. | |
highColor | Color Code | Color for high value anchor. | |
lowColor | Color Code | Color for low value anchor. | |
showOpenAnchor | Boolean (0/1) | Whether to show anchor for opening value? By default this attribute is set to 1. | |
showCloseAnchor | Boolean (0/1) | Whether to show anchor for closing value? By default this attribute is set to 1. | |
showHighAnchor | Boolean (0/1) | Whether to show anchor for high value? By default this attribute is set to 1. | |
showLowAnchor | Boolean (0/1) | Whether to show anchor for low value? By default this attribute is set to 1. | |
showOpenValue | Boolean (0/1) | Whether to show the opening value beside the chart? By default this attribute is set to 1. | |
showCloseValue | Boolean (0/1) | Whether to show the closing value beside the chart? By default this attribute is set to 1. | |
showHighLowValue | Boolean (0/1) | Whether to show the high/low value beside the chart? By default this attribute is set to 1. | |
Back to top ![]() |
Period block properties |
Period blocks are alternate colored bands to easily interpret periods on the chart. The following attributes helps in configuring Period blocks. |
Attribute Name | Type | Description | |
periodLength | Number | How many data points will each period block encapsulate? | |
periodColor | Color Code | Color for the period block. | |
periodAlpha | Number (0-100) | Alpha for the period block. | |
Back to top ![]() |
Chart Cosmetics |
The following attributes let you configure chart cosmetics like background color, background alpha, canvas color & alpha etc. |
Attribute Name | Type | Description | |
bgColor | Color 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. Remember to remove # and any spaces in between. For more details see Using Gradients. | |
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. For more details see Using Gradients. | |
bgRatio | Numbers separated by comma | If you've opted for a gradient background, this attribute lets you set the ratio of each color constituent. For more details see Using Gradients. | |
bgAngle | Number (0-360) | Angle of the background color, in case of a gradient. For more details see Using Gradients. | |
showBorder | Boolean (0/1) | Whether to show a border around the chart or not? | |
borderColor | Color Code | Border color of the chart. | |
borderThickness | Number (Pixels) | Border thickness of the chart. | |
borderAlpha | Number (0-100) | Border alpha of the chart. | |
bgImage
or bgSWF - deprecated
|
String |
To place any image (JPG/PNG/GIF) or Flash movie (SWF) as background of the chart, enter the (path and) name of the background image or SWF file. It should be in the same domain as the chart. Loading of Flash movie is deprecated and is not supported by JavaScript charts. |
|
bgImageAlpha
or bgSWFAlpha - deprecated
|
Number (0-100) |
Helps you specify the opacity for the loaded background image or Flash movie. Loading of Flash movie is deprecated and is not supported by JavaScript charts. |
|
bgImageDisplayMode Since v3.2 |
String (stretch, tile, fit, fill, center, none) |
Helps you specify the mode in which the background image is to be displayed.
|
|
bgImageVAlign Since v3.2 |
String (top, middle, bottom) | Helps you to vertically align the background image. | |
bgImageHAlign Since v3.2 |
String (left, middle, right) | Helps you to horizontally align the background image. | |
bgImageScale Since v3.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/SWF) on the chart once it has rendered. This attribute lets you specify the URL of the same. Owing to Flash Player security settings, you can only specify logos that are on the sub-domain as the SWF file of the chart. | |
logoPosition | String ( TL, TR, BL, BR, CC ) | Where to position the logo on the chart:
|
|
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. | |
Back to top ![]() |
Font Properties |
Using the attributes below, you can define the generic font properties for all the text on the chart. These attributes allow you a high level control over font properties. If you intend to specify font properties for individual chart elements (like Caption, sub-caption etc.), you'll need to use the Styles feature. Using Styles, you can also specify advanced font properties like Bold, Italics, HTML Mode etc. Using Styles you can also configure real-time values. |
Attribute Name | Type | 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 | 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. | |
Back to top ![]() |
Tooltip properties |
These attributes let you control the tooltip. You can set the background color, border color, separator character and few other details. |
Attribute Name | Type | Description | |
showToolTip | Boolean (0/1) | Whether to show tooltip for the annotations? | |
toolTipBgColor | Color Code | Background color for the tooltip | |
toolTipBorderColor | Color Code | Border Color for the tooltip. | |
showToolTipShadow | Boolean (0/1) | Whether to show shadow for tooltips. | |
Back to top ![]() |
Chart Paddings & Margins |
The following attributes help you control chart margins and paddings. FusionWidgets XT allows you 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. It's not necessary for you to specify any padding/margin values. FusionWidgets XT automatically assumes the best values for the same, if you do not specify the same. |
Attribute Name | Type | Description | |
captionPadding | Number (Pixels) | This attribute lets you control the horizontal space (in pixels) between the caption and left side of chart canvas. | |
valuePadding | Number (Pixels) | This attribute lets you control the horizontal space between value textboxes and chart. | |
chartLeftMargin | Number (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 (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 (Pixels) | Amount of empty space that you want to put on the top of your chart. Nothing is rendered in this space. | |
chartBottomMargin | Number (Pixels) | Amount of empty space that you want to put on the bottom of your chart. Nothing is rendered in this space. | |
canvasLeftMargin | Number (Pixels) | Left margin of canvas. Canvas will start from that position. | |
canvasRightMargin | Number (Pixels) | Right margin of canvas. Canvas will end at that position. | |
Back to top ![]() |
<set> element |
Each <set> element (child of <chart>element) represents a set of data which is to be plotted on the chart and determines a set of data which will appear on the chart. |
Attribute Name | Type | Description | |
value | Number | Numerical value for the point. This value will be plotted on the chart. | |
Back to top ![]() |
<trendlines> --> <line> element |
Using the <trendLines> element (and children <line> elements), you can define trend lines on the chart. Trend lines are horizontal lines spanning the chart canvas which aid in interpretation of data with respect to some pre-determined value. For example, if you are plotting sales data of current year, you might want to add previous year's average monthly sales as trend indicator for ease of comparison. You can control the cosmetic and functional properties of trend-lines using the following attributes: |
Attribute Name | Type | Description | |
startValue | Number | The starting value for the trendline. Say, if you want to plot a slanted trendline from value 102 to 109, the startValue will be 102. | |
endValue | Number | The ending y-axis value for the trendline. Say, if you want to plot a slanted trendline from value 102 to 109, the endValue will be 109. If you do not specify a value for endValue, it will automatically assume the same value as startValue. | |
color | Color Code | Color of the trend line and its associated text. | |
thickness | Number (Pixels) | If you've opted to show the trend as a line, this attribute lets you define the thickness of trend line. | |
isTrendZone | Boolean (0/1) | Whether the trend will display a line or a zone (filled colored rectangle). | |
alpha | Number | Alpha of the trend line. | |
dashed | Boolean (0/1) | If you've opted to show the trend as a line, this attribute lets you define whether the trend line will appear as dashed? | |
dashLen | Number (Pixels) | If you've opted to show trend line as dash, this attribute lets you control the length of each dash. | |
dashGap | Number (Pixels) | If you've opted to show trend line as dash, this attribute lets you control the length of each dash gap. | |
showOnTop
Since v 3.3.1
|
Boolean (0/1) | By default, the trendline/trendzone appears below the dataplots. This attribute allows you to display the trendline/trendzone on top of the dataplots. | |
Back to top ![]() |
The XML API for the following features have not been discussed here:
|