globals
[ root » graph » globals ]
Use the globals
object to set styling attributes that apply globally across the chart(s) in the corresponding graphset
array. This object is similar to a CSS stylesheet, in that the styling attributes will cascade down to all charts in the graphset
. Those attributes can be overridden with local attributes in the individual chart object(s).
Attribute | Type | Description |
---|---|---|
alpha | Number | Sets the opacity on the marker, with 0 being fully transparent and 1 being fully opaque. Note that decimal value requires the leading 0. Default Value: 1 |
backgroundColor background-color | String | Sets the background color of the object. Colors can be entered by name (e.g., "purple", "blue"), hexadecimal notation (e.g., "#666699", #33ccff"), or RGB notation (e.g., "rgb(255,0,0)", "rgb(0,0,255)") Default Value: null |
backgroundColor1 background-color-1 | String | Sets the first color of a 2 color background gradient of the object. To be used with background-color-2. Default Value: null |
backgroundColor2 background-color-2 | String | Sets the second color of a 2 color background gradient of the object. To be used with background-color-1. Default Value: null |
bold | Boolean | Sets whether the text is displayed with bold characters or not. Default Value: false |
borderColor border-color | String | Sets the border color of the object. Default Value: '#000' |
borderRadius border-radius | Number | Sets the object's border radius for rounded corners. Larger values create rounder corners, while smaller values create sharper corners. A single value will affect all 4 corners; multiple values will have separate effects on each corner, with the first value affecting the top-left corner, the second value affecting the top-right corner, and so on, in a clockwise direction. A negative value will cut a corner off without rounding. Default Value: 0 |
borderWidth border-width | Number | Sets the border width of the object. Default Value: 0 |
color | String | Sets the object's font color. Similar to font-color. Default Value: '#000' |
decimals | Number | Sets the number of decimal places displayed for each value. |
fillAngle fill-angle | Number | Sets the angle of the axis along which the linear gradient is drawn. Default Value: 90 |
fillOffsetX fill-offset-x | Number | Sets an X offset to apply to the fill. Default Value: 0 |
fillOffsetY fill-offset-y | Number | Sets a Y offset to apply to the fill. Default Value: 0 |
fillType fill-type | String | Sets the background gradient fill type to either linear or radial. Accepted Values: ['linear', 'none', 'radial'] Default Value: 'linear' |
flat | Boolean | Set to true disables the chart interactivity. Default Value: false |
fontAngle font-angle | Number | Sets the text's angle. A positive value will rotate the object by that number of degrees clockwise, while a negative value. Default Value: null |
fontColor font-color | String | Sets the font color of the text. |
fontFamily font-family | String | Sets the text's font family. |
fontSize font-size | Number | Sets the text's font size. |
fontStyle font-style | String | Sets the text's font style. Accepted Values: ['normal', 'italic', 'oblique', 'none'] |
fontWeight font-weight | Number, String | Sets the text's font weight. Similar to bold. Accepted Values: ['bold', 'none', 'normal', `${string}`] Default Value: 'normal' |
gradientColors gradient-colors | String | Sets a set of colors for a complex background gradient consisting of 2 or more colors. To be used with gradient-stops. Default Value: '' |
gradientStops gradient-stops | String | Sets the gradient stops for a complex background gradient consisting of 2 or more colors. To be used with gradient-colors. Default Value: '' |
lineColor line-color | String | Sets the line color of the object, applicable on non-closed shapes. See also border-color for closed shapes. Default Value: '#000' |
lineStyle line-style | String | Sets the line style of the object. Accepted Values: ['dashdot', 'dashed', 'dotted', 'solid'] Default Value: '' |
lineWidth line-width | Number | Sets the line width of the object, applicable on non-closed shapes. See also border-width for closed shapes. Default Value: 0 |
margin | Number, String | Sets the object's margin/s from the top-left of the chart. Accepted Values: ['dynamic'] Default Value: 0 |
marker | Object | Sets the styling for markers. Default Value: 0 |
offsetX offset-x | Number | Sets an x-offset to apply when positioning the object. |
offsetY offset-y | Number | Sets an y-offset to apply when positioning the object. |
padding | Number | Sets the object's padding around the text. Up to four values can be entered to set the padding for all four sides, with the first value affecting the top padding, the second value affecting the right padding, and so on, in a clockwise direction. Default Value: null |
rtl | Boolean | Renders text right-to-left. Default value is false. Default Value: false |
shadow | Boolean | Sets whether the object's shadow is visible or not. Has limited effect on HTML5 implementation. Default Value: false |
shadowAlpha shadow-alpha | Number | Sets the transparency of the shadow of the object. The higher the value, the less transparent the shadow will be. Default Value: 0.75 |
shadowAngle shadow-angle | Number | Sets the angle of the shadow underneath the object. Default Value: 45 |
shadowBlur shadow-blur | Number | Sets the blur effect size for the shadow of the object. Has limited effect on HTML5 implementation. Default Value: 0 |
shadowColor shadow-color | String | Sets the color of the shadow of the object. Default Value: '#999' |
shadowDistance shadow-distance | Number | Sets the distance between the shadow and the object. Default Value: 2 |
textAlign text-align | String | Sets the alignment of the object. Accepted Values: ['center', 'bottom', 'left', 'middle', 'right'] Default Value: 'center' |
thousandsSeparator thousands-separator | String | Sets the character used to separate thousands. Default Value: null |
tooltip | Object | Configures the tooltip element, which appears when hovering over an object. Default Value: [] |
x | Number | Sets the X position of the object. |
y | Number | Sets the Y position of the object. |