gui » context-menu » item

item

[ root » gui » context-menu » item ]

Use the item object to style the appearance of the context menu items. Refer to the Context Menu Tutorial for more information.




AttributeTypeDescription
alignStringSets the alignment of the object.
Accepted Values: ['left', 'center', 'right']
backgroundColor
background-color
StringSets 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
borderNumberSets 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
NumberSets 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
StringSets the border color of the object.
Default Value: '#000'
borderWidth
border-width
NumberSets the border width of the object.
Default Value: 0
classStringSets a class value on the object.
Default Value: null
cursorStringSets the cursor type when hovering over the object.
Accepted Values: ['alias', 'all-scroll', 'arrow', 'auto', 'cell', 'col-resize', 'context-menu', 'copy', 'crosshair', 'default', 'e-resize', 'ew-resize', 'hand', 'help', 'move', 'n-resize', 'ne-resize', 'nesw-resize', 'no-drop', 'none', 'not-allowed', 'ns-resize', 'nw-resize', 'nwse-resize', 'pointer', 'progress', 'row-resize', 's-resize', 'se-resize', 'sw-resize', 'text', 'vertical-text', 'w-resize', 'wait']
Default Value: 'auto'
Introduced in: v1.9.0
dataN
data-n
AnyPrefix attribute or array using "data-" to define a custom token.
fontColor
font-color
StringSets the font color of the text.
fontFamily
font-family
StringSets the text's font family.
fontSize
font-size
NumberSets the text's font size.
fontWeight
font-weight
Number, StringSets the text's font weight. Similar to bold.
Accepted Values: ['bold', 'none', 'normal', `${string}`]
Default Value: 'normal'
hoverState
hover-state
ObjectSets the hover state styles of the object.
Default Value: null
idStringSets the id of the object.
Default Value: ''
lineHeight
line-height
NumberSets the height of a line box.
Default Value: -1
lockRotation
lock-rotation
BooleanSet to lock scale labels in place and not rotate with viewing angle in 3D charts.
Chart types: 3D Charts
maxWidth
max-width
NumberSets a maximum width of the object.
paddingNumberSets 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
paddingBottom
padding-bottom
NumberSets the object's bottom padding around the text.
Default Value: 2
paddingLeft
padding-left
NumberSets the object's left padding around the text.
Default Value: 2
paddingRight
padding-right
NumberSets the object's right padding around the text.
Default Value: 2
paddingTop
padding-top
NumberSets the object's top padding around the text.
Default Value: 2
rectShortcut
rect-shortcut
BooleanUsed 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
visibleBooleanSets the visibility of the object. Allows you to turn off the object without removing lines of JSON.
Default Value: true
widthNumberSets the object's width.
Default Value: 0