graph » scale
scale
[ root » graph » scale]
Pie and Gauge Charts Only: This object is used to adjust the size (and layout, for pie chart small multiples only) of the charts. Note that this object is distinct from the scale-r
object. Refer to the Pie Charts Tutorial and the Angular Gauge Charts Tutorial for more information.
Attribute | Type | Description |
---|---|---|
alpha | Number | Sets the transparency level of the object. Values must range between 0.0 and 1.0, with 0.0 being completely transparent and 1.0 being completely opaque. Note that values require the leading 0 before the decimal point. Default Value: 1 |
anchor | String | Allows you to set an object's anchor position Accepted Values: ['tl', 'tr', 'bl', 'br', 'c', 't', 'r', 'b', 'l'] Default Value: 'tl' |
angle | Number | Sets the rotation angle of the object/shape. Default Value: 0 |
angleEnd angle-end | Number | Sets the end angle of a pie shape. Default Value: 360 |
angleStart angle-start | Number | Sets the beginning angle of a pie shape. Default Value: 0 |
autoFit auto-fit | Boolean,Array. | Sets whether the scale boundaries are recalculated on zoom to the "local" min/max values or are always fixed to the initial min/max values. Default Value: [false, false] |
backgroundClip background-clip | Boolean | Clips the background image to the margins of the shape/box. Default Value: true |
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 |
backgroundFit background-fit | String | Sets the direction/s on which the background image is being "stretched". Default Value: '' |
backgroundImage background-image | String | Sets a background image for the object. Value can be a local file or a web image's location. Default Value: '' |
backgroundPosition background-position | String | Sets the position of the background when the background-repeat value is no-repeat. Default Value: '50% 50%' |
backgroundRepeat background-repeat | String | Sets the repeating mode for the background image. Default Value: 'repeat' |
backgroundScale background-scale | Number | Scales the background image using the specified ratio. Default Value: 1 |
blended | Boolean | To 'blend' or 'stick' secondary scales to the primary one. Use with the 'placement' attribute (set the value to 'default') and 'offset-start' and 'offset-end' attributes. Default Value: false Introduced in: v2.3.0 |
border | String,Number | Sets the border width of the object. Can be a single value or a string of values, setting the values in the order "top right bottom left" |
borderAlpha border-alpha | Number | Sets the transparency level of the border on the object. Values must range between 0.0 and 1.0, with 0.0 being completely transparent and 1.0 being completely opaque. Note that values require the leading 0 before the decimal point. Default Value: 1 Introduced in: v2.1.1 |
borderBottom border-bottom | String | Sets the object's bottom border style. Accepts solid, dashed, and dotted styles. Default Value: '' |
borderColor border-color | String | Sets the border color of the object. Default Value: '#000' |
borderLeft border-left | String | Sets the object's left border style. Accepts solid, dashed, and dotted styles. |
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 |
borderRadiusBottomLeft border-radius-bottom-left | Number | Sets the object's bottom-left border radius for rounded corners. Larger values create rounder corners, while smaller values create sharper corners. A negative value will cut a corner off without rounding. Default Value: 0 |
borderRadiusBottomRight border-radius-bottom-right | Number | Sets the object's bottom-right border radius for rounded corners. Larger values create rounder corners, while smaller values create sharper corners. A negative value will cut a corner off without rounding. Default Value: 0 |
borderRadiusTopLeft border-radius-top-left | Number | Sets the object's top-left border radius for rounded corners. Larger values create rounder corners, while smaller values create sharper corners. A negative value will cut a corner off without rounding. Default Value: 0 |
borderRadiusTopRight border-radius-top-right | Number | Sets the object's top-right border radius for rounded corners. Larger values create rounder corners, while smaller values create sharper corners. A negative value will cut a corner off without rounding. Default Value: 0 |
borderRight border-right | String | Sets the object's right border style. Accepts solid, dashed, and dotted styles. Default Value: '' |
borderTop border-top | String | Sets the object's top border style. Accepts solid, dashed, and dotted styles. Default Value: '' |
borderWidth border-width | Number | Sets the border width of the object. Default Value: 0 |
bottomState bottom-state | Object | Sets the style for a copy of the object which is placed below the object itself. Introduced in: v1.14.0 |
callout | Boolean | Sets whether an object will have a callout arrow or not. Default Value: false |
calloutExtension callout-extension | Number | Sets the length of the extension that extends beyond the tip of the callout arrow. Default Value: 0 |
calloutHeight callout-height | Number | Sets the height of the object's callout arrow. A larger value will create a taller callout arrow. Default Value: 8 |
calloutHook callout-hook | Array. | Sets the point of the tip of the callout arrow to a specified coordinate on the chart, with the starting point of [0,0] being the top left corner of the chart. Default Value: null |
calloutOffset callout-offset | Number | Sets the offset along the callout direction of the arrow's base. Positive and negative values can be used to offset the callout arrow up, down, left, or right depending on the callout-position. Default Value: 0 |
calloutPosition callout-position | String | Sets the position for the object's callout arrow. The position is "bottom" by default. Default Value: 'bottom' |
calloutRatio callout-ratio | Array. | Sets how much to stretch/squeeze the callout arrow on its two sides. A zero value for example on one side would create like a half callout arrow. Negative values can also be set, in order to create various aspects. Default Value: [1, 1] |
calloutTip callout-tip | ZCStyle | To style the tip of the callout. You can modify the shape with a "type" attribute. Value options include "circle", "diamond", "cross", and "arrow". For styling, use attributes such as "background-color", "border-color", "border-width", "line-color", "line-width", and so on. Default Value: null |
calloutWidth callout-width | Number | Sets the width of the object's callout arrow. A larger value will create a wider callout arrow. Default Value: 8 |
centerRef center-ref | Boolean | Sets the (0,0) x/y coordinates as the center of the box (instead of the top-left corner). Default Value: false |
class | String | Sets a class value on the object. Default Value: null |
cursor | String | Sets the cursor shape when hovering over the object. Default Value: 'auto' Introduced in: v1.9.0 |
decimals | Number | Sets the number of decimals which will be displayed as scale-x values. Note this attribute does round the values to fit within the defined number of decimals. Default Value: -1 |
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: '.' |
exponent | Boolean | Sets whether the scale values will be displayed in scientific notation. Particularly useful when dealing with large numbers. Default Value: false |
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 |
factor | Number | Applies a multiplication factor to all scale items. Default Value: 1 |
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,Number | Sets the background gradient fill type to either linear or radial. Default Value: 'linear' |
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 |
flat | Boolean | Disables the active area (used for tooltip) for the object. Default Value: false |
format | String | To format the appearance of the scale values. Use with the %scale-value (%v) token. Default Value: null |
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: '' |
guide | Object | Used to style the lines and backgrounds behind the plotted data. Default Value: null |
height | Number | Set the object's height. Default Value: 0 |
id | String | ID of the shape Default Value: '' |
id | String | Sets the id of the object. Default Value: '' |
item | Object | Used to style the individual scale labels. Default Value: null |
item | String | Sets the item id of the map on which the object/shape is being added. 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 |
label | Object | To create and style the scale title. Default Value: null |
labels | Array. | Allows you to set custom labels that correspond to each of the ticks on a scale. If there are more ticks than labels, the default values will be used for the remaining labels. |
lineCap line-cap | String | Sets the stroke-linecap attribute on SVGs Accepted Values: ['butt', 'round', 'square'] Default Value: 'butt' |
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 | String,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 |
lineJoin line-join | String | Sets the stroke-linejoin attribute on SVGs Accepted Values: ['round', 'miter'] Default Value: 'round' |
lineSegmentSize line-segment-size | String,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. 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 |
map | String | Sets the map id of the map on which the object/shape is being added. |
margin | Number | Sets the object's margin/s from the top-left of the chart. Default Value: 0 |
marginBottom margin-bottom | Number | Sets the object's bottom margin. Default Value: -1 |
marginLeft margin-left | Number | Sets the object's left margin. Default Value: -1 |
marginRight margin-right | Number | Sets the object's right margin. Default Value: -1 |
marginTop margin-top | Number | Sets the object's top margin. Default Value: -1 |
markers | Array | 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 | Number | Sets the maximum scale value. |
maxDecimals max-decimals | Number | The maximum number of decimal places displayed on the scale labels. Values will be rounded to the set precision level. Default Value: -1 |
maxItems max-items | Number | To set the maximum number of scale items displayed. It is generally used with the 'items-overlap' attribute. |
maxTicks max-ticks | Number | Sets the maximum number of ticks to display on the scale. |
min | Number | Sets the minimum scale value. Default Value: -1 |
minorGuide minor-guide | Object | To style the minor guides, which appear between the major guides. Default Value: null |
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 |
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 |
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 | Sets the negative symbol just outside of the formatted value. 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 |
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 |
offsetR offset-r | Number | Sets an R offset to apply when positioning the object/shape. 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 |
offsetX offset-x | Number | Sets an X offset to apply when positioning the object/shape. Default Value: 0 |
offsetY offset-y | Number | Sets a Y offset to apply when positioning the object/shape. Default Value: 0 |
offsetZ offset-z | Number | Sets a Z offset to apply when positioning the object/shape. Default Value: 0 |
placement | String | Sets the placement of the scale object. Default Value: 'default' |
points | Array. | Sets the coordinates of the object/shape points. Default Value: [] |
position | String | Sets the object's position relative to its container. Similar results can be obtained by setting [margin] and [margin-...] attributes. Uses x,y coordinates originating from the top left of the chart. Default Value: '' |
progression | String | To change the scale type from linear (default) to logarithmic. Default Value: 'lin' |
ranged | Boolean | Sets the scale as "ranged", forcing the node point to be placed between two scale ticks. By default, bar charts use a ranged scale as the key scale. 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 |
refValue ref-value | Number | To set the value the reference line is drawn at. Default Value: 0 |
scaleFactor scale-factor | Number | Parameter used to control the range (min/max values) of the scale without forcing fixed values. The parameter will be applied on the pre-calculated min/max values and the result forced on the scale. Default Value: 1 |
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 | String,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 | String,Number | Sets the distance between the shadow and the object. Default Value: 2 |
short | Boolean | Setting to true will cause the values on the x axis to use an abbreviated notation with a short unit such as K,M,B, etc. Default Value: false |
shortUnit short-unit | String | Specifies which unit of measure to use when short is set to true. Default Value: '' |
showLabels show-labels | Array. | 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 |
size | Number | Sets the size of the object/shape. Default Value: 0 |
size2 size-2 | Number | Sets the secondary size of the object/shape. Used on ellipses or rectangle shapes. Default Value: 0 |
slice | Number | Sets the radius of the inner ring of a pie shape. Default Value: 0 |
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. Default Value: 1 |
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 |
target | String | Sets the target for the URL. Depending on its value, it either opens the URL or uses the content fetched from the URL (when target is graph=ID). Accepted Values: _blank, _top, _parent, _window=NAME, graph=ID Default Value: null |
thousandsSeparator thousands-separator | String | Inserts punctuation to separate numbers in values over 999. Default Value: '' |
tick | Object | Used to style the scale tick marks. Default Value: null |
tooltip | Object | Configures the scale tooltips |
tooltipText tooltip-text | Array. | Sets an array of text elements which will be displayed on the scale items tooltips (provided %tooltip-text token is used) |
topState top-state | ZCShape | Sets the style for a copy of the object which is placed above the object itself. Introduced in: v1.14.0 |
transform | Object | Sets the transformation of the scale values, currently only transform : { type : 'date' } is implemented. Default Value: null |
type | String | Sets the type of the object/shape. Accepted Values: ['arc', 'arrow', 'circle', 'cross', 'diamond', 'ellipse','gear3', 'gear4', 'gear5', 'gear6', 'gear7', 'gear8', 'gear9', 'hamburger', 'line', 'parallelogram', 'pie','plus', 'poly', 'rect', 'rpoly3', 'rpoly4', 'rpoly5', 'rpoly6', 'rpoly7', 'rpoly8', 'rpoly9', 'square', 'star3', 'star4', 'star5', 'star6', 'star7', 'star8', 'star9', 'trapezoid', 'triangle'] Default Value: 'poly' |
url | String | Sets an URL associated with this object. Used mostly on nodes/labels/shapes with their associated click events. Default Value: null |
used | Boolean | Forces the display of the scale, even if its not used on any plot. Default Value: false |
values | Array. | An alternative way to create category scale labels. Similar to a 'labels' array, the 'values' array also acts as a maximum scale value. 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 |
width | Number | Sets the object's width. Default Value: 0 |
x | Number | Sets the X position of the object. Default Value: -1 |
y | Number | Sets the Y position of the object. |
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 |
zSort z-sort | Number | Used to force the sorting of the active areas (which trigger the tooltip) of two shapes in case they overlap. 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. | 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 |
zoomToValues zoom-to-values | Array. | 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 |