graph » color-scale
color-scale
[ root » graph » color-scale ]
Interactive map chart only: Sets the configuration for color scale, which corresponds to the choropleth map coloring.
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 |
aspect | String | Sets the styling aspect for the colorScale data Accepted Values: ['gradient', 'intervals'] Default Value: 'gradient' Introduced in: v2.8.4 Chart types: Color Scale,Interactive-maps |
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 Chart types: Color Scale |
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.
For patterns, the available patterns are: [`${string}`, 'PATTERN_BACKWARD_DIAGONAL', 'PATTERN_DARK_DOWNWARD_DIAGONAL', 'PATTERN_DARK_HORIZONTAL', 'PATTERN_DARK_UPWARD_DIAGONAL', 'PATTERN_DARK_VERTICAL', 'PATTERN_DASHED_DOWNWARD_DIAGONAL', 'PATTERN_DASHED_HORIZONTAL', 'PATTERN_DASHED_UPWARD_DIAGONAL', 'PATTERN_DASHED_VERTICAL', 'PATTERN_DIAGONAL_BRICK', 'PATTERN_DIAGONAL_CROSS', 'PATTERN_DIVOT', 'PATTERN_DOTTED_DIAMOND', 'PATTERN_DOTTED_GRID', 'PATTERN_FORWARD_DIAGONAL', 'PATTERN_HORIZONTAL', 'PATTERN_HORIZONTAL_BRICK', 'PATTERN_LARGE_CHECKER_BOARD', 'PATTERN_LARGE_GRID', 'PATTERN_LIGHT_DOWNWARD_DIAGONAL', 'PATTERN_LIGHT_HORIZONTAL', 'PATTERN_LIGHT_UPWARD_DIAGONAL', 'PATTERN_LIGHT_VERTICAL', 'PATTERN_NARROW_HORIZONTAL', 'PATTERN_NARROW_VERTICAL', 'PATTERN_OUTLINED_DIAMOND', 'PATTERN_PLAID', 'PATTERN_SHADE_25', 'PATTERN_SHADE_50', 'PATTERN_SHADE_75', 'PATTERN_SHINGLE', 'PATTERN_SMALL_CHECKER_BOARD', 'PATTERN_SMALL_GRID', 'PATTERN_SOLID_DIAMOND', 'PATTERN_SPHERE', 'PATTERN_TRELLIS', 'PATTERN_VERTICAL', 'PATTERN_WAVE', 'PATTERN_WEAVE', 'PATTERN_WIDE_DOWNWARD_DIAGONAL', 'PATTERN_WIDE_UPWARD_DIAGONAL', 'PATTERN_ZIGZAG']. Accepted Values: ['PATTERN_BACKWARD_DIAGONAL', 'PATTERN_DARK_DOWNWARD_DIAGONAL', 'PATTERN_DARK_HORIZONTAL', 'PATTERN_DARK_UPWARD_DIAGONAL', 'PATTERN_DARK_VERTICAL', 'PATTERN_DASHED_DOWNWARD_DIAGONAL', 'PATTERN_DASHED_HORIZONTAL', 'PATTERN_DASHED_UPWARD_DIAGONAL', 'PATTERN_DASHED_VERTICAL', 'PATTERN_DIAGONAL_BRICK', 'PATTERN_DIAGONAL_CROSS', 'PATTERN_DIVOT', 'PATTERN_DOTTED_DIAMOND', 'PATTERN_DOTTED_GRID', 'PATTERN_FORWARD_DIAGONAL', 'PATTERN_HORIZONTAL', 'PATTERN_HORIZONTAL_BRICK', 'PATTERN_LARGE_CHECKER_BOARD', 'PATTERN_LARGE_GRID', 'PATTERN_LIGHT_DOWNWARD_DIAGONAL', 'PATTERN_LIGHT_HORIZONTAL', 'PATTERN_LIGHT_UPWARD_DIAGONAL', 'PATTERN_LIGHT_VERTICAL', 'PATTERN_NARROW_HORIZONTAL', 'PATTERN_NARROW_VERTICAL', 'PATTERN_OUTLINED_DIAMOND', 'PATTERN_PLAID', 'PATTERN_SHADE_25', 'PATTERN_SHADE_50', 'PATTERN_SHADE_75', 'PATTERN_SHINGLE', 'PATTERN_SMALL_CHECKER_BOARD', 'PATTERN_SMALL_GRID', 'PATTERN_SOLID_DIAMOND', 'PATTERN_SPHERE', 'PATTERN_TRELLIS', 'PATTERN_VERTICAL', 'PATTERN_WAVE', 'PATTERN_WEAVE', 'PATTERN_WIDE_DOWNWARD_DIAGONAL', 'PATTERN_WIDE_UPWARD_DIAGONAL', 'PATTERN_ZIGZAG', `${string}`] 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 | Boolean, 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 |
border | 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 |
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 |
class | String | Sets a class value on the object. Default Value: null |
color | String | For the 'gradient' aspect, use the 'color' attribute to set the primary color for the choropleth map. The library will automatically lighten and darken the color depending on the effect attribute. Default Value: '#369' Introduced in: v2.8.4 Chart types: Color Scale,Interactive-maps |
colors | Array.<String> | When using the 'intervals' aspect, set the color for each interval with the 'colors' array. Default Value: [] Introduced in: v2.8.4 Chart types: Color Scale,Interactive-maps |
cursor | Object | Styles the cursor that appears on the color scale when hovering over a map item Introduced in: v2.8.4 Chart types: Color Scale,Interactive-maps |
dataN data-n | Any | Prefix attribute or array using "data-" to define a custom token. |
effect | String | Sets the gradient effect when using the 'color' attribute and 'gradient' aspect. Accepted Values: ['lighten', 'darken'] Default Value: 'lighten' Introduced in: v2.8.4 Chart types: Color Scale,Interactive-maps |
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' |
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 | Styles the grid lines on the scale (on the ends and at the midpoint) Default Value: {} Introduced in: v2.8.4 Chart types: Color Scale,Interactive-maps |
height | Number | Sets the object's height. |
id | String | Sets the id of the object. Default Value: '' |
intervals | Number | Sets the number of choropleth intervals or levels. Default Value: 4 Introduced in: v2.8.4 Chart types: Color Scale,Interactive-maps |
item | Object | Styles the scale item values Introduced in: v2.8.4 Chart types: Color Scale,Interactive-maps |
layout | String | Defines the layout of the items of the object. Accepted Values: ['h', 'v'] Default Value: 'v' Introduced in: v2.8.4 Chart types: Color Scale,Interactive-maps |
map | Boolean | Sets whether or not to copy: ['aspect', 'intervals', 'color', 'maxPercent', 'effect', 'progression', 'minValue', 'maxValue', 'steps', 'colors', 'labels', 'mirrored'] from the choropleth object Default Value: false Introduced in: v2.8.4 Chart types: Color Scale,Interactive-maps,Color Scale |
margin | Number, String | Sets the margin on the color scale Accepted Values: ['dynamic'] Default Value: 'auto 10 auto auto' Introduced in: v2.8.4 Chart types: Color Scale,Interactive-maps |
maxPercent max-percent | Number | Sets the maximum percentage that a color will be lightened or darkened Default Value: 50 Introduced in: v2.8.4 Chart types: Color Scale,Interactive-maps |
maxValue max-value | Number | Sets the maximum value on the color scale. Default Value: 10 Introduced in: v2.8.4 Chart types: Color Scale,Interactive-maps |
mediaRules media-rules | Array.<Object> | Configure media rules. |
minValue min-value | Number | Sets the minimum value on the color scale. Default Value: 0 Introduced in: v2.8.4 Chart types: Color Scale,Interactive-maps |
mirrored | Boolean | Mirrors the color scale values when using a gradient. Default Value: false Introduced in: v2.8.4 Chart types: Color Scale,Interactive-maps |
progression | String | Sets whether the color scale should be analyzed on a linear ('lin') or logarithmic ('log') scale. Accepted Values: ['lin', 'linear', 'log'] Default Value: 'lin' Introduced in: v2.8.4 Chart types: Color Scale,Interactive-maps |
steps | Array.<Number,String> | When using the 'intervals' aspect, set the choropleth value thresholds as an array of numbers. Default Value: [] Introduced in: v2.8.4 Chart types: Color Scale,Interactive-maps |
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. |
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 |