Skip to content

Commit b952125

Browse files
committed
selections in plot schema
1 parent c6d954d commit b952125

File tree

1 file changed

+163
-0
lines changed

1 file changed

+163
-0
lines changed

test/plot-schema.json

Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -615,6 +615,24 @@
615615
}
616616
}
617617
},
618+
"activeselection": {
619+
"editType": "none",
620+
"fillcolor": {
621+
"description": "Sets the color filling the active selection' interior.",
622+
"dflt": "#7f7f7f",
623+
"editType": "none",
624+
"valType": "color"
625+
},
626+
"opacity": {
627+
"description": "Sets the opacity of the active selection.",
628+
"dflt": 0.5,
629+
"editType": "none",
630+
"max": 1,
631+
"min": 0,
632+
"valType": "number"
633+
},
634+
"role": "object"
635+
},
618636
"activeshape": {
619637
"editType": "none",
620638
"fillcolor": {
@@ -3421,6 +3439,40 @@
34213439
"valType": "any"
34223440
}
34233441
},
3442+
"newselection": {
3443+
"editType": "none",
3444+
"line": {
3445+
"color": {
3446+
"description": "Sets the line color. By default uses either dark grey or white to increase contrast with background color.",
3447+
"editType": "none",
3448+
"valType": "color"
3449+
},
3450+
"dash": {
3451+
"description": "Sets the dash style of lines. Set to a dash type string (*solid*, *dot*, *dash*, *longdash*, *dashdot*, or *longdashdot*) or a dash length list in px (eg *5px,10px,2px,2px*).",
3452+
"dflt": "dot",
3453+
"editType": "none",
3454+
"valType": "string",
3455+
"values": [
3456+
"solid",
3457+
"dot",
3458+
"dash",
3459+
"longdash",
3460+
"dashdot",
3461+
"longdashdot"
3462+
]
3463+
},
3464+
"editType": "none",
3465+
"role": "object",
3466+
"width": {
3467+
"description": "Sets the line width (in px).",
3468+
"dflt": 1,
3469+
"editType": "none",
3470+
"min": 1,
3471+
"valType": "number"
3472+
}
3473+
},
3474+
"role": "object"
3475+
},
34243476
"newshape": {
34253477
"drawdirection": {
34263478
"description": "When `dragmode` is set to *drawrect*, *drawline* or *drawcircle* this limits the drag to be horizontal, vertical or diagonal. Using *diagonal* there is no limit e.g. in drawing lines in any direction. *ortho* limits the draw to be either horizontal or vertical. *horizontal* allows horizontal extend. *vertical* allows vertical extend.",
@@ -6845,6 +6897,117 @@
68456897
"editType": "none",
68466898
"valType": "any"
68476899
},
6900+
"selections": {
6901+
"items": {
6902+
"selection": {
6903+
"editType": "arraydraw",
6904+
"line": {
6905+
"color": {
6906+
"anim": true,
6907+
"description": "Sets the line color.",
6908+
"editType": "arraydraw",
6909+
"valType": "color"
6910+
},
6911+
"dash": {
6912+
"description": "Sets the dash style of lines. Set to a dash type string (*solid*, *dot*, *dash*, *longdash*, *dashdot*, or *longdashdot*) or a dash length list in px (eg *5px,10px,2px,2px*).",
6913+
"dflt": "dot",
6914+
"editType": "arraydraw",
6915+
"valType": "string",
6916+
"values": [
6917+
"solid",
6918+
"dot",
6919+
"dash",
6920+
"longdash",
6921+
"dashdot",
6922+
"longdashdot"
6923+
]
6924+
},
6925+
"editType": "arraydraw",
6926+
"role": "object",
6927+
"width": {
6928+
"anim": true,
6929+
"description": "Sets the line width (in px).",
6930+
"dflt": 1,
6931+
"editType": "arraydraw",
6932+
"min": 1,
6933+
"valType": "number"
6934+
}
6935+
},
6936+
"name": {
6937+
"description": "When used in a template, named items are created in the output figure in addition to any items the figure already has in this array. You can modify these items in the output figure by making your own item with `templateitemname` matching this `name` alongside your modifications (including `visible: false` or `enabled: false` to hide it). Has no effect outside of a template.",
6938+
"editType": "arraydraw",
6939+
"valType": "string"
6940+
},
6941+
"opacity": {
6942+
"description": "Sets the opacity of the selection.",
6943+
"dflt": 0.7,
6944+
"editType": "arraydraw",
6945+
"max": 1,
6946+
"min": 0,
6947+
"valType": "number"
6948+
},
6949+
"path": {
6950+
"description": "For `type` *path* - a valid SVG path with the pixel values similar to `shapes.path`.",
6951+
"editType": "arraydraw",
6952+
"valType": "string"
6953+
},
6954+
"role": "object",
6955+
"templateitemname": {
6956+
"description": "Used to refer to a named item in this array in the template. Named items from the template will be created even without a matching item in the input figure, but you can modify one by making an item with `templateitemname` matching its `name`, alongside your modifications (including `visible: false` or `enabled: false` to hide it). If there is no template or no matching item, this item will be hidden unless you explicitly show it with `visible: true`.",
6957+
"editType": "arraydraw",
6958+
"valType": "string"
6959+
},
6960+
"type": {
6961+
"description": "Specifies the selection type to be drawn. If *rect*, a rectangle is drawn linking (`x0`,`y0`), (`x1`,`y0`), (`x1`,`y1`) and (`x0`,`y1`). If *path*, draw a custom SVG path using `path`.",
6962+
"editType": "arraydraw",
6963+
"valType": "enumerated",
6964+
"values": [
6965+
"rect",
6966+
"path"
6967+
]
6968+
},
6969+
"x0": {
6970+
"description": "Sets the selection's starting x position.",
6971+
"editType": "arraydraw",
6972+
"valType": "any"
6973+
},
6974+
"x1": {
6975+
"description": "Sets the selection's end x position.",
6976+
"editType": "arraydraw",
6977+
"valType": "any"
6978+
},
6979+
"xref": {
6980+
"description": "Sets the selection's x coordinate axis. If set to a x axis id (e.g. *x* or *x2*), the `x` position refers to a x coordinate. If set to *paper*, the `x` position refers to the distance from the left of the plotting area in normalized coordinates where *0* (*1*) corresponds to the left (right). If set to a x axis ID followed by *domain* (separated by a space), the position behaves like for *paper*, but refers to the distance in fractions of the domain length from the left of the domain of that axis: e.g., *x2 domain* refers to the domain of the second x axis and a x position of 0.5 refers to the point between the left and the right of the domain of the second x axis.",
6981+
"editType": "arraydraw",
6982+
"valType": "enumerated",
6983+
"values": [
6984+
"paper",
6985+
"/^x([2-9]|[1-9][0-9]+)?( domain)?$/"
6986+
]
6987+
},
6988+
"y0": {
6989+
"description": "Sets the selection's starting y position.",
6990+
"editType": "arraydraw",
6991+
"valType": "any"
6992+
},
6993+
"y1": {
6994+
"description": "Sets the selection's end y position.",
6995+
"editType": "arraydraw",
6996+
"valType": "any"
6997+
},
6998+
"yref": {
6999+
"description": "Sets the selection's x coordinate axis. If set to a y axis id (e.g. *y* or *y2*), the `y` position refers to a y coordinate. If set to *paper*, the `y` position refers to the distance from the bottom of the plotting area in normalized coordinates where *0* (*1*) corresponds to the bottom (top). If set to a y axis ID followed by *domain* (separated by a space), the position behaves like for *paper*, but refers to the distance in fractions of the domain length from the bottom of the domain of that axis: e.g., *y2 domain* refers to the domain of the second y axis and a y position of 0.5 refers to the point between the bottom and the top of the domain of the second y axis.",
7000+
"editType": "arraydraw",
7001+
"valType": "enumerated",
7002+
"values": [
7003+
"paper",
7004+
"/^y([2-9]|[1-9][0-9]+)?( domain)?$/"
7005+
]
7006+
}
7007+
}
7008+
},
7009+
"role": "object"
7010+
},
68487011
"separators": {
68497012
"description": "Sets the decimal and thousand separators. For example, *. * puts a '.' before decimals and a space between thousands. In English locales, dflt is *.,* but other locales may alter this default.",
68507013
"editType": "plot",

0 commit comments

Comments
 (0)