diff --git a/draftlogs/6653_add.md b/draftlogs/6653_add.md new file mode 100644 index 00000000000..8657114060f --- /dev/null +++ b/draftlogs/6653_add.md @@ -0,0 +1 @@ + - add options to include shapes and `newshape` in legends [[#6653](https://github.com/plotly/plotly.js/pull/6653)] diff --git a/src/components/colorbar/draw.js b/src/components/colorbar/draw.js index 1aed5caaf13..a695747e113 100644 --- a/src/components/colorbar/draw.js +++ b/src/components/colorbar/draw.js @@ -117,6 +117,7 @@ function makeColorBarData(gd) { for(var i = 0; i < calcdata.length; i++) { var cd = calcdata[i]; trace = cd[0].trace; + if(!trace._module) continue; var moduleOpts = trace._module.colorbar; if(trace.visible === true && moduleOpts) { diff --git a/src/components/legend/defaults.js b/src/components/legend/defaults.js index 19f24beec7b..0cdcd82b0df 100644 --- a/src/components/legend/defaults.js +++ b/src/components/legend/defaults.js @@ -41,7 +41,9 @@ function groupDefaults(legendId, layoutIn, layoutOut, fullData) { var legendReallyHasATrace = false; var defaultOrder = 'normal'; - var allLegendItems = fullData.filter(function(d) { + var shapesWithLegend = (layoutOut.shapes || []).filter(function(d) { return d.showlegend; }); + + var allLegendItems = fullData.concat(shapesWithLegend).filter(function(d) { return legendId === (d.legend || 'legend'); }); @@ -50,6 +52,8 @@ function groupDefaults(legendId, layoutIn, layoutOut, fullData) { if(!trace.visible) continue; + var isShape = trace._isShape; + // Note that we explicitly count any trace that is either shown or // *would* be shown by default, toward the two traces you need to // ensure the legend is shown by default, because this can still help @@ -67,7 +71,7 @@ function groupDefaults(legendId, layoutIn, layoutOut, fullData) { legendReallyHasATrace = true; // Always show the legend by default if there's a pie, // or if there's only one trace but it's explicitly shown - if(Registry.traceIs(trace, 'pie-like') || + if(!isShape && Registry.traceIs(trace, 'pie-like') || trace._input.showlegend === true ) { legendTraceCount++; @@ -77,7 +81,7 @@ function groupDefaults(legendId, layoutIn, layoutOut, fullData) { Lib.coerceFont(traceCoerce, 'legendgrouptitle.font', grouptitlefont); } - if((Registry.traceIs(trace, 'bar') && layoutOut.barmode === 'stack') || + if((!isShape && Registry.traceIs(trace, 'bar') && layoutOut.barmode === 'stack') || ['tonextx', 'tonexty'].indexOf(trace.fill) !== -1) { defaultOrder = helpers.isGrouped({traceorder: defaultOrder}) ? 'grouped+reversed' : 'reversed'; @@ -199,17 +203,37 @@ function groupDefaults(legendId, layoutIn, layoutOut, fullData) { module.exports = function legendDefaults(layoutIn, layoutOut, fullData) { var i; - var legends = ['legend']; - for(i = 0; i < fullData.length; i++) { - Lib.pushUnique(legends, fullData[i].legend); + var allLegendsData = fullData.slice(); + + // shapes could also show up in legends + var shapes = layoutOut.shapes; + if(shapes) { + for(i = 0; i < shapes.length; i++) { + var shape = shapes[i]; + if(!shape.showlegend) continue; + + var mockTrace = { + _input: shape._input, + visible: shape.visible, + showlegend: shape.showlegend, + legend: shape.legend + }; + + allLegendsData.push(mockTrace); + } + } + + var legends = ['legend']; + for(i = 0; i < allLegendsData.length; i++) { + Lib.pushUnique(legends, allLegendsData[i].legend); } layoutOut._legends = []; for(i = 0; i < legends.length; i++) { var legendId = legends[i]; - groupDefaults(legendId, layoutIn, layoutOut, fullData); + groupDefaults(legendId, layoutIn, layoutOut, allLegendsData); if( layoutOut[legendId] && diff --git a/src/components/legend/draw.js b/src/components/legend/draw.js index 1430225de84..7d7faa25a21 100644 --- a/src/components/legend/draw.js +++ b/src/components/legend/draw.js @@ -77,8 +77,44 @@ function drawOne(gd, opts) { var legendData; if(!inHover) { - if(!gd.calcdata) return; - legendData = fullLayout.showlegend && getLegendData(gd.calcdata, legendObj, fullLayout._legends.length > 1); + var calcdata = (gd.calcdata || []).slice(); + + var shapes = fullLayout.shapes; + for(var i = 0; i < shapes.length; i++) { + var shape = shapes[i]; + if(!shape.showlegend) continue; + + var shapeLegend = { + _isShape: true, + _fullInput: shape, + index: shape._index, + name: shape.name || shape.label.text || ('shape ' + shape._index), + legend: shape.legend, + legendgroup: shape.legendgroup, + legendgrouptitle: shape.legendgrouptitle, + legendrank: shape.legendrank, + legendwidth: shape.legendwidth, + showlegend: shape.showlegend, + visible: shape.visible, + opacity: shape.opacity, + mode: shape.type === 'line' ? 'lines' : 'markers', + line: shape.line, + marker: { + line: shape.line, + color: shape.fillcolor, + size: 12, + symbol: + shape.type === 'rect' ? 'square' : + shape.type === 'circle' ? 'circle' : + // case of path + 'hexagon2' + }, + }; + + calcdata.push([{ trace: shapeLegend }]); + } + if(!calcdata.length) return; + legendData = fullLayout.showlegend && getLegendData(calcdata, legendObj, fullLayout._legends.length > 1); } else { if(!legendObj.entries) return; legendData = getLegendData(legendObj.entries, legendObj); @@ -491,9 +527,9 @@ function drawTexts(g, gd, legendObj) { if(Registry.hasTransform(fullInput, 'groupby')) { var groupbyIndices = Registry.getTransformIndices(fullInput, 'groupby'); - var index = groupbyIndices[groupbyIndices.length - 1]; + var _index = groupbyIndices[groupbyIndices.length - 1]; - var kcont = Lib.keyedContainer(fullInput, 'transforms[' + index + '].styles', 'target', 'value.name'); + var kcont = Lib.keyedContainer(fullInput, 'transforms[' + _index + '].styles', 'target', 'value.name'); kcont.set(legendItem.trace._group, newName); @@ -502,7 +538,11 @@ function drawTexts(g, gd, legendObj) { update.name = newName; } - return Registry.call('_guiRestyle', gd, update, trace.index); + if(fullInput._isShape) { + return Registry.call('_guiRelayout', gd, 'shapes[' + trace.index + '].name', update.name); + } else { + return Registry.call('_guiRestyle', gd, update, trace.index); + } }); } else { textLayout(textEl, g, gd, legendObj); diff --git a/src/components/legend/handle_click.js b/src/components/legend/handle_click.js index c711b5bfb43..5c83154201c 100644 --- a/src/components/legend/handle_click.js +++ b/src/components/legend/handle_click.js @@ -39,25 +39,32 @@ module.exports = function handleClick(g, gd, numClicks) { if(legendItem.groupTitle && legendItem.noClick) return; var fullData = gd._fullData; + var shapesWithLegend = (fullLayout.shapes || []).filter(function(d) { return d.showlegend; }); + var allLegendItems = fullData.concat(shapesWithLegend); + var fullTrace = legendItem.trace; + if(fullTrace._isShape) { + fullTrace = fullTrace._fullInput; + } + var legendgroup = fullTrace.legendgroup; var i, j, kcont, key, keys, val; - var attrUpdate = {}; - var attrIndices = []; + var dataUpdate = {}; + var dataIndices = []; var carrs = []; var carrIdx = []; - function insertUpdate(traceIndex, key, value) { - var attrIndex = attrIndices.indexOf(traceIndex); - var valueArray = attrUpdate[key]; + function insertDataUpdate(traceIndex, value) { + var attrIndex = dataIndices.indexOf(traceIndex); + var valueArray = dataUpdate.visible; if(!valueArray) { - valueArray = attrUpdate[key] = []; + valueArray = dataUpdate.visible = []; } - if(attrIndices.indexOf(traceIndex) === -1) { - attrIndices.push(traceIndex); - attrIndex = attrIndices.length - 1; + if(dataIndices.indexOf(traceIndex) === -1) { + dataIndices.push(traceIndex); + attrIndex = dataIndices.length - 1; } valueArray[attrIndex] = value; @@ -65,17 +72,32 @@ module.exports = function handleClick(g, gd, numClicks) { return attrIndex; } + var updatedShapes = (fullLayout.shapes || []).map(function(d) { + return d._input; + }); + + var shapesUpdated = false; + + function insertShapesUpdate(shapeIndex, value) { + updatedShapes[shapeIndex].visible = value; + shapesUpdated = true; + } + function setVisibility(fullTrace, visibility) { if(legendItem.groupTitle && !toggleGroup) return; - var fullInput = fullTrace._fullInput; + var fullInput = fullTrace._fullInput || fullTrace; + var isShape = fullInput._isShape; + var index = fullInput.index; + if(index === undefined) index = fullInput._index; + if(Registry.hasTransform(fullInput, 'groupby')) { - var kcont = carrs[fullInput.index]; + var kcont = carrs[index]; if(!kcont) { var groupbyIndices = Registry.getTransformIndices(fullInput, 'groupby'); var lastGroupbyIndex = groupbyIndices[groupbyIndices.length - 1]; kcont = Lib.keyedContainer(fullInput, 'transforms[' + lastGroupbyIndex + '].styles', 'target', 'value.visible'); - carrs[fullInput.index] = kcont; + carrs[index] = kcont; } var curState = kcont.get(fullTrace._group); @@ -93,20 +115,27 @@ module.exports = function handleClick(g, gd, numClicks) { // true -> legendonly. All others toggle to true: kcont.set(fullTrace._group, visibility); } - carrIdx[fullInput.index] = insertUpdate(fullInput.index, 'visible', fullInput.visible === false ? false : true); + carrIdx[index] = insertDataUpdate(index, fullInput.visible === false ? false : true); } else { // false -> false (not possible since will not be visible in legend) // true -> legendonly // legendonly -> true var nextVisibility = fullInput.visible === false ? false : visibility; - insertUpdate(fullInput.index, 'visible', nextVisibility); + if(isShape) { + insertShapesUpdate(index, nextVisibility); + } else { + insertDataUpdate(index, nextVisibility); + } } } var thisLegend = fullTrace.legend; - if(Registry.traceIs(fullTrace, 'pie-like')) { + var fullInput = fullTrace._fullInput; + var isShape = fullInput && fullInput._isShape; + + if(!isShape && Registry.traceIs(fullTrace, 'pie-like')) { var thisLabel = legendItem.label; var thisLabelIndex = hiddenSlices.indexOf(thisLabel); @@ -149,8 +178,8 @@ module.exports = function handleClick(g, gd, numClicks) { var traceIndicesInGroup = []; var tracei; if(hasLegendgroup) { - for(i = 0; i < fullData.length; i++) { - tracei = fullData[i]; + for(i = 0; i < allLegendItems.length; i++) { + tracei = allLegendItems[i]; if(!tracei.visible) continue; if(tracei.legendgroup === legendgroup) { traceIndicesInGroup.push(i); @@ -175,9 +204,10 @@ module.exports = function handleClick(g, gd, numClicks) { if(hasLegendgroup) { if(toggleGroup) { - for(i = 0; i < fullData.length; i++) { - if(fullData[i].visible !== false && fullData[i].legendgroup === legendgroup) { - setVisibility(fullData[i], nextVisibility); + for(i = 0; i < allLegendItems.length; i++) { + var item = allLegendItems[i]; + if(item.visible !== false && item.legendgroup === legendgroup) { + setVisibility(item, nextVisibility); } } } else { @@ -189,40 +219,43 @@ module.exports = function handleClick(g, gd, numClicks) { } else if(mode === 'toggleothers') { // Compute the clicked index. expandedIndex does what we want for expanded traces // but also culls hidden traces. That means we have some work to do. - var isClicked, isInGroup, notInLegend, otherState; + var isClicked, isInGroup, notInLegend, otherState, _item; var isIsolated = true; - for(i = 0; i < fullData.length; i++) { - isClicked = fullData[i] === fullTrace; - notInLegend = fullData[i].showlegend !== true; + for(i = 0; i < allLegendItems.length; i++) { + _item = allLegendItems[i]; + isClicked = _item === fullTrace; + notInLegend = _item.showlegend !== true; if(isClicked || notInLegend) continue; - isInGroup = (hasLegendgroup && fullData[i].legendgroup === legendgroup); + isInGroup = (hasLegendgroup && _item.legendgroup === legendgroup); - if(fullData[i].legend === thisLegend && !isInGroup && fullData[i].visible === true && !Registry.traceIs(fullData[i], 'notLegendIsolatable')) { + if(!isInGroup && _item.legend === thisLegend && _item.visible === true && !Registry.traceIs(_item, 'notLegendIsolatable')) { isIsolated = false; break; } } - for(i = 0; i < fullData.length; i++) { + for(i = 0; i < allLegendItems.length; i++) { + _item = allLegendItems[i]; + // False is sticky; we don't change it. Also ensure we don't change states of itmes in other legend - if(fullData[i].visible === false || fullData[i].legend !== thisLegend) continue; + if(_item.visible === false || _item.legend !== thisLegend) continue; - if(Registry.traceIs(fullData[i], 'notLegendIsolatable')) { + if(Registry.traceIs(_item, 'notLegendIsolatable')) { continue; } switch(fullTrace.visible) { case 'legendonly': - setVisibility(fullData[i], true); + setVisibility(_item, true); break; case true: otherState = isIsolated ? true : 'legendonly'; - isClicked = fullData[i] === fullTrace; + isClicked = _item === fullTrace; // N.B. consider traces that have a set legendgroup as toggleable - notInLegend = (fullData[i].showlegend !== true && !fullData[i].legendgroup); - isInGroup = isClicked || (hasLegendgroup && fullData[i].legendgroup === legendgroup); - setVisibility(fullData[i], (isInGroup || notInLegend) ? true : otherState); + notInLegend = (_item.showlegend !== true && !_item.legendgroup); + isInGroup = isClicked || (hasLegendgroup && _item.legendgroup === legendgroup); + setVisibility(_item, (isInGroup || notInLegend) ? true : otherState); break; } } @@ -236,7 +269,7 @@ module.exports = function handleClick(g, gd, numClicks) { var updateKeys = Object.keys(update); for(j = 0; j < updateKeys.length; j++) { key = updateKeys[j]; - val = attrUpdate[key] = attrUpdate[key] || []; + val = dataUpdate[key] = dataUpdate[key] || []; val[carrIdx[i]] = update[key]; } } @@ -245,17 +278,21 @@ module.exports = function handleClick(g, gd, numClicks) { // values should be explicitly undefined for them to get properly culled // as updates and not accidentally reset to the default value. This fills // out sparse arrays with the required number of undefined values: - keys = Object.keys(attrUpdate); + keys = Object.keys(dataUpdate); for(i = 0; i < keys.length; i++) { key = keys[i]; - for(j = 0; j < attrIndices.length; j++) { + for(j = 0; j < dataIndices.length; j++) { // Use hasOwnProperty to protect against falsy values: - if(!attrUpdate[key].hasOwnProperty(j)) { - attrUpdate[key][j] = undefined; + if(!dataUpdate[key].hasOwnProperty(j)) { + dataUpdate[key][j] = undefined; } } } - Registry.call('_guiRestyle', gd, attrUpdate, attrIndices); + if(shapesUpdated) { + Registry.call('_guiUpdate', gd, dataUpdate, {shapes: updatedShapes}, dataIndices); + } else { + Registry.call('_guiRestyle', gd, dataUpdate, dataIndices); + } } }; diff --git a/src/components/shapes/attributes.js b/src/components/shapes/attributes.js index 220723c5354..589110eb1d1 100644 --- a/src/components/shapes/attributes.js +++ b/src/components/shapes/attributes.js @@ -7,19 +7,82 @@ var dash = require('../drawing/attributes').dash; var extendFlat = require('../../lib/extend').extendFlat; var templatedArray = require('../../plot_api/plot_template').templatedArray; var axisPlaceableObjs = require('../../constants/axis_placeable_objects'); +var basePlotAttributes = require('../../plots/attributes'); var shapeTexttemplateAttrs = require('../../plots/template_attributes').shapeTexttemplateAttrs; var shapeLabelTexttemplateVars = require('./label_texttemplate'); module.exports = templatedArray('shape', { - visible: { + visible: extendFlat({}, basePlotAttributes.visible, { + editType: 'calc+arraydraw', + description: [ + 'Determines whether or not this shape is visible.', + 'If *legendonly*, the shape is not drawn,', + 'but can appear as a legend item', + '(provided that the legend itself is visible).' + ].join(' ') + }), + + showlegend: { valType: 'boolean', - dflt: true, + dflt: false, editType: 'calc+arraydraw', description: [ - 'Determines whether or not this shape is visible.' + 'Determines whether or not this', + 'shape is shown in the legend.' ].join(' ') }, + legend: extendFlat({}, basePlotAttributes.legend, { + editType: 'calc+arraydraw', + description: [ + 'Sets the reference to a legend to show this shape in.', + 'References to these legends are *legend*, *legend2*, *legend3*, etc.', + 'Settings for these legends are set in the layout, under', + '`layout.legend`, `layout.legend2`, etc.' + ].join(' ') + }), + + legendgroup: extendFlat({}, basePlotAttributes.legendgroup, { + editType: 'calc+arraydraw', + description: [ + 'Sets the legend group for this shape.', + 'Traces and shapes part of the same legend group hide/show at the same time', + 'when toggling legend items.' + ].join(' ') + }), + + legendgrouptitle: { + text: extendFlat({}, basePlotAttributes.legendgrouptitle.text, { + editType: 'calc+arraydraw' + }), + font: fontAttrs({ + editType: 'calc+arraydraw', + description: [ + 'Sets this legend group\'s title font.' + ].join(' '), + }), + editType: 'calc+arraydraw', + }, + + legendrank: extendFlat({}, basePlotAttributes.legendrank, { + editType: 'calc+arraydraw', + description: [ + 'Sets the legend rank for this shape.', + 'Items and groups with smaller ranks are presented on top/left side while', + 'with *reversed* `legend.traceorder` they are on bottom/right side.', + 'The default legendrank is 1000,', + 'so that you can use ranks less than 1000 to place certain items before all unranked items,', + 'and ranks greater than 1000 to go after all unranked items.', + 'When having unranked or equal rank items shapes would be displayed after traces', + 'i.e. according to their order in data and layout.' + ].join(' ') + }), + + legendwidth: extendFlat({}, basePlotAttributes.legendwidth, { + editType: 'calc+arraydraw', + description: 'Sets the width (in px or fraction) of the legend for this shape.', + }), + type: { valType: 'enumerated', values: ['circle', 'rect', 'path', 'line'], @@ -232,7 +295,10 @@ module.exports = templatedArray('shape', { valType: 'string', dflt: '', editType: 'arraydraw', - description: 'Sets the text to display with shape.' + description: [ + 'Sets the text to display with shape.', + 'It is also used for legend item if `name` is not provided.' + ].join(' ') }, texttemplate: shapeTexttemplateAttrs({}, {keys: Object.keys(shapeLabelTexttemplateVars)}), font: fontAttrs({ diff --git a/src/components/shapes/defaults.js b/src/components/shapes/defaults.js index 813b7e21253..3f52437b654 100644 --- a/src/components/shapes/defaults.js +++ b/src/components/shapes/defaults.js @@ -29,9 +29,21 @@ function handleShapeDefaults(shapeIn, shapeOut, fullLayout) { return Lib.coerce(shapeIn, shapeOut, attributes, attr, dflt); } + shapeOut._isShape = true; + var visible = coerce('visible'); if(!visible) return; + var showlegend = coerce('showlegend'); + if(showlegend) { + coerce('legend'); + coerce('legendwidth'); + coerce('legendgroup'); + coerce('legendgrouptitle.text'); + Lib.coerceFont(coerce, 'legendgrouptitle.font'); + coerce('legendrank'); + } + var path = coerce('path'); var dfltType = path ? 'path' : 'rect'; var shapeType = coerce('type', dfltType); diff --git a/src/components/shapes/draw.js b/src/components/shapes/draw.js index a6465fc6b0a..26339816c75 100644 --- a/src/components/shapes/draw.js +++ b/src/components/shapes/draw.js @@ -58,7 +58,7 @@ function draw(gd) { } for(var i = 0; i < fullLayout.shapes.length; i++) { - if(fullLayout.shapes[i].visible) { + if(fullLayout.shapes[i].visible === true) { drawOne(gd, i); } } @@ -89,7 +89,7 @@ function drawOne(gd, index) { // this shape is gone - quit now after deleting it // TODO: use d3 idioms instead of deleting and redrawing every time - if(!options._input || options.visible === false) return; + if(!options._input || options.visible !== true) return; if(options.layer !== 'below') { drawShape(gd._fullLayout._shapeUpperLayer); diff --git a/src/components/shapes/draw_newshape/attributes.js b/src/components/shapes/draw_newshape/attributes.js index c7113ada5c1..4cad7c7d27f 100644 --- a/src/components/shapes/draw_newshape/attributes.js +++ b/src/components/shapes/draw_newshape/attributes.js @@ -1,18 +1,78 @@ 'use strict'; +var overrideAll = require('../../../plot_api/edit_types').overrideAll; +var basePlotAttributes = require('../../../plots/attributes'); var fontAttrs = require('../../../plots/font_attributes'); var dash = require('../../drawing/attributes').dash; var extendFlat = require('../../../lib/extend').extendFlat; var shapeTexttemplateAttrs = require('../../../plots/template_attributes').shapeTexttemplateAttrs; var shapeLabelTexttemplateVars = require('../label_texttemplate'); - -module.exports = { +module.exports = overrideAll({ newshape: { + visible: extendFlat({}, basePlotAttributes.visible, { + description: [ + 'Determines whether or not new shape is visible.', + 'If *legendonly*, the shape is not drawn,', + 'but can appear as a legend item', + '(provided that the legend itself is visible).' + ].join(' ') + }), + + showlegend: { + valType: 'boolean', + dflt: false, + description: [ + 'Determines whether or not new', + 'shape is shown in the legend.' + ].join(' ') + }, + + legend: extendFlat({}, basePlotAttributes.legend, { + description: [ + 'Sets the reference to a legend to show new shape in.', + 'References to these legends are *legend*, *legend2*, *legend3*, etc.', + 'Settings for these legends are set in the layout, under', + '`layout.legend`, `layout.legend2`, etc.' + ].join(' ') + }), + + legendgroup: extendFlat({}, basePlotAttributes.legendgroup, { + description: [ + 'Sets the legend group for new shape.', + 'Traces and shapes part of the same legend group hide/show at the same time', + 'when toggling legend items.' + ].join(' ') + }), + + legendgrouptitle: { + text: extendFlat({}, basePlotAttributes.legendgrouptitle.text, { + }), + font: fontAttrs({ + description: [ + 'Sets this legend group\'s title font.' + ].join(' '), + }) + }, + + legendrank: extendFlat({}, basePlotAttributes.legendrank, { + description: [ + 'Sets the legend rank for new shape.', + 'Items and groups with smaller ranks are presented on top/left side while', + 'with *reversed* `legend.traceorder` they are on bottom/right side.', + 'The default legendrank is 1000,', + 'so that you can use ranks less than 1000 to place certain items before all unranked items,', + 'and ranks greater than 1000 to go after all unranked items.' + ].join(' ') + }), + + legendwidth: extendFlat({}, basePlotAttributes.legendwidth, { + description: 'Sets the width (in px or fraction) of the legend for new shape.', + }), + line: { color: { valType: 'color', - editType: 'none', description: [ 'Sets the line color.', 'By default uses either dark grey or white', @@ -23,19 +83,15 @@ module.exports = { valType: 'number', min: 0, dflt: 4, - editType: 'none', description: 'Sets the line width (in px).' }, dash: extendFlat({}, dash, { dflt: 'solid', - editType: 'none' - }), - editType: 'none' + }) }, fillcolor: { valType: 'color', dflt: 'rgba(0,0,0,0)', - editType: 'none', description: [ 'Sets the color filling new shapes\' interior.', 'Please note that if using a fillcolor with alpha greater than half,', @@ -47,7 +103,6 @@ module.exports = { valType: 'enumerated', values: ['evenodd', 'nonzero'], dflt: 'evenodd', - editType: 'none', description: [ 'Determines the path\'s interior.', 'For more info please visit https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/fill-rule' @@ -58,21 +113,18 @@ module.exports = { min: 0, max: 1, dflt: 1, - editType: 'none', description: 'Sets the opacity of new shapes.' }, layer: { valType: 'enumerated', values: ['below', 'above'], dflt: 'above', - editType: 'none', description: 'Specifies whether new shapes are drawn below or above traces.' }, drawdirection: { valType: 'enumerated', values: ['ortho', 'horizontal', 'vertical', 'diagonal'], dflt: 'diagonal', - editType: 'none', description: [ 'When `dragmode` is set to *drawrect*, *drawline* or *drawcircle*', 'this limits the drag to be horizontal, vertical or diagonal.', @@ -82,16 +134,25 @@ module.exports = { '*vertical* allows vertical extend.' ].join(' ') }, + + name: extendFlat({}, basePlotAttributes.name, { + description: [ + 'Sets new shape name.', + 'The name appears as the legend item.' + ].join(' ') + }), + label: { text: { valType: 'string', dflt: '', - editType: 'none', - description: 'Sets the text to display with the new shape.' + description: [ + 'Sets the text to display with the new shape.', + 'It is also used for legend item if `name` is not provided.' + ].join(' ') }, - texttemplate: shapeTexttemplateAttrs({newshape: true, editType: 'none'}, {keys: Object.keys(shapeLabelTexttemplateVars)}), + texttemplate: shapeTexttemplateAttrs({newshape: true}, {keys: Object.keys(shapeLabelTexttemplateVars)}), font: fontAttrs({ - editType: 'none', description: 'Sets the new shape label text font.' }), textposition: { @@ -102,7 +163,6 @@ module.exports = { 'bottom left', 'bottom center', 'bottom right', 'start', 'middle', 'end', ], - editType: 'none', description: [ 'Sets the position of the label text relative to the new shape.', 'Supported values for rectangles, circles and paths are', @@ -116,7 +176,6 @@ module.exports = { textangle: { valType: 'angle', dflt: 'auto', - editType: 'none', description: [ 'Sets the angle at which the label text is drawn', 'with respect to the horizontal. For lines, angle *auto*', @@ -128,7 +187,6 @@ module.exports = { valType: 'enumerated', values: ['auto', 'left', 'center', 'right'], dflt: 'auto', - editType: 'none', description: [ 'Sets the label\'s horizontal position anchor', 'This anchor binds the specified `textposition` to the *left*, *center*', @@ -142,7 +200,6 @@ module.exports = { yanchor: { valType: 'enumerated', values: ['top', 'middle', 'bottom'], - editType: 'none', description: [ 'Sets the label\'s vertical position anchor', 'This anchor binds the specified `textposition` to the *top*, *middle*', @@ -157,19 +214,15 @@ module.exports = { valType: 'number', dflt: 3, min: 0, - editType: 'none', description: 'Sets padding (in px) between edge of label and edge of new shape.' - }, - editType: 'none' - }, - editType: 'none' + } + } }, activeshape: { fillcolor: { valType: 'color', dflt: 'rgb(255,0,255)', - editType: 'none', description: 'Sets the color filling the active shape\' interior.' }, opacity: { @@ -177,9 +230,7 @@ module.exports = { min: 0, max: 1, dflt: 0.5, - editType: 'none', description: 'Sets the opacity of the active shape.' - }, - editType: 'none' + } } -}; +}, 'none', 'from-root'); diff --git a/src/components/shapes/draw_newshape/defaults.js b/src/components/shapes/draw_newshape/defaults.js index 7afaee766aa..b13d070efb5 100644 --- a/src/components/shapes/draw_newshape/defaults.js +++ b/src/components/shapes/draw_newshape/defaults.js @@ -14,6 +14,16 @@ function dfltLabelYanchor(isLine, labelTextPosition) { } module.exports = function supplyDrawNewShapeDefaults(layoutIn, layoutOut, coerce) { + coerce('newshape.visible'); + coerce('newshape.name'); + coerce('newshape.showlegend'); + coerce('newshape.legend'); + coerce('newshape.legendwidth'); + coerce('newshape.legendgroup'); + coerce('newshape.legendgrouptitle.text'); + Lib.coerceFont(coerce, 'newshape.legendgrouptitle.font'); + coerce('newshape.legendrank'); + coerce('newshape.drawdirection'); coerce('newshape.layer'); coerce('newshape.fillcolor'); diff --git a/src/components/shapes/draw_newshape/newshapes.js b/src/components/shapes/draw_newshape/newshapes.js index 42443374543..9db9a237a4d 100644 --- a/src/components/shapes/draw_newshape/newshapes.js +++ b/src/components/shapes/draw_newshape/newshapes.js @@ -125,6 +125,18 @@ function createShapeObj(outlines, dragOptions, dragmode) { var newShape = { editable: true, + visible: newStyle.visible, + name: newStyle.name, + showlegend: newStyle.showlegend, + legend: newStyle.legend, + legendwidth: newStyle.legendwidth, + legendgroup: newStyle.legendgroup, + legendgrouptitle: { + text: newStyle.legendgrouptitle.text, + font: newStyle.legendgrouptitle.font + }, + legendrank: newStyle.legendrank, + label: newStyle.label, xref: xPaper ? 'paper' : xaxis._id, diff --git a/src/core.js b/src/core.js index 4089e582dea..99d86862ef6 100644 --- a/src/core.js +++ b/src/core.js @@ -31,8 +31,6 @@ register(require('./traces/scatter')); // register all registrable components modules register([ - require('./components/legend'), - require('./components/fx'), // fx needs to come after legend require('./components/annotations'), require('./components/annotations3d'), require('./components/selections'), @@ -46,6 +44,8 @@ register([ require('./components/errorbars'), require('./components/colorscale'), require('./components/colorbar'), + require('./components/legend'), // legend needs to come after shape | legend defaults depends on shapes + require('./components/fx'), // fx needs to come after legend | unified hover defaults depends on legends require('./components/modebar') ]); diff --git a/src/plot_api/edit_types.js b/src/plot_api/edit_types.js index 8fe27acb178..ae2ab5ba897 100644 --- a/src/plot_api/edit_types.js +++ b/src/plot_api/edit_types.js @@ -1,8 +1,7 @@ 'use strict'; -var Lib = require('../lib'); -var extendFlat = Lib.extendFlat; -var isPlainObject = Lib.isPlainObject; +var extendFlat = require('../lib/extend').extendFlat; +var isPlainObject = require('../lib/is_plain_object'); var traceOpts = { valType: 'flaglist', diff --git a/src/plot_api/plot_api.js b/src/plot_api/plot_api.js index 7088f08eb3d..e069252767f 100644 --- a/src/plot_api/plot_api.js +++ b/src/plot_api/plot_api.js @@ -2228,6 +2228,15 @@ function _relayout(gd, aobj) { // couldn't editType do this? if(updateAutosize(gd) || aobj.height || aobj.width) flags.plot = true; + // update shape legends + var shapes = fullLayout.shapes; + for(i = 0; i < shapes.length; i++) { + if(shapes[i].showlegend) { + flags.calc = true; + break; + } + } + if(flags.plot || flags.calc) { flags.layoutReplot = true; } diff --git a/src/plots/attributes.js b/src/plots/attributes.js index 479fc46d7d6..d297f69d5f1 100644 --- a/src/plots/attributes.js +++ b/src/plots/attributes.js @@ -50,7 +50,7 @@ module.exports = { editType: 'style', description: [ 'Sets the legend group for this trace.', - 'Traces part of the same legend group hide/show at the same time', + 'Traces and shapes part of the same legend group hide/show at the same time', 'when toggling legend items.' ].join(' ') }, @@ -81,7 +81,9 @@ module.exports = { 'with *reversed* `legend.traceorder` they are on bottom/right side.', 'The default legendrank is 1000,', 'so that you can use ranks less than 1000 to place certain items before all unranked items,', - 'and ranks greater than 1000 to go after all unranked items.' + 'and ranks greater than 1000 to go after all unranked items.', + 'When having unranked or equal rank items shapes would be displayed after traces', + 'i.e. according to their order in data and layout.' ].join(' ') }, legendwidth: { @@ -103,7 +105,7 @@ module.exports = { editType: 'style', description: [ 'Sets the trace name.', - 'The trace name appear as the legend item and on hover.' + 'The trace name appears as the legend item and on hover.' ].join(' ') }, uid: { diff --git a/src/plots/get_data.js b/src/plots/get_data.js index 5561692960e..18e19a97edf 100644 --- a/src/plots/get_data.js +++ b/src/plots/get_data.js @@ -70,7 +70,7 @@ exports.getModuleCalcData = function(calcdata, arg1) { // would suggest), but by 'module plot method' so that if some traces // share the same module plot method (e.g. bar and histogram), we // only call it one! - if(trace._module.plot === plotMethod) { + if(trace._module && trace._module.plot === plotMethod) { moduleCalcData.push(cd); } else { remainingCalcData.push(cd); diff --git a/src/traces/box/attributes.js b/src/traces/box/attributes.js index 81fdce06524..32e510f995b 100644 --- a/src/traces/box/attributes.js +++ b/src/traces/box/attributes.js @@ -79,7 +79,7 @@ module.exports = { editType: 'calc+clearAxisTypes', description: [ 'Sets the trace name.', - 'The trace name appear as the legend item and on hover.', + 'The trace name appears as the legend item and on hover.', 'For box traces, the name will also be used for the position', 'coordinate, if `x` and `x0` (`y` and `y0` if horizontal) are', 'missing and the position axis is categorical' diff --git a/src/traces/violin/attributes.js b/src/traces/violin/attributes.js index 9cb1d9f33af..18d1358ee13 100644 --- a/src/traces/violin/attributes.js +++ b/src/traces/violin/attributes.js @@ -16,7 +16,7 @@ module.exports = { name: extendFlat({}, boxAttrs.name, { description: [ 'Sets the trace name.', - 'The trace name appear as the legend item and on hover.', + 'The trace name appears as the legend item and on hover.', 'For violin traces, the name will also be used for the position', 'coordinate, if `x` and `x0` (`y` and `y0` if horizontal) are', 'missing and the position axis is categorical.', diff --git a/test/image/baselines/text_on_shapes_basic.png b/test/image/baselines/text_on_shapes_basic.png index 72f5fbfe570..d926fcd2cb6 100644 Binary files a/test/image/baselines/text_on_shapes_basic.png and b/test/image/baselines/text_on_shapes_basic.png differ diff --git a/test/image/baselines/text_on_shapes_reversed_axes.png b/test/image/baselines/text_on_shapes_reversed_axes.png index 97a8c237113..19ce714ea8a 100644 Binary files a/test/image/baselines/text_on_shapes_reversed_axes.png and b/test/image/baselines/text_on_shapes_reversed_axes.png differ diff --git a/test/image/mocks/multi-legends.json b/test/image/mocks/multi-legends.json index ad2d01466a9..ba4280045f9 100644 --- a/test/image/mocks/multi-legends.json +++ b/test/image/mocks/multi-legends.json @@ -55,9 +55,28 @@ "text": "Legend 3" } }, - "hovermode": "x unified" + "hovermode": "x unified", + "dragmode": "drawline", + "newshape": { + "legend": "legend2", + "line": { + "color": "pink" + }, + "label": { + "text": "new shape" + }, + "showlegend": true + } }, "config": { - "editable": true + "editable": true, + "modeBarButtonsToAdd": [ + "drawline", + "drawopenpath", + "drawclosedpath", + "drawcircle", + "drawrect", + "eraseshape" + ] } } diff --git a/test/image/mocks/text_on_shapes_basic.json b/test/image/mocks/text_on_shapes_basic.json index 0918a6a94bf..5dad57e6c39 100644 --- a/test/image/mocks/text_on_shapes_basic.json +++ b/test/image/mocks/text_on_shapes_basic.json @@ -7,22 +7,65 @@ "layout": { "xaxis":{"title":{"text":"linear"},"range":[0,10],"type":"linear","showgrid":false,"zeroline":false,"showticklabels":false}, "yaxis":{"title":{"text":"linear"},"range":[0,10],"type":"linear","showgrid":false,"zeroline":false,"showticklabels":false}, - "height":400, - "width":800, + "height":500, + "width":1000, "margin": {"l":20,"r":20,"pad":0}, - "showlegend":false, + "showlegend": true, "shapes":[ - {"label":{"text":"angle zero", "textangle":0, "textposition": "end", "padding": 20},"xref":"paper","yref":"paper","x0":0.6,"x1":0.8,"y0":0.3,"y1":0.6, "type": "line"}, - {"label":{"text":"top right, xanchor right,
angle 45", "xanchor":"right", "textangle":45, "textposition": "top right", "padding": 20}, "layer":"below","xref":"paper","yref":"paper","x0":0.5,"x1":0.6,"y0":0.4,"y1":0.6}, - {"label":{"text":"top right", "textposition": "top right"}, "xref":"paper","yref":"paper","type":"circle","x0":0.3,"x1":0.35,"y0":0.2,"y1":0.4}, - {"label":{"text":"xanchor right, position not set
two lines", "xanchor":"right", "padding": 10, "font": {"family":"Courier New, monospace", "size":20}}, "xref":"paper","yref":"paper","type":"line","x0":0.8,"x1":0.9,"y0":0.8,"y1":0.9}, - {"label":{"text":"position auto, xanchor center, angle -30", "xanchor":"center", "textangle":-30}, "layer":"below","x0":2,"x1":3,"y0":7,"y1":9.5,"opacity":0.5,"fillcolor":"#05e","line":{"width":3,"color":"#025","dash":"dashdot"}}, - {"label":{"text":"position auto, yanchor top", "yanchor": "top"}, "yref":"paper","type":"line","x0":1.1,"x1":2.4,"y0":0.1,"y1":0.4,"line":{"color":"#039","dash":"dot","width":2}}, - {"label":{"text":"position auto, xanchor center", "xanchor":"center"}, "xref":"paper","x0":0.8,"x1":0.9,"y0":1,"y1":3,"fillcolor":"#ccc"}, - {"label":{"text":"position end", "textposition": "end"}, "yref":"paper","type":"line","x0":4.1,"x1":6.4,"y0":0.2,"y1":0.0,"line":{"color":"#339","width":3}} - ] + { + "showlegend": true, + "label":{"text":"angle zero", "textangle":0, "textposition": "end", "padding": 20},"xref":"paper","yref":"paper","x0":0.6,"x1":0.8,"y0":0.3,"y1":0.6, "type": "line" + }, + { + "showlegend": true, + "label":{"text":"top right, xanchor right,
angle 45", "xanchor":"right", "textangle":45, "textposition": "top right", "padding": 20}, "layer":"below","xref":"paper","yref":"paper","x0":0.5,"x1":0.6,"y0":0.4,"y1":0.6 + }, + { + "showlegend": true, + "label":{"text":"top right", "textposition": "top right"}, "xref":"paper","yref":"paper","type":"circle","x0":0.3,"x1":0.35,"y0":0.2,"y1":0.4 + }, + { + "showlegend": true, "legendgroup":"g1", "legendgrouptitle": { "text": "1st group" }, + "label":{"text":"xanchor right, position not set
two lines", "xanchor":"right", "padding": 10, "font": {"family":"Courier New, monospace", "size":20}}, "xref":"paper","yref":"paper","type":"line","x0":0.8,"x1":0.9,"y0":0.8,"y1":0.9 + }, + { + "showlegend": true, "legendgroup":"g1", + "label":{"text":"position auto, xanchor center, angle -30", "xanchor":"center", "textangle":-30}, "layer":"below","x0":2,"x1":3,"y0":7,"y1":9.5,"opacity":0.5,"fillcolor":"#05e","line":{"width":3,"color":"#025","dash":"dashdot"} + }, + { + "showlegend": true, "legendgroup":"g2", "legendgrouptitle": { "text": "2nd group" }, + "label":{"text":"position auto, yanchor top", "yanchor": "top"}, "yref":"paper","type":"line","x0":1.1,"x1":2.4,"y0":0.1,"y1":0.4,"line":{"color":"#039","dash":"dot","width":2} + }, + { + "showlegend": true, "legendgroup":"g2", "legendrank": 1, + "label":{"text":"position auto, xanchor center", "xanchor":"center"}, "xref":"paper","x0":0.8,"x1":0.9,"y0":1,"y1":3,"fillcolor":"#ccc" + }, + { + "showlegend": true, "legendgroup":"g2", + "label":{"text":"position end", "textposition": "end"}, "yref":"paper","type":"line","x0":4.1,"x1":6.4,"y0":0.2,"y1":0.0,"line":{"color":"#339","width":3} + } + ], + "newshape": { + "line": { + "color": "pink" + }, + "name": "A New Shape", + "label": { + "text": "new shape label" + }, + "showlegend": true + }, + "dragmode": "drawline" }, "config": { - "editable": true + "editable": false, + "modeBarButtonsToAdd": [ + "drawline", + "drawopenpath", + "drawclosedpath", + "drawcircle", + "drawrect", + "eraseshape" + ] } } diff --git a/test/image/mocks/text_on_shapes_reversed_axes.json b/test/image/mocks/text_on_shapes_reversed_axes.json index aeeec4a6a51..c611bc0107a 100644 --- a/test/image/mocks/text_on_shapes_reversed_axes.json +++ b/test/image/mocks/text_on_shapes_reversed_axes.json @@ -12,7 +12,8 @@ } ], "layout": { - "width": 800, + "showlegend": true, + "width": 1000, "height": 600, "margin": { "t": 100, @@ -27,6 +28,7 @@ "layout": { "shapes": [ { + "showlegend": true, "label": {"text": "label"}, "name": "myPath", "editable": true, @@ -45,6 +47,7 @@ }, "shapes": [ { + "showlegend": true, "label": {"text": "label 1 (top right)", "textposition": "top right"}, "editable": true, "layer": "below", @@ -60,6 +63,7 @@ "y1": 75 }, { + "showlegend": true, "label": {"text": "label 2"}, "editable": true, "type": "circle", @@ -74,6 +78,7 @@ "y1": 75 }, { + "showlegend": true, "label": {"text": "label 3"}, "editable": true, "line": { @@ -83,6 +88,7 @@ "path": "M250,25L225,75L275,75Z" }, { + "showlegend": true, "label": {"text": "label 4"}, "editable": true, "line": { @@ -91,6 +97,9 @@ "path": "M250,225L225,275L275,275" }, { + "showlegend": true, + "legendgroup": "group 1", + "legendgrouptitle": { "text": "group 1" }, "label": {"text": "label 5"}, "editable": true, "layer": "below", @@ -101,6 +110,8 @@ } }, { + "showlegend": true, + "legendgroup": "group 1", "label": {"text": "label 6"}, "editable": true, "line": { @@ -111,6 +122,8 @@ "path": "M0,100V200H50L0,300Q100,300 100,200T150,200C100,300 200,300 200,200S150,200 150,100Z" }, { + "showlegend": true, + "legend": "legend2", "label": {"text": "label 7"}, "editable": true, "line": { @@ -124,6 +137,20 @@ "newshape": { "label": { "text": "TEXT" + }, + "line": { + "color": "pink" + }, + "showlegend": true, + "legend": "legend2", + "legendgroup": "group 2", + "legendgrouptitle": { "text": "new shapes group" } + }, + "legend2": { + "y": 0, + "bgcolor": "lightblue", + "title": { + "text": "Legend 2" } } }, diff --git a/test/jasmine/tests/legend_test.js b/test/jasmine/tests/legend_test.js index 398598d11dc..9723dd52961 100644 --- a/test/jasmine/tests/legend_test.js +++ b/test/jasmine/tests/legend_test.js @@ -1674,6 +1674,67 @@ describe('legend interaction', function() { }); }); + describe('editable mode interactions for shape legends', function() { + var gd; + + var mock = { + data: [], + layout: { + shapes: [ + {showlegend: true, type: 'line', xref: 'paper', yref: 'paper', x0: 0.1, y0: 0.2, x1: 0.2, y1: 0.1}, + {showlegend: true, type: 'line', xref: 'paper', yref: 'paper', x0: 0.3, y0: 0.4, x1: 0.4, y1: 0.3}, + {showlegend: true, type: 'line', xref: 'paper', yref: 'paper', x0: 0.5, y0: 0.6, x1: 0.6, y1: 0.5}, + {showlegend: true, type: 'line', xref: 'paper', yref: 'paper', x0: 0.7, y0: 0.8, x1: 0.8, y1: 0.7}, + {showlegend: true, type: 'line', xref: 'paper', yref: 'paper', x0: 0.9, y0: 1.0, x1: 1.0, y1: 0.9} + ] + }, + config: {editable: true} + }; + + beforeEach(function(done) { + gd = createGraphDiv(); + Plotly.newPlot(gd, Lib.extendDeep({}, mock)).then(done); + }); + + afterEach(destroyGraphDiv); + + function _setValue(index, str) { + var item = d3SelectAll('text.legendtext')[0][index || 0]; + item.dispatchEvent(new MouseEvent('click')); + return delay(20)().then(function() { + var input = d3Select('.plugin-editable.editable'); + input.text(str); + input.node().dispatchEvent(new KeyboardEvent('blur')); + }).then(delay(20)); + } + + function assertLabels(expected) { + var labels = []; + d3SelectAll('text.legendtext').each(function() { + labels.push(this.textContent); + }); + expect(labels).toEqual(expected); + } + + it('sets and unsets shape group names', function(done) { + assertLabels(['shape 0', 'shape 1', 'shape 2', 'shape 3', 'shape 4']); + // Set the name of the first shape: + _setValue(0, 'foo').then(function() { + expect(gd.layout.shapes[0].name).toEqual('foo'); + // labels shorter than half the longest get padded with spaces to match the longest length + assertLabels(['foo ', 'shape 1', 'shape 2', 'shape 3', 'shape 4']); + + // Set the name of the third legend item: + return _setValue(3, 'barbar'); + }).then(function() { + expect(gd.layout.shapes[3].name).toEqual('barbar'); + assertLabels(['foo ', 'shape 1', 'shape 2', 'barbar', 'shape 4']); + + return _setValue(2, 'asdf'); + }).then(done, done.fail); + }); + }); + describe('staticPlot', function() { var gd; @@ -1821,6 +1882,13 @@ describe('legend interaction', function() { }; } + function assertVisibleShapes(expectation) { + return function() { + var actual = extractVisibilities(gd._fullLayout.shapes); + expect(actual).toEqual(expectation); + }; + } + describe('for regular traces', function() { beforeEach(function(done) { Plotly.newPlot(gd, [ @@ -1927,6 +1995,50 @@ describe('legend interaction', function() { }); }); + describe('click shape legends', function() { + beforeEach(function(done) { + Plotly.newPlot(gd, [], { + shapes: [ + {showlegend: true, type: 'line', xref: 'paper', yref: 'paper', x0: 0.1, y0: 0.2, x1: 0.2, y1: 0.1, visible: false}, + {showlegend: true, type: 'line', xref: 'paper', yref: 'paper', x0: 0.3, y0: 0.4, x1: 0.4, y1: 0.3, visible: 'legendonly'}, + {showlegend: true, type: 'line', xref: 'paper', yref: 'paper', x0: 0.5, y0: 0.6, x1: 0.6, y1: 0.5} + ] + }).then(done); + }); + + it('clicking once toggles legendonly -> true', function(done) { + Promise.resolve() + .then(assertVisibleShapes([false, 'legendonly', true])) + .then(click(0)) + .then(assertVisibleShapes([false, true, true])) + .then(done, done.fail); + }); + + it('clicking once toggles true -> legendonly', function(done) { + Promise.resolve() + .then(assertVisibleShapes([false, 'legendonly', true])) + .then(click(1)) + .then(assertVisibleShapes([false, 'legendonly', 'legendonly'])) + .then(done, done.fail); + }); + + it('double-clicking isolates a visible shape', function(done) { + Promise.resolve() + .then(click(0)) + .then(assertVisibleShapes([false, true, true])) + .then(click(0, 2)) + .then(assertVisibleShapes([false, true, 'legendonly'])) + .then(done, done.fail); + }); + + it('double-clicking an isolated trace shows all non-hidden shapes', function(done) { + Promise.resolve() + .then(click(0, 2)) + .then(assertVisibleShapes([false, true, true])) + .then(done, done.fail); + }); + }); + describe('legendgroup visibility', function() { beforeEach(function(done) { Plotly.newPlot(gd, [{ diff --git a/test/plot-schema.json b/test/plot-schema.json index bcfc5775feb..571ce2f7460 100644 --- a/test/plot-schema.json +++ b/test/plot-schema.json @@ -3651,7 +3651,7 @@ }, "role": "object", "text": { - "description": "Sets the text to display with the new shape.", + "description": "Sets the text to display with the new shape. It is also used for legend item if `name` is not provided.", "dflt": "", "editType": "none", "valType": "string" @@ -3720,6 +3720,61 @@ "above" ] }, + "legend": { + "description": "Sets the reference to a legend to show new shape in. References to these legends are *legend*, *legend2*, *legend3*, etc. Settings for these legends are set in the layout, under `layout.legend`, `layout.legend2`, etc.", + "dflt": "legend", + "editType": "none", + "valType": "subplotid" + }, + "legendgroup": { + "description": "Sets the legend group for new shape. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.", + "dflt": "", + "editType": "none", + "valType": "string" + }, + "legendgrouptitle": { + "editType": "none", + "font": { + "color": { + "editType": "none", + "valType": "color" + }, + "description": "Sets this legend group's title font.", + "editType": "none", + "family": { + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*,, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "editType": "none", + "noBlank": true, + "strict": true, + "valType": "string" + }, + "role": "object", + "size": { + "editType": "none", + "min": 1, + "valType": "number" + } + }, + "role": "object", + "text": { + "description": "Sets the title of the legend group.", + "dflt": "", + "editType": "none", + "valType": "string" + } + }, + "legendrank": { + "description": "Sets the legend rank for new shape. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items.", + "dflt": 1000, + "editType": "none", + "valType": "number" + }, + "legendwidth": { + "description": "Sets the width (in px or fraction) of the legend for new shape.", + "editType": "none", + "min": 0, + "valType": "number" + }, "line": { "color": { "description": "Sets the line color. By default uses either dark grey or white to increase contrast with background color.", @@ -3750,6 +3805,11 @@ "valType": "number" } }, + "name": { + "description": "Sets new shape name. The name appears as the legend item.", + "editType": "none", + "valType": "string" + }, "opacity": { "description": "Sets the opacity of new shapes.", "dflt": 1, @@ -3758,7 +3818,24 @@ "min": 0, "valType": "number" }, - "role": "object" + "role": "object", + "showlegend": { + "description": "Determines whether or not new shape is shown in the legend.", + "dflt": false, + "editType": "none", + "valType": "boolean" + }, + "visible": { + "description": "Determines whether or not new shape is visible. If *legendonly*, the shape is not drawn, but can appear as a legend item (provided that the legend itself is visible).", + "dflt": true, + "editType": "none", + "valType": "enumerated", + "values": [ + true, + false, + "legendonly" + ] + } }, "paper_bgcolor": { "description": "Sets the background color of the paper where the graph is drawn.", @@ -7308,7 +7385,7 @@ }, "role": "object", "text": { - "description": "Sets the text to display with shape.", + "description": "Sets the text to display with shape. It is also used for legend item if `name` is not provided.", "dflt": "", "editType": "arraydraw", "valType": "string" @@ -7377,6 +7454,61 @@ "above" ] }, + "legend": { + "description": "Sets the reference to a legend to show this shape in. References to these legends are *legend*, *legend2*, *legend3*, etc. Settings for these legends are set in the layout, under `layout.legend`, `layout.legend2`, etc.", + "dflt": "legend", + "editType": "calc+arraydraw", + "valType": "subplotid" + }, + "legendgroup": { + "description": "Sets the legend group for this shape. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.", + "dflt": "", + "editType": "calc+arraydraw", + "valType": "string" + }, + "legendgrouptitle": { + "editType": "calc+arraydraw", + "font": { + "color": { + "editType": "calc+arraydraw", + "valType": "color" + }, + "description": "Sets this legend group's title font.", + "editType": "calc+arraydraw", + "family": { + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*,, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "editType": "calc+arraydraw", + "noBlank": true, + "strict": true, + "valType": "string" + }, + "role": "object", + "size": { + "editType": "calc+arraydraw", + "min": 1, + "valType": "number" + } + }, + "role": "object", + "text": { + "description": "Sets the title of the legend group.", + "dflt": "", + "editType": "calc+arraydraw", + "valType": "string" + } + }, + "legendrank": { + "description": "Sets the legend rank for this shape. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.", + "dflt": 1000, + "editType": "calc+arraydraw", + "valType": "number" + }, + "legendwidth": { + "description": "Sets the width (in px or fraction) of the legend for this shape.", + "editType": "calc+arraydraw", + "min": 0, + "valType": "number" + }, "line": { "color": { "anim": true, @@ -7428,6 +7560,12 @@ "valType": "string" }, "role": "object", + "showlegend": { + "description": "Determines whether or not this shape is shown in the legend.", + "dflt": false, + "editType": "calc+arraydraw", + "valType": "boolean" + }, "templateitemname": { "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`.", "editType": "calc", @@ -7445,10 +7583,15 @@ ] }, "visible": { - "description": "Determines whether or not this shape is visible.", + "description": "Determines whether or not this shape is visible. If *legendonly*, the shape is not drawn, but can appear as a legend item (provided that the legend itself is visible).", "dflt": true, "editType": "calc+arraydraw", - "valType": "boolean" + "valType": "enumerated", + "values": [ + true, + false, + "legendonly" + ] }, "x0": { "description": "Sets the shape's starting x position. See `type` and `xsizemode` for more info.", @@ -12953,7 +13096,7 @@ "valType": "subplotid" }, "legendgroup": { - "description": "Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items.", + "description": "Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.", "dflt": "", "editType": "style", "valType": "string" @@ -12990,7 +13133,7 @@ } }, "legendrank": { - "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items.", + "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.", "dflt": 1000, "editType": "style", "valType": "number" @@ -13800,7 +13943,7 @@ "valType": "string" }, "name": { - "description": "Sets the trace name. The trace name appear as the legend item and on hover.", + "description": "Sets the trace name. The trace name appears as the legend item and on hover.", "editType": "style", "valType": "string" }, @@ -14502,7 +14645,7 @@ "valType": "subplotid" }, "legendgroup": { - "description": "Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items.", + "description": "Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.", "dflt": "", "editType": "style", "valType": "string" @@ -14539,7 +14682,7 @@ } }, "legendrank": { - "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items.", + "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.", "dflt": 1000, "editType": "style", "valType": "number" @@ -15348,7 +15491,7 @@ "valType": "string" }, "name": { - "description": "Sets the trace name. The trace name appear as the legend item and on hover.", + "description": "Sets the trace name. The trace name appears as the legend item and on hover.", "editType": "style", "valType": "string" }, @@ -15830,7 +15973,7 @@ "valType": "subplotid" }, "legendgroup": { - "description": "Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items.", + "description": "Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.", "dflt": "", "editType": "style", "valType": "string" @@ -15867,7 +16010,7 @@ } }, "legendrank": { - "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items.", + "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.", "dflt": 1000, "editType": "style", "valType": "number" @@ -16502,7 +16645,7 @@ "valType": "string" }, "name": { - "description": "Sets the trace name. The trace name appear as the legend item and on hover. For box traces, the name will also be used for the position coordinate, if `x` and `x0` (`y` and `y0` if horizontal) are missing and the position axis is categorical", + "description": "Sets the trace name. The trace name appears as the legend item and on hover. For box traces, the name will also be used for the position coordinate, if `x` and `x0` (`y` and `y0` if horizontal) are missing and the position axis is categorical", "editType": "calc+clearAxisTypes", "valType": "string" }, @@ -17180,7 +17323,7 @@ "valType": "subplotid" }, "legendgroup": { - "description": "Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items.", + "description": "Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.", "dflt": "", "editType": "style", "valType": "string" @@ -17217,7 +17360,7 @@ } }, "legendrank": { - "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items.", + "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.", "dflt": 1000, "editType": "style", "valType": "number" @@ -17261,7 +17404,7 @@ "valType": "string" }, "name": { - "description": "Sets the trace name. The trace name appear as the legend item and on hover.", + "description": "Sets the trace name. The trace name appears as the legend item and on hover.", "editType": "style", "valType": "string" }, @@ -18737,7 +18880,7 @@ } }, "legendrank": { - "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items.", + "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.", "dflt": 1000, "editType": "style", "valType": "number" @@ -18760,7 +18903,7 @@ "valType": "string" }, "name": { - "description": "Sets the trace name. The trace name appear as the legend item and on hover.", + "description": "Sets the trace name. The trace name appears as the legend item and on hover.", "editType": "style", "valType": "string" }, @@ -19582,7 +19725,7 @@ "valType": "subplotid" }, "legendgroup": { - "description": "Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items.", + "description": "Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.", "dflt": "", "editType": "style", "valType": "string" @@ -19619,7 +19762,7 @@ } }, "legendrank": { - "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items.", + "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.", "dflt": 1000, "editType": "style", "valType": "number" @@ -19711,7 +19854,7 @@ "valType": "string" }, "name": { - "description": "Sets the trace name. The trace name appear as the legend item and on hover.", + "description": "Sets the trace name. The trace name appears as the legend item and on hover.", "editType": "style", "valType": "string" }, @@ -20603,7 +20746,7 @@ "valType": "subplotid" }, "legendgroup": { - "description": "Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items.", + "description": "Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.", "dflt": "", "editType": "style", "valType": "string" @@ -20640,7 +20783,7 @@ } }, "legendrank": { - "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items.", + "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.", "dflt": 1000, "editType": "style", "valType": "number" @@ -20720,7 +20863,7 @@ "valType": "string" }, "name": { - "description": "Sets the trace name. The trace name appear as the legend item and on hover.", + "description": "Sets the trace name. The trace name appears as the legend item and on hover.", "editType": "style", "valType": "string" }, @@ -21653,7 +21796,7 @@ "valType": "subplotid" }, "legendgroup": { - "description": "Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items.", + "description": "Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.", "dflt": "", "editType": "style", "valType": "string" @@ -21690,7 +21833,7 @@ } }, "legendrank": { - "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items.", + "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.", "dflt": 1000, "editType": "style", "valType": "number" @@ -21801,7 +21944,7 @@ "valType": "string" }, "name": { - "description": "Sets the trace name. The trace name appear as the legend item and on hover.", + "description": "Sets the trace name. The trace name appears as the legend item and on hover.", "editType": "style", "valType": "string" }, @@ -22879,7 +23022,7 @@ "valType": "subplotid" }, "legendgroup": { - "description": "Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items.", + "description": "Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.", "dflt": "", "editType": "style", "valType": "string" @@ -22916,7 +23059,7 @@ } }, "legendrank": { - "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items.", + "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.", "dflt": 1000, "editType": "style", "valType": "number" @@ -22976,7 +23119,7 @@ "valType": "string" }, "name": { - "description": "Sets the trace name. The trace name appear as the legend item and on hover.", + "description": "Sets the trace name. The trace name appears as the legend item and on hover.", "editType": "style", "valType": "string" }, @@ -24151,7 +24294,7 @@ "valType": "subplotid" }, "legendgroup": { - "description": "Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items.", + "description": "Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.", "dflt": "", "editType": "style", "valType": "string" @@ -24188,7 +24331,7 @@ } }, "legendrank": { - "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items.", + "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.", "dflt": 1000, "editType": "style", "valType": "number" @@ -24248,7 +24391,7 @@ "valType": "string" }, "name": { - "description": "Sets the trace name. The trace name appear as the legend item and on hover.", + "description": "Sets the trace name. The trace name appears as the legend item and on hover.", "editType": "style", "valType": "string" }, @@ -25134,7 +25277,7 @@ "valType": "subplotid" }, "legendgroup": { - "description": "Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items.", + "description": "Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.", "dflt": "", "editType": "style", "valType": "string" @@ -25171,7 +25314,7 @@ } }, "legendrank": { - "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items.", + "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.", "dflt": 1000, "editType": "style", "valType": "number" @@ -25204,7 +25347,7 @@ "valType": "string" }, "name": { - "description": "Sets the trace name. The trace name appear as the legend item and on hover.", + "description": "Sets the trace name. The trace name appears as the legend item and on hover.", "editType": "style", "valType": "string" }, @@ -25677,7 +25820,7 @@ "valType": "subplotid" }, "legendgroup": { - "description": "Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items.", + "description": "Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.", "dflt": "", "editType": "style", "valType": "string" @@ -25714,7 +25857,7 @@ } }, "legendrank": { - "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items.", + "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.", "dflt": 1000, "editType": "style", "valType": "number" @@ -26430,7 +26573,7 @@ "valType": "string" }, "name": { - "description": "Sets the trace name. The trace name appear as the legend item and on hover.", + "description": "Sets the trace name. The trace name appears as the legend item and on hover.", "editType": "style", "valType": "string" }, @@ -27132,7 +27275,7 @@ "valType": "subplotid" }, "legendgroup": { - "description": "Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items.", + "description": "Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.", "dflt": "", "editType": "style", "valType": "string" @@ -27169,7 +27312,7 @@ } }, "legendrank": { - "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items.", + "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.", "dflt": 1000, "editType": "style", "valType": "number" @@ -27328,7 +27471,7 @@ "valType": "string" }, "name": { - "description": "Sets the trace name. The trace name appear as the legend item and on hover.", + "description": "Sets the trace name. The trace name appears as the legend item and on hover.", "editType": "style", "valType": "string" }, @@ -28329,7 +28472,7 @@ "valType": "subplotid" }, "legendgroup": { - "description": "Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items.", + "description": "Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.", "dflt": "", "editType": "style", "valType": "string" @@ -28366,7 +28509,7 @@ } }, "legendrank": { - "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items.", + "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.", "dflt": 1000, "editType": "style", "valType": "number" @@ -28389,7 +28532,7 @@ "valType": "string" }, "name": { - "description": "Sets the trace name. The trace name appear as the legend item and on hover.", + "description": "Sets the trace name. The trace name appears as the legend item and on hover.", "editType": "style", "valType": "string" }, @@ -29525,7 +29668,7 @@ } }, "legendrank": { - "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items.", + "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.", "dflt": 1000, "editType": "style", "valType": "number" @@ -29548,7 +29691,7 @@ "valType": "string" }, "name": { - "description": "Sets the trace name. The trace name appear as the legend item and on hover.", + "description": "Sets the trace name. The trace name appears as the legend item and on hover.", "editType": "style", "valType": "string" }, @@ -30287,7 +30430,7 @@ "valType": "subplotid" }, "legendgroup": { - "description": "Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items.", + "description": "Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.", "dflt": "", "editType": "style", "valType": "string" @@ -30324,7 +30467,7 @@ } }, "legendrank": { - "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items.", + "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.", "dflt": 1000, "editType": "style", "valType": "number" @@ -31133,7 +31276,7 @@ "valType": "string" }, "name": { - "description": "Sets the trace name. The trace name appear as the legend item and on hover.", + "description": "Sets the trace name. The trace name appears as the legend item and on hover.", "editType": "style", "valType": "string" }, @@ -32295,7 +32438,7 @@ "valType": "subplotid" }, "legendgroup": { - "description": "Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items.", + "description": "Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.", "dflt": "", "editType": "style", "valType": "string" @@ -32332,7 +32475,7 @@ } }, "legendrank": { - "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items.", + "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.", "dflt": 1000, "editType": "style", "valType": "number" @@ -32369,7 +32512,7 @@ "valType": "string" }, "name": { - "description": "Sets the trace name. The trace name appear as the legend item and on hover.", + "description": "Sets the trace name. The trace name appears as the legend item and on hover.", "editType": "style", "valType": "string" }, @@ -33589,7 +33732,7 @@ "valType": "subplotid" }, "legendgroup": { - "description": "Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items.", + "description": "Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.", "dflt": "", "editType": "style", "valType": "string" @@ -33626,7 +33769,7 @@ } }, "legendrank": { - "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items.", + "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.", "dflt": 1000, "editType": "style", "valType": "number" @@ -33701,7 +33844,7 @@ "valType": "string" }, "name": { - "description": "Sets the trace name. The trace name appear as the legend item and on hover.", + "description": "Sets the trace name. The trace name appears as the legend item and on hover.", "editType": "style", "valType": "string" }, @@ -34389,7 +34532,7 @@ } }, "legendrank": { - "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items.", + "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.", "dflt": 1000, "editType": "style", "valType": "number" @@ -35135,7 +35278,7 @@ "valType": "string" }, "name": { - "description": "Sets the trace name. The trace name appear as the legend item and on hover.", + "description": "Sets the trace name. The trace name appears as the legend item and on hover.", "editType": "style", "valType": "string" }, @@ -35725,7 +35868,7 @@ } }, "legendrank": { - "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items.", + "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.", "dflt": 1000, "editType": "style", "valType": "number" @@ -35748,7 +35891,7 @@ "valType": "string" }, "name": { - "description": "Sets the trace name. The trace name appear as the legend item and on hover.", + "description": "Sets the trace name. The trace name appears as the legend item and on hover.", "editType": "style", "valType": "string" }, @@ -36602,7 +36745,7 @@ } }, "legendrank": { - "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items.", + "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.", "dflt": 1000, "editType": "style", "valType": "number" @@ -36636,7 +36779,7 @@ "valType": "flaglist" }, "name": { - "description": "Sets the trace name. The trace name appear as the legend item and on hover.", + "description": "Sets the trace name. The trace name appears as the legend item and on hover.", "editType": "style", "valType": "string" }, @@ -37626,7 +37769,7 @@ "valType": "subplotid" }, "legendgroup": { - "description": "Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items.", + "description": "Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.", "dflt": "", "editType": "style", "valType": "string" @@ -37663,7 +37806,7 @@ } }, "legendrank": { - "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items.", + "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.", "dflt": 1000, "editType": "style", "valType": "number" @@ -37774,7 +37917,7 @@ "valType": "string" }, "name": { - "description": "Sets the trace name. The trace name appear as the legend item and on hover.", + "description": "Sets the trace name. The trace name appears as the legend item and on hover.", "editType": "style", "valType": "string" }, @@ -38937,7 +39080,7 @@ "valType": "subplotid" }, "legendgroup": { - "description": "Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items.", + "description": "Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.", "dflt": "", "editType": "style", "valType": "string" @@ -38974,7 +39117,7 @@ } }, "legendrank": { - "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items.", + "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.", "dflt": 1000, "editType": "style", "valType": "number" @@ -39085,7 +39228,7 @@ "valType": "string" }, "name": { - "description": "Sets the trace name. The trace name appear as the legend item and on hover.", + "description": "Sets the trace name. The trace name appears as the legend item and on hover.", "editType": "style", "valType": "string" }, @@ -39571,7 +39714,7 @@ "valType": "subplotid" }, "legendgroup": { - "description": "Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items.", + "description": "Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.", "dflt": "", "editType": "style", "valType": "string" @@ -39608,7 +39751,7 @@ } }, "legendrank": { - "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items.", + "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.", "dflt": 1000, "editType": "style", "valType": "number" @@ -39666,7 +39809,7 @@ "valType": "string" }, "name": { - "description": "Sets the trace name. The trace name appear as the legend item and on hover.", + "description": "Sets the trace name. The trace name appears as the legend item and on hover.", "editType": "style", "valType": "string" }, @@ -40736,7 +40879,7 @@ "valType": "string" }, "name": { - "description": "Sets the trace name. The trace name appear as the legend item and on hover.", + "description": "Sets the trace name. The trace name appears as the legend item and on hover.", "editType": "style", "valType": "string" }, @@ -41098,7 +41241,7 @@ } }, "legendrank": { - "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items.", + "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.", "dflt": 1000, "editType": "style", "valType": "number" @@ -41780,7 +41923,7 @@ "valType": "string" }, "name": { - "description": "Sets the trace name. The trace name appear as the legend item and on hover.", + "description": "Sets the trace name. The trace name appears as the legend item and on hover.", "editType": "style", "valType": "string" }, @@ -42290,7 +42433,7 @@ "valType": "subplotid" }, "legendgroup": { - "description": "Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items.", + "description": "Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.", "dflt": "", "editType": "style", "valType": "string" @@ -42327,7 +42470,7 @@ } }, "legendrank": { - "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items.", + "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.", "dflt": 1000, "editType": "style", "valType": "number" @@ -42486,7 +42629,7 @@ "valType": "string" }, "name": { - "description": "Sets the trace name. The trace name appear as the legend item and on hover.", + "description": "Sets the trace name. The trace name appears as the legend item and on hover.", "editType": "style", "valType": "string" }, @@ -42985,7 +43128,7 @@ "valType": "subplotid" }, "legendgroup": { - "description": "Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items.", + "description": "Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.", "dflt": "", "editType": "style", "valType": "string" @@ -43022,7 +43165,7 @@ } }, "legendrank": { - "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items.", + "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.", "dflt": 1000, "editType": "style", "valType": "number" @@ -43103,7 +43246,7 @@ "valType": "string" }, "name": { - "description": "Sets the trace name. The trace name appear as the legend item and on hover.", + "description": "Sets the trace name. The trace name appears as the legend item and on hover.", "editType": "style", "valType": "string" }, @@ -43492,7 +43635,7 @@ } }, "legendrank": { - "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items.", + "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.", "dflt": 1000, "editType": "style", "valType": "number" @@ -43794,7 +43937,7 @@ "valType": "string" }, "name": { - "description": "Sets the trace name. The trace name appear as the legend item and on hover.", + "description": "Sets the trace name. The trace name appears as the legend item and on hover.", "editType": "style", "valType": "string" }, @@ -44669,7 +44812,7 @@ "valType": "subplotid" }, "legendgroup": { - "description": "Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items.", + "description": "Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.", "dflt": "", "editType": "style", "valType": "string" @@ -44706,7 +44849,7 @@ } }, "legendrank": { - "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items.", + "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.", "dflt": 1000, "editType": "style", "valType": "number" @@ -46125,7 +46268,7 @@ "valType": "flaglist" }, "name": { - "description": "Sets the trace name. The trace name appear as the legend item and on hover.", + "description": "Sets the trace name. The trace name appears as the legend item and on hover.", "editType": "style", "valType": "string" }, @@ -47048,7 +47191,7 @@ "valType": "subplotid" }, "legendgroup": { - "description": "Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items.", + "description": "Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.", "dflt": "", "editType": "style", "valType": "string" @@ -47085,7 +47228,7 @@ } }, "legendrank": { - "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items.", + "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.", "dflt": 1000, "editType": "style", "valType": "number" @@ -48472,7 +48615,7 @@ "valType": "flaglist" }, "name": { - "description": "Sets the trace name. The trace name appear as the legend item and on hover.", + "description": "Sets the trace name. The trace name appears as the legend item and on hover.", "editType": "style", "valType": "string" }, @@ -49087,7 +49230,7 @@ "valType": "subplotid" }, "legendgroup": { - "description": "Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items.", + "description": "Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.", "dflt": "", "editType": "style", "valType": "string" @@ -49124,7 +49267,7 @@ } }, "legendrank": { - "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items.", + "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.", "dflt": 1000, "editType": "style", "valType": "number" @@ -50524,7 +50667,7 @@ "valType": "flaglist" }, "name": { - "description": "Sets the trace name. The trace name appear as the legend item and on hover.", + "description": "Sets the trace name. The trace name appears as the legend item and on hover.", "editType": "style", "valType": "string" }, @@ -51002,7 +51145,7 @@ "valType": "subplotid" }, "legendgroup": { - "description": "Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items.", + "description": "Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.", "dflt": "", "editType": "style", "valType": "string" @@ -51039,7 +51182,7 @@ } }, "legendrank": { - "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items.", + "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.", "dflt": 1000, "editType": "style", "valType": "number" @@ -52434,7 +52577,7 @@ "valType": "flaglist" }, "name": { - "description": "Sets the trace name. The trace name appear as the legend item and on hover.", + "description": "Sets the trace name. The trace name appears as the legend item and on hover.", "editType": "style", "valType": "string" }, @@ -53084,7 +53227,7 @@ "valType": "subplotid" }, "legendgroup": { - "description": "Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items.", + "description": "Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.", "dflt": "", "editType": "style", "valType": "string" @@ -53121,7 +53264,7 @@ } }, "legendrank": { - "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items.", + "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.", "dflt": 1000, "editType": "style", "valType": "number" @@ -54439,7 +54582,7 @@ "valType": "flaglist" }, "name": { - "description": "Sets the trace name. The trace name appear as the legend item and on hover.", + "description": "Sets the trace name. The trace name appears as the legend item and on hover.", "editType": "style", "valType": "string" }, @@ -55109,7 +55252,7 @@ "valType": "subplotid" }, "legendgroup": { - "description": "Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items.", + "description": "Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.", "dflt": "", "editType": "style", "valType": "string" @@ -55146,7 +55289,7 @@ } }, "legendrank": { - "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items.", + "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.", "dflt": 1000, "editType": "style", "valType": "number" @@ -55878,7 +56021,7 @@ "valType": "flaglist" }, "name": { - "description": "Sets the trace name. The trace name appear as the legend item and on hover.", + "description": "Sets the trace name. The trace name appears as the legend item and on hover.", "editType": "style", "valType": "string" }, @@ -56308,7 +56451,7 @@ "valType": "subplotid" }, "legendgroup": { - "description": "Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items.", + "description": "Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.", "dflt": "", "editType": "style", "valType": "string" @@ -56345,7 +56488,7 @@ } }, "legendrank": { - "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items.", + "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.", "dflt": 1000, "editType": "style", "valType": "number" @@ -57744,7 +57887,7 @@ "valType": "flaglist" }, "name": { - "description": "Sets the trace name. The trace name appear as the legend item and on hover.", + "description": "Sets the trace name. The trace name appears as the legend item and on hover.", "editType": "style", "valType": "string" }, @@ -58245,7 +58388,7 @@ "valType": "subplotid" }, "legendgroup": { - "description": "Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items.", + "description": "Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.", "dflt": "", "editType": "style", "valType": "string" @@ -58282,7 +58425,7 @@ } }, "legendrank": { - "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items.", + "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.", "dflt": 1000, "editType": "style", "valType": "number" @@ -59600,7 +59743,7 @@ "valType": "flaglist" }, "name": { - "description": "Sets the trace name. The trace name appear as the legend item and on hover.", + "description": "Sets the trace name. The trace name appears as the legend item and on hover.", "editType": "style", "valType": "string" }, @@ -60113,7 +60256,7 @@ "valType": "subplotid" }, "legendgroup": { - "description": "Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items.", + "description": "Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.", "dflt": "", "editType": "style", "valType": "string" @@ -60150,7 +60293,7 @@ } }, "legendrank": { - "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items.", + "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.", "dflt": 1000, "editType": "style", "valType": "number" @@ -61549,7 +61692,7 @@ "valType": "flaglist" }, "name": { - "description": "Sets the trace name. The trace name appear as the legend item and on hover.", + "description": "Sets the trace name. The trace name appears as the legend item and on hover.", "editType": "style", "valType": "string" }, @@ -62048,7 +62191,7 @@ "valType": "subplotid" }, "legendgroup": { - "description": "Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items.", + "description": "Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.", "dflt": "", "editType": "style", "valType": "string" @@ -62085,7 +62228,7 @@ } }, "legendrank": { - "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items.", + "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.", "dflt": 1000, "editType": "style", "valType": "number" @@ -63485,7 +63628,7 @@ "valType": "flaglist" }, "name": { - "description": "Sets the trace name. The trace name appear as the legend item and on hover.", + "description": "Sets the trace name. The trace name appears as the legend item and on hover.", "editType": "style", "valType": "string" }, @@ -63985,7 +64128,7 @@ "valType": "subplotid" }, "legendgroup": { - "description": "Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items.", + "description": "Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.", "dflt": "", "editType": "style", "valType": "string" @@ -64022,7 +64165,7 @@ } }, "legendrank": { - "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items.", + "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.", "dflt": 1000, "editType": "style", "valType": "number" @@ -65284,7 +65427,7 @@ "valType": "string" }, "name": { - "description": "Sets the trace name. The trace name appear as the legend item and on hover.", + "description": "Sets the trace name. The trace name appears as the legend item and on hover.", "editType": "style", "valType": "string" }, @@ -66217,7 +66360,7 @@ "valType": "subplotid" }, "legendgroup": { - "description": "Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items.", + "description": "Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.", "dflt": "", "editType": "style", "valType": "string" @@ -66254,7 +66397,7 @@ } }, "legendrank": { - "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items.", + "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.", "dflt": 1000, "editType": "style", "valType": "number" @@ -66372,7 +66515,7 @@ "valType": "string" }, "name": { - "description": "Sets the trace name. The trace name appear as the legend item and on hover.", + "description": "Sets the trace name. The trace name appears as the legend item and on hover.", "editType": "style", "valType": "string" }, @@ -66966,7 +67109,7 @@ } }, "legendrank": { - "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items.", + "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.", "dflt": 1000, "editType": "style", "valType": "number" @@ -67712,7 +67855,7 @@ "valType": "string" }, "name": { - "description": "Sets the trace name. The trace name appear as the legend item and on hover.", + "description": "Sets the trace name. The trace name appears as the legend item and on hover.", "editType": "style", "valType": "string" }, @@ -68994,7 +69137,7 @@ "valType": "subplotid" }, "legendgroup": { - "description": "Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items.", + "description": "Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.", "dflt": "", "editType": "style", "valType": "string" @@ -69031,7 +69174,7 @@ } }, "legendrank": { - "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items.", + "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.", "dflt": 1000, "editType": "style", "valType": "number" @@ -69126,7 +69269,7 @@ "valType": "string" }, "name": { - "description": "Sets the trace name. The trace name appear as the legend item and on hover.", + "description": "Sets the trace name. The trace name appears as the legend item and on hover.", "editType": "style", "valType": "string" }, @@ -69936,7 +70079,7 @@ } }, "legendrank": { - "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items.", + "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.", "dflt": 1000, "editType": "style", "valType": "number" @@ -69959,7 +70102,7 @@ "valType": "string" }, "name": { - "description": "Sets the trace name. The trace name appear as the legend item and on hover.", + "description": "Sets the trace name. The trace name appears as the legend item and on hover.", "editType": "style", "valType": "string" }, @@ -70354,7 +70497,7 @@ } }, "legendrank": { - "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items.", + "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.", "dflt": 1000, "editType": "style", "valType": "number" @@ -71145,7 +71288,7 @@ "valType": "string" }, "name": { - "description": "Sets the trace name. The trace name appear as the legend item and on hover.", + "description": "Sets the trace name. The trace name appears as the legend item and on hover.", "editType": "style", "valType": "string" }, @@ -71768,7 +71911,7 @@ "valType": "subplotid" }, "legendgroup": { - "description": "Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items.", + "description": "Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.", "dflt": "", "editType": "style", "valType": "string" @@ -71805,7 +71948,7 @@ } }, "legendrank": { - "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items.", + "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.", "dflt": 1000, "editType": "style", "valType": "number" @@ -72431,7 +72574,7 @@ "valType": "string" }, "name": { - "description": "Sets the trace name. The trace name appear as the legend item and on hover. For violin traces, the name will also be used for the position coordinate, if `x` and `x0` (`y` and `y0` if horizontal) are missing and the position axis is categorical. Note that the trace name is also used as a default value for attribute `scalegroup` (please see its description for details).", + "description": "Sets the trace name. The trace name appears as the legend item and on hover. For violin traces, the name will also be used for the position coordinate, if `x` and `x0` (`y` and `y0` if horizontal) are missing and the position axis is categorical. Note that the trace name is also used as a default value for attribute `scalegroup` (please see its description for details).", "editType": "calc+clearAxisTypes", "valType": "string" }, @@ -73605,7 +73748,7 @@ "valType": "subplotid" }, "legendgroup": { - "description": "Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items.", + "description": "Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.", "dflt": "", "editType": "style", "valType": "string" @@ -73642,7 +73785,7 @@ } }, "legendrank": { - "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items.", + "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.", "dflt": 1000, "editType": "style", "valType": "number" @@ -73753,7 +73896,7 @@ "valType": "string" }, "name": { - "description": "Sets the trace name. The trace name appear as the legend item and on hover.", + "description": "Sets the trace name. The trace name appears as the legend item and on hover.", "editType": "style", "valType": "string" }, @@ -74456,7 +74599,7 @@ "valType": "subplotid" }, "legendgroup": { - "description": "Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items.", + "description": "Sets the legend group for this trace. Traces and shapes part of the same legend group hide/show at the same time when toggling legend items.", "dflt": "", "editType": "style", "valType": "string" @@ -74493,7 +74636,7 @@ } }, "legendrank": { - "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items.", + "description": "Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder` they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.", "dflt": 1000, "editType": "style", "valType": "number" @@ -74527,7 +74670,7 @@ "valType": "string" }, "name": { - "description": "Sets the trace name. The trace name appear as the legend item and on hover.", + "description": "Sets the trace name. The trace name appears as the legend item and on hover.", "editType": "style", "valType": "string" },