"globals"
"marker"
"tooltip"
"gui"
"context-menu"
"button"
"gear"
"item"
"graphset"
"arrows"
"from"
"label"
"to"
"bubble-legend"
"marker"
"chart"
"color-scale"
"cursor"
"item"
"crosshair-x"
"marker"
"plot-label"
"scale-label"
"crosshair-y"
"scale-label"
"globals"
"marker"
"tooltip"
"guide"
"marker"
"plot-label"
"scale-label"
"heatmap"
"tooltip"
"images"
"labels"
"legend"
"footer"
"header"
"icon"
"item"
"item-off"
"marker"
"marker-off"
"page-off"
"page-on"
"page-status"
"scroll"
"bar"
"handle"
"tooltip"
"nav"
"back"
"tooltip"
"no-data"
"options"
"arrow"
"back"
"tooltip"
"bars"
"tooltip"
"box"
"tooltip"
"button-zoomin"
"tooltip"
"button-zoomout"
"tooltip"
"close"
"containers"
"day"
"items"
"final"
"group-box"
"tooltip"
"handle"
"indicator"
"intermediate"
"item"
"label"
"tooltip"
"item-group-n"
"label"
"tooltip"
"item-id-n"
"label"
"tooltip"
"item-level-n"
"label"
"tooltip"
"label"
"link"
"link[cls-n]"
"link[container-n]"
"link[group-n]"
"link[level-n]"
"link[parent-n]"
"link[sibling]"
"link[source-n]"
"link[target-n]"
"links"
"mmp-marker"
"label"
"month"
"item"
"items"
"outline"
"multi-guide"
"close"
"handle"
"label"
"negative"
"node"
"label"
"tooltip"
"node[cls-n]"
"label"
"tooltip"
"node[collapsed]"
"label"
"tooltip"
"node[group-n]"
"label"
"tooltip"
"node[leaf]"
"label"
"tooltip"
"node[level-n]"
"label"
"tooltip"
"node[parent]"
"label"
"tooltip"
"node[parent-n]"
"label"
"tooltip"
"nodes"
"OBJECT_KEY_NAME"
"label"
"tooltip"
"outlier"
"marker"
"tooltip"
"positive"
"scale"
"label"
"pointer"
"scale-y-2"
"guide"
"item"
"label"
"markers"
"label"
"tick"
"tooltip"
"style"
".td"
".td_even"
".td_first"
".td_last"
".td_n"
".td_n_n"
".td_odd"
".th"
".th_even"
".th_first"
".th_last"
".th_n"
".th_odd"
".tr"
".tr_even"
".tr_first"
".tr_last"
".tr_n"
".tr_odd"
"band"
"tooltip"
"chord"
"tooltip"
"flow"
"item"
"item-flow"
"item-overall"
"label"
"label-overall"
"tooltip"
"subtitle"
"tile"
"label"
"tooltip"
"title"
"tooltip-box"
"tooltip-group"
"trigger"
"value"
"violin"
"week"
"items"
"weekday"
"item"
"items"
"plot"
"error"
"facets"
"goal"
"tooltip"
"guide-label"
"guide-marker"
"highlight-marker"
"hover-marker"
"hover-state"
"styles"
"highlight-state"
"legend-item"
"legend-marker"
"max-marker"
"marker"
"min-marker"
"selected-marker"
"selected-state"
"tooltip"
"trend-down"
"trend-equal"
"trend-up"
"value-box"
"rules"
"plotarea"
"preview"
"handle"
"handle-bottom"
"handle-left"
"handle-right"
"handle-top"
"label"
"refresh"
"scale"
"item"
"scale-k"
"guide"
"item"
"tooltip"
"scale-r"
"center"
"guide"
"item"
"markers"
"label"
"ring"
"tooltip"
"scale-v"
"guide"
"item"
"tooltip"
"scale-x"
"guide"
"item"
"label"
"markers"
"label"
"tooltip"
"scale-y"
"guide"
"item"
"label"
"markers"
"tick"
"tooltip"
"scroll-x"
"bar"
"handle"
"scroll-y"
"bar"
"handle"
"selection-tool"
"series"
"error"
"facets"
"goal"
"tooltip"
"guide-label"
"guide-marker"
"highlight-marker"
"hover-marker"
"highlight-state"
"legend-item"
"legend-marker"
"marker"
"max-marker"
"min-marker"
"selected-marker"
"selected-state"
"style"
"band"
"tooltip"
"chord"
"tooltip"
"item"
"item-flow"
"item-overall"
"label"
"tooltip"
"value-box"
"rules"
"shapes"
"label"
"options"
"style"
"controls"
"zoom-in"
"tooltip"
"zoom-out"
"tooltip"
"items"
"OBECT_KEY_NAME"
"tooltip"
"label"
"tooltip"
"tooltip"
"source"
"subtitle"
"title"
"tooltip"
"zoom"
"label"
"history"
"refresh"
graph » scale-x » rules
rules
[ root » graph » scale-x » rules ]
Use the rules
array of objects to change the appearance of scaleX
items, tick marks, guides, minor tick marks, and minor guides based on specified rules. Refer to the Logic Rules Tutorial for more information.
Attribute | Type | Description |
---|---|---|
class | String | Sets a class value on the object. Default Value: null |
dataN data-n | Any | Prefix attribute or array using "data-" to define a custom token. |
decimals | Number | Sets the number of decimal places displayed for each value. Default Value: -1 Chart types: Gauge |
decimalsSeparator decimals-separator | String | Sets the separator to be used in place of the default decimal point. Any string or character can be used to replace the decimal. Default Value: '.' Chart types: Gauge |
defaultValue default-value | String | Sets the default value token values to display until the value is available. Default Value: null Chart types: Gauge |
exponent | Boolean | Sets whether the scale values will be displayed in scientific notation. Particularly useful when dealing with large numbers. Default Value: false Chart types: Gauge |
exponentDecimals exponent-decimals | Number | Sets the number of decimals that will be displayed when using scientific notation. Use with the 'exponent' attribute. Default Value: 2 Chart types: Gauge |
fixedStep fixed-step | Boolean | Used in pair with a step:1 and discrete values for scales, forces proper behavior on scale zooming/scrolling. Default Value: false |
format | String | To format the appearance of the scale values. Use with the %scale-value (%v) token. Default Value: null Chart types: Gauge |
guide | Object | Used to style the lines and backgrounds behind the plotted data. Default Value: null |
id | String | Sets the id of the object. Default Value: '' |
itemsOverlap items-overlap | Boolean | To force all of the scale items to display. It is generally used with the 'max-items' attribute. Default Value: false |
labels | Array.<Number,String> | Sets the labels. Chart types: Gauge |
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' |
lineGapSize line-gap-size | Number | Can be used to create custom dashed or dotted lines when used with line-segment-size. This will control the size of the gaps between each line segment. Default Value: 0 |
lineSegmentSize line-segment-size | Number | Can be used to create custom dashed or dotted lines when used with line-gap-size. This will control the size of the visible segment of line. Default Value: 0 |
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 |
logBase log-base | Number | Logarithmic Scales only: To set the base value, which defaults to Math.E (Euler's number, the base of natural logarithms). Default Value: 10 |
markers | Array.<Object> | To create and style the scale markers, which can appear as areas or lines. Default Value: [] |
master | String | Sets a master scale. The current scale will always be in sync with it's master scale. Default Value: '' |
max-value-factor | Boolean | Ratio from (max-min) interval which will be added to the max value. Default Value: true |
maxDecimals max-decimals | Number | Sets the max number of decimals that will be used to format the values. Default Value: -1 Chart types: Gauge |
maxItems max-items | Number | Sets the maximum number of items displayed. Chart types: Gauge |
maxLabels max-labels | Number | Sets the maximum number of labels to display along the axis. |
maxTicks max-ticks | Number | Sets the maximum number of ticks to display on the scale. Chart types: Gauge |
maxValue max-value | Number, String | Sets the maximum scale value. Accepted Values: ['auto'] |
min-value-factor | Boolean | Ratio from (max-min) interval which will be subtracted to the min value. Default Value: true |
minValue min-value | Number, String | Sets the minimum scale value. Accepted Values: ['auto'] Default Value: -1 |
minorGuide minor-guide | Object | To style the minor grid lines, which appear between the major grid lines. Default Value: null Chart types: Gauge |
minorTick minor-tick | Object | To style the minor tick marks, which appear between the major tick marks. Note that the 'minor-ticks' attribute must be included in your scale object to set the number of minor tick marks displayed. Default Value: null Chart types: Gauge |
minorTicks minor-ticks | Number | Sets the number of minor tick marks displayed between the major tick marks. Note that this attribute is required to style the minor tick marks and/or guides. Default Value: 0 Chart types: Gauge |
mirrored | Boolean | Setting 'mirrored': true will reverse/mirror the x axis values. 'scale-x': {} values will read right to left. Default Value: false |
negation | String | This attribute will determine how negative values are handled. When using "format":"$%v" setting "negation":"currency" will move the - symbol to the outside of the $ sign. When using "negation" within the "plot": { } object you will see changes in things such as tooltips or anywhere else series data is used to populate values. You need to set "negation" in things such as "scale-y": { } separately. Accepted Values: ['standard', 'currency'] Default Value: 'standard' |
normalize | Boolean | Applies roundings to scale boundaries in order to get nicer min/max/step values. Default Value: true Chart types: Gauge |
offset | Number | Sets an offset at the start and end of the plotted data. This will cause the data to appear as if it were 'squeezed'. Default Value: 0 |
offsetEnd offset-end | Number | Sets an offset from the end of the plotted data. This will cause the data to appear as if it were 'squeezed' from the right side. Default Value: 0 |
offsetStart offset-start | Number | Sets an offset at the start of the plotted data. This will cause the data to appear as if it were 'squeezed' from the left side. Default Value: 0 |
placement | String | Sets the placement of the object. Accepted Values: ['cross', 'default', 'opposite'] Default Value: 'default' |
progression | String | To change the scale type from linear (default) to logarithmic. Accepted Values: ['lin', 'linear', 'log'] Default Value: 'lin' |
ranged | Boolean | Sets the scale as "ranged", basically the node is placed in the middle of the interval between two scale values. Default Value: false |
rectShortcut rect-shortcut | Boolean | Used to force the library to create rectangles using a faster drawing API (instead of painting them like a closed polygon). However, using this would disable effects like rounded borders. It is a performance setting for edge cases. Default Value: false |
refLine ref-line | Object | To style the reference line. Default Value: null Chart types: Gauge |
refValue ref-value | Number | To set the value the reference line is drawn at. Default Value: 0 Chart types: Gauge |
rule | String | The criteria to check for to apply the corresponding styling. |
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 |
short | Boolean | Automatically shortens large units (e.g. 1000000 -> 1M) Default Value: false Chart types: Gauge |
shortUnit short-unit | String | Specifies which unit of measure to use when `short` is set to true. Accepted Values: ['k', 'K', 'm', 'M', 'b', 'B'] Default Value: '' Chart types: Gauge |
showLabels show-labels | Array.<String> | Sets a filter to show only specific items on a scale. It does NOT force the display of the specified items if those are not already generated by the scale. Default Value: null Chart types: Gauge |
step | Number | The 'step': attribute sets the value of each step along an axis. When using numeric values along the axis, a numeric value for 'step': will incrementally increase the value of each tick along the axis by the specified step value. When the transform attribute is set to 'type':'date', a number of different step values can then be used to modify the step increments. Accepted Values: [`${number}`, `${number|''}second`, `${number|''}minute`, `${number|''}hour`, `${number|''}day`, `${number|''}week`, `${number|''}month`, `${number|''}year`] Default Value: 1 Chart types: Gauge |
stepMultiplier step-multiplier | Number | Applies a multiplier to the interval used to show ticks/items on scale. The multiplier is not applied only if the number of items currently active is greater than the multiplier value. Otherwise, all items are being displayed. Introduced in: v2.9.1 |
thousandsSeparator thousands-separator | String | Sets the character used to separate thousands. Default Value: '' |
tick | Object | Used to style the scale tick marks. Default Value: null |
transform | Object | Transforms data to specified format.
For example, if data is coded as date and time, `type: 'date'` is specifed in this object,
and `scaleX.transform: '%D, %d %M %h:%i %A'` is set,
then '1311261385209' will display 'Wed, 19 of May 05:00 PM'. Default Value: null Chart types: Gauge |
used | Boolean | Forces the display of the scale, even if its not used on any plot. Default Value: false |
values | Array.<Number,String>, Number, String | Sets the scale values. Default Value: [] |
visible | Boolean | Sets the visibility of the object. Allows you to turn off the object without removing lines of JSON. Default Value: true |
zIndex z-index | Number | Sets the z position of the object. Objects with higher z indexes will appear "above" those with lower z index values. Default Value: 1 |
zoomSnap zoom-snap | Boolean | When zooming is enabled, setting zoom-snap to true snaps the zoom area to the nearest data node as a zoom area is selected. By default, zoom-snap is set to false. Default Value: false |
zoomTo zoom-to | Array.<Number> | To specify the node indices the chart will zoom to by default at chart render. This is best used with linear data (or simple array data) with scrollbars or preview charts Default Value: null Chart types: Gauge |
zoomToValues zoom-to-values | Array.<Number> | To specify the node values the chart will zoom to by default at chart render. This is best used with non-linear data (or array of array data) with scrollbars or preview charts. Default Value: null |
zooming | Boolean | To turn on chart zooming on the scale. Default Value: false Chart types: Gauge |