diff --git a/lib/index.js b/lib/index.js index 77d07357c88..d702fd1ba4d 100644 --- a/lib/index.js +++ b/lib/index.js @@ -50,6 +50,7 @@ Plotly.register([ require('./scatterpolar'), require('./scatterpolargl'), require('./barpolar'), + require('./scattersmith'), // transforms require('./aggregate'), diff --git a/lib/scattersmith.js b/lib/scattersmith.js new file mode 100644 index 00000000000..93e87bfbbf3 --- /dev/null +++ b/lib/scattersmith.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('../src/traces/scattersmith'); diff --git a/src/plot_api/plot_api.js b/src/plot_api/plot_api.js index 2848063d2e4..1a9386a3915 100644 --- a/src/plot_api/plot_api.js +++ b/src/plot_api/plot_api.js @@ -3729,6 +3729,9 @@ function makePlotFramework(gd) { // single polar layer for the whole plot fullLayout._polarlayer = fullLayout._paper.append('g').classed('polarlayer', true); + // single smith layer for the whole plot + fullLayout._smithlayer = fullLayout._paper.append('g').classed('smithlayer', true); + // single ternary layer for the whole plot fullLayout._ternarylayer = fullLayout._paper.append('g').classed('ternarylayer', true); diff --git a/src/plots/smith/constants.js b/src/plots/smith/constants.js new file mode 100644 index 00000000000..9f7609f3e63 --- /dev/null +++ b/src/plots/smith/constants.js @@ -0,0 +1,21 @@ +'use strict'; + +module.exports = { + attr: 'subplot', + name: 'smith', + + axisNames: ['imaginaryaxis', 'realaxis'], + axisName2dataArray: {imaginaryaxis: 'theta', realaxis: 'r'}, + + layerNames: [ + 'draglayer', + 'plotbg', + 'angular-grid', + 'radial-grid', + 'frontplot', + 'angular-line', + 'radial-line', + 'angular-axis', + 'radial-axis' + ], +}; diff --git a/src/plots/smith/index.js b/src/plots/smith/index.js new file mode 100644 index 00000000000..91f5056c271 --- /dev/null +++ b/src/plots/smith/index.js @@ -0,0 +1,75 @@ +'use strict'; + +var getSubplotCalcData = require('../get_data').getSubplotCalcData; +var counterRegex = require('../../lib').counterRegex; + +var createSmith = require('./smith'); +var constants = require('./constants'); + +var attr = constants.attr; +var name = constants.name; +var counter = counterRegex(name); + +var attributes = {}; +attributes[attr] = { + valType: 'subplotid', + dflt: name, + editType: 'calc', + description: [ + 'Sets a reference between this trace\'s data coordinates and', + 'a smith subplot.', + 'If *smith* (the default value), the data refer to `layout.smith`.', + 'If *smith2*, the data refer to `layout.smith2`, and so on.' + ].join(' ') +}; + +function plot(gd) { + var fullLayout = gd._fullLayout; + var calcData = gd.calcdata; + var subplotIds = fullLayout._subplots[name]; + + for(var i = 0; i < subplotIds.length; i++) { + var id = subplotIds[i]; + var subplotCalcData = getSubplotCalcData(calcData, name, id); + var subplot = fullLayout[id]._subplot; + + if(!subplot) { + subplot = createSmith(gd, id); + fullLayout[id]._subplot = subplot; + } + + subplot.plot(subplotCalcData, fullLayout, gd._promises); + } +} + +function clean(newFullData, newFullLayout, oldFullData, oldFullLayout) { + var oldIds = oldFullLayout._subplots[name] || []; + + for(var i = 0; i < oldIds.length; i++) { + var id = oldIds[i]; + var oldSubplot = oldFullLayout[id]._subplot; + + if(!newFullLayout[id] && !!oldSubplot) { + oldSubplot.framework.remove(); + oldSubplot.layers['radial-axis-title'].remove(); + + for(var k in oldSubplot.clipPaths) { + oldSubplot.clipPaths[k].remove(); + } + } + } +} + +module.exports = { + attr: attr, + name: name, + idRoot: name, + idRegex: counter, + attrRegex: counter, + attributes: attributes, + layoutAttributes: require('./layout_attributes'), + supplyLayoutDefaults: require('./layout_defaults'), + plot: plot, + clean: clean, + toSVG: require('../cartesian').toSVG +}; diff --git a/src/plots/smith/layout_attributes.js b/src/plots/smith/layout_attributes.js new file mode 100644 index 00000000000..6be40800121 --- /dev/null +++ b/src/plots/smith/layout_attributes.js @@ -0,0 +1,163 @@ +'use strict'; + +var colorAttrs = require('../../components/color/attributes'); +var axesAttrs = require('../cartesian/layout_attributes'); +var domainAttrs = require('../domain').attributes; +var extendFlat = require('../../lib').extendFlat; +var overrideAll = require('../../plot_api/edit_types').overrideAll; + +var axisLineGridAttr = overrideAll({ + color: axesAttrs.color, + showline: extendFlat({}, axesAttrs.showline, {dflt: true}), + linecolor: axesAttrs.linecolor, + linewidth: axesAttrs.linewidth, + showgrid: extendFlat({}, axesAttrs.showgrid, {dflt: true}), + gridcolor: axesAttrs.gridcolor, + gridwidth: axesAttrs.gridwidth +}, 'plot', 'from-root'); + +var axisTickAttrs = overrideAll({ + tickmode: axesAttrs.tickmode, + tickvals: axesAttrs.tickvals, + ticktext: axesAttrs.ticktext, + ticks: axesAttrs.ticks, + ticklen: axesAttrs.ticklen, + tickwidth: axesAttrs.tickwidth, + tickcolor: axesAttrs.tickcolor, + showticklabels: axesAttrs.showticklabels, + showtickprefix: axesAttrs.showtickprefix, + tickprefix: axesAttrs.tickprefix, + showticksuffix: axesAttrs.showticksuffix, + ticksuffix: axesAttrs.ticksuffix, + showexponent: axesAttrs.showexponent, + exponentformat: axesAttrs.exponentformat, + minexponent: axesAttrs.minexponent, + separatethousands: axesAttrs.separatethousands, + tickfont: axesAttrs.tickfont, + tickangle: axesAttrs.tickangle, + tickformat: axesAttrs.tickformat, + tickformatstops: axesAttrs.tickformatstops, + layer: axesAttrs.layer +}, 'plot', 'from-root'); + +var realAxisAttrs = { + visible: extendFlat({}, axesAttrs.visible, {dflt: true}), + + title: { + // radial title is not gui-editable at the moment, + // so it needs dflt: '', similar to carpet axes. + text: extendFlat({}, axesAttrs.title.text, {editType: 'plot', dflt: ''}), + font: extendFlat({}, axesAttrs.title.font, {editType: 'plot'}), + + // TODO + // - might need a 'titleside' and even 'titledirection' down the road + // - what about standoff ?? + + editType: 'plot' + }, + + hoverformat: axesAttrs.hoverformat, + + uirevision: { + valType: 'any', + editType: 'none', + description: [ + 'Controls persistence of user-driven changes in axis `range`,', + '`autorange`, `angle`, and `title` if in `editable: true` configuration.', + 'Defaults to `smith.uirevision`.' + ].join(' ') + }, + + editType: 'calc', +}; + +extendFlat( + realAxisAttrs, + + // N.B. realaxis grid lines are circular, + // but realaxis lines are straight from circle center to outer bound + axisLineGridAttr, + axisTickAttrs +); + +var imaginaryAxisAttrs = { + visible: extendFlat({}, axesAttrs.visible, {dflt: true}), + + direction: { + valType: 'enumerated', + values: ['counterclockwise', 'clockwise'], + dflt: 'counterclockwise', + editType: 'calc', + description: [ + 'Sets the direction corresponding to positive angles.' + ].join(' ') + }, + + rotation: { + valType: 'angle', + editType: 'calc', + description: [ + 'Sets that start position (in degrees) of the angular axis', + 'By default, smith subplots with `direction` set to *counterclockwise*', + 'get a `rotation` of *0*', + 'which corresponds to due East (like what mathematicians prefer).', + 'In turn, smith with `direction` set to *clockwise* get a rotation of *90*', + 'which corresponds to due North (like on a compass),' + ].join(' ') + }, + + hoverformat: axesAttrs.hoverformat, + + uirevision: { + valType: 'any', + editType: 'none', + description: [ + 'Controls persistence of user-driven changes in axis `rotation`.', + 'Defaults to `smith.uirevision`.' + ].join(' ') + }, + + editType: 'calc' +}; + +extendFlat( + imaginaryAxisAttrs, + + // N.B. angular grid lines are straight lines from circle center to outer bound + // the angular line is circular bounding the smith plot area. + axisLineGridAttr, + + // N.B. ticksuffix defaults to '°' for angular axes with `thetaunit: 'degrees'` + axisTickAttrs +); + +module.exports = { + // TODO for x/y/zoom system for paper-based zooming: + // x: {}, + // y: {}, + // zoom: {}, + + domain: domainAttrs({name: 'smith', editType: 'plot'}), + + bgcolor: { + valType: 'color', + editType: 'plot', + dflt: colorAttrs.background, + description: 'Set the background color of the subplot' + }, + + realaxis: realAxisAttrs, + imaginaryaxis: imaginaryAxisAttrs, + + uirevision: { + valType: 'any', + editType: 'none', + description: [ + 'Controls persistence of user-driven changes in axis attributes,', + 'if not overridden in the individual axes.', + 'Defaults to `layout.uirevision`.' + ].join(' ') + }, + + editType: 'calc' +}; diff --git a/src/plots/smith/layout_defaults.js b/src/plots/smith/layout_defaults.js new file mode 100644 index 00000000000..5b33e3cf21c --- /dev/null +++ b/src/plots/smith/layout_defaults.js @@ -0,0 +1,137 @@ +'use strict'; + +var Lib = require('../../lib'); +var Color = require('../../components/color'); +var Template = require('../../plot_api/plot_template'); + +var handleSubplotDefaults = require('../subplot_defaults'); +var getSubplotData = require('../get_data').getSubplotData; + +var handleTickMarkDefaults = require('../cartesian/tick_mark_defaults'); +var handleLineGridDefaults = require('../cartesian/line_grid_defaults'); + +var layoutAttributes = require('./layout_attributes'); +var setConvert = require('./set_convert'); +var constants = require('./constants'); +var axisNames = constants.axisNames; + +function handleDefaults(contIn, contOut, coerce, opts) { + var bgColor = coerce('bgcolor'); + opts.bgColor = Color.combine(bgColor, opts.paper_bgcolor); + + // could optimize, subplotData is not always needed! + var subplotData = getSubplotData(opts.fullData, constants.name, opts.id); + var layoutOut = opts.layoutOut; + var axName; + + function coerceAxis(attr, dflt) { + return coerce(axName + '.' + attr, dflt); + } + + for(var i = 0; i < axisNames.length; i++) { + axName = axisNames[i]; + + if(!Lib.isPlainObject(contIn[axName])) { + contIn[axName] = {}; + } + + var axIn = contIn[axName]; + var axOut = Template.newContainer(contOut, axName); + axOut._id = axOut._name = axName; + axOut._attr = opts.id + '.' + axName; + axOut._traceIndices = subplotData.map(function(t) { return t._expandedIndex; }); + axOut.type = 'linear'; + + var visible = coerceAxis('visible'); + setConvert(axOut, contOut, layoutOut); + + coerceAxis('uirevision', contOut.uirevision); + + var dfltColor; + var dfltFontColor; + + if(visible) { + dfltColor = coerceAxis('color'); + dfltFontColor = (dfltColor === axIn.color) ? dfltColor : opts.font.color; + } + + // We don't want to make downstream code call ax.setScale, + // as both radial and angular axes don't have a set domain. + // Furthermore, angular axes don't have a set range. + // + // Mocked domains and ranges are set by the smith subplot instances, + // but Axes.findExtremes uses the sign of _m to determine which padding value + // to use. + // + // By setting, _m to 1 here, we make Axes.findExtremes think that + // range[1] > range[0], and vice-versa for `autorange: 'reversed'` below. + axOut._m = 1; + + switch(axName) { + case 'realaxis': + axIn.autorange = false; + axOut.cleanRange('range', {dfltRange: [0, 1]}); + + if(visible) { + coerceAxis('title.text'); + Lib.coerceFont(coerceAxis, 'title.font', { + family: opts.font.family, + size: Lib.bigFont(opts.font.size), + color: dfltFontColor + }); + } + break; + + case 'imaginaryaxis': + var direction = coerceAxis('direction'); + coerceAxis('rotation', {counterclockwise: 0, clockwise: 90}[direction]); + break; + } + + if(visible) { + handleTickMarkDefaults(axIn, axOut, coerceAxis, {outerTicks: true}); + + var showTickLabels = coerceAxis('showticklabels'); + if(showTickLabels) { + Lib.coerceFont(coerceAxis, 'tickfont', { + family: opts.font.family, + size: opts.font.size, + color: dfltFontColor + }); + coerceAxis('tickangle'); + coerceAxis('tickformat'); + } + + handleLineGridDefaults(axIn, axOut, coerceAxis, { + dfltColor: dfltColor, + bgColor: opts.bgColor, + // default grid color is darker here (60%, vs cartesian default ~91%) + // because the grid is not square so the eye needs heavier cues to follow + blend: 60, + showLine: true, + showGrid: true, + noZeroLine: true, + attributes: layoutAttributes[axName] + }); + + coerceAxis('layer'); + } + + coerceAxis('hoverformat'); + + axOut._input = axIn; + } +} + +module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) { + handleSubplotDefaults(layoutIn, layoutOut, fullData, { + type: constants.name, + attributes: layoutAttributes, + handleDefaults: handleDefaults, + font: layoutOut.font, + autotypenumbersDflt: layoutOut.autotypenumbers, + paper_bgcolor: layoutOut.paper_bgcolor, + fullData: fullData, + layoutOut: layoutOut + }); +}; diff --git a/src/plots/smith/set_convert.js b/src/plots/smith/set_convert.js new file mode 100644 index 00000000000..4a20214086f --- /dev/null +++ b/src/plots/smith/set_convert.js @@ -0,0 +1,187 @@ +'use strict'; + +var Lib = require('../../lib'); +var setConvertCartesian = require('../cartesian/set_convert'); + +var deg2rad = Lib.deg2rad; +var rad2deg = Lib.rad2deg; + +/** + * setConvert for smith axes! + * + * @param {object} ax + * axis in question (works for both radial and angular axes) + * @param {object} smithLayout + * full smith layout of the subplot associated with 'ax' + * @param {object} fullLayout + * full layout + * + * Here, reuse some of the Cartesian setConvert logic, + * but we must extend some of it, as both radial and angular axes + * don't have domains and angular axes don't have _true_ ranges. + * + * Moreover, we introduce two new coordinate systems: + * - 'g' for geometric coordinates and + * - 't' for angular ticks + * + * Radial axis coordinate systems: + * - d, c and l: same as for cartesian axes + * - g: like calcdata but translated about `realaxis.range[0]` & `smith.hole` + * + * Angular axis coordinate systems: + * - d: data, in whatever form it's provided + * - c: calcdata, turned into radians (for linear axes) + * or category indices (category axes) + * - t: tick calcdata, just like 'c' but in degrees for linear axes + * - g: geometric calcdata, radians coordinates that take into account + * axis rotation and direction + * + * Then, 'g'eometric data is ready to be converted to (x,y). + */ +module.exports = function setConvert(ax, smithLayout, fullLayout) { + setConvertCartesian(ax, fullLayout); + + switch(ax._id) { + case 'x': + case 'realaxis': + setConvertRadial(ax, smithLayout); + break; + case 'imaginaryaxis': + setConvertAngular(ax, smithLayout); + break; + case 'realaxis2': + setConvertReal(ax, smithLayout); + break; + } +}; + +function setConvertReal(ax, smithLayout) { + var subplot = smithLayout._subplot; + var radius = subplot.radius; + + ax.setGeometry = function() { + ax.c2g = function(v) { + var sq = function(x) { return x * x; }; + var gammaX = function(re) { + var denom = sq(re + 1.0); + var result = (sq(re) - 1.0) / denom; + return result; + }; + // console.log(v, gammaX(v)); + + return gammaX(v); + }; + + ax.g2c = function(v) { + return (v + 1.0) / (1.0 - v); + }; + + ax.g2p = function(v) { + return v * radius; + }; + + ax.c2p = function(v) { return ax.g2p(ax.c2g(v)); }; + }; +} + +function setConvertRadial(ax, smithLayout) { + var subplot = smithLayout._subplot; + + ax.setGeometry = function() { + var rl0 = ax._rl[0]; + var rl1 = ax._rl[1]; + + var b = subplot.innerRadius; + var m = (subplot.radius - b) / (rl1 - rl0); + var b2 = b / m; + + var rFilter = rl0 > rl1 ? + function(v) { return v <= 0; } : + function(v) { return v >= 0; }; + + ax.c2g = function(v) { + var r = ax.c2l(v) - rl0; + return (rFilter(r) ? r : 0) + b2; + }; + + ax.g2c = function(v) { + return ax.l2c(v + rl0 - b2); + }; + + ax.g2p = function(v) { return v * m; }; + ax.c2p = function(v) { return ax.g2p(ax.c2g(v)); }; + }; +} + +function toRadians(v, unit) { + return unit === 'degrees' ? deg2rad(v) : v; +} + +function fromRadians(v, unit) { + return unit === 'degrees' ? rad2deg(v) : v; +} + +function setConvertAngular(ax) { + var _d2c = ax.d2c; + var _c2d = ax.c2d; + + ax.d2c = function(v, unit) { return toRadians(_d2c(v), unit); }; + ax.c2d = function(v, unit) { return _c2d(fromRadians(v, unit)); }; + + // override makeCalcdata to handle thetaunit and special theta0/dtheta logic + ax.makeCalcdata = function(trace, coord) { + var arrayIn = trace[coord]; + var len = trace._length; + var arrayOut, i; + + var _d2c = function(v) { return ax.d2c(v, trace.thetaunit); }; + + if(arrayIn) { + if(Lib.isTypedArray(arrayIn)) { + if(len === arrayIn.length) { + return arrayIn; + } else if(arrayIn.subarray) { + return arrayIn.subarray(0, len); + } + } + + arrayOut = new Array(len); + for(i = 0; i < len; i++) { + arrayOut[i] = _d2c(arrayIn[i]); + } + } else { + var coord0 = coord + '0'; + var dcoord = 'd' + coord; + var v0 = (coord0 in trace) ? _d2c(trace[coord0]) : 0; + var dv = (trace[dcoord]) ? _d2c(trace[dcoord]) : (ax.period || 2 * Math.PI) / len; + + arrayOut = new Array(len); + for(i = 0; i < len; i++) { + arrayOut[i] = v0 + i * dv; + } + } + + return arrayOut; + }; + + // N.B. we mock the axis 'range' here + ax.setGeometry = function() { + var rad2g = function(v) { return v; }; + var g2rad = function(v) { return v; }; + + var rad2c, c2rad; + var rad2t, t2rad; + + c2rad = rad2c = Lib.identity; + t2rad = deg2rad; + rad2t = rad2deg; + + ax.range = [0, 360]; + + ax.c2g = function(v) { return rad2g(c2rad(v)); }; + ax.g2c = function(v) { return rad2c(g2rad(v)); }; + + ax.t2g = function(v) { return rad2g(t2rad(v)); }; + ax.g2t = function(v) { return rad2t(g2rad(v)); }; + }; +} diff --git a/src/plots/smith/smith.js b/src/plots/smith/smith.js new file mode 100644 index 00000000000..b213a63d187 --- /dev/null +++ b/src/plots/smith/smith.js @@ -0,0 +1,754 @@ +'use strict'; + +var d3 = require('@plotly/d3'); + +var Lib = require('../../lib'); +var strRotate = Lib.strRotate; +var strTranslate = Lib.strTranslate; +var Color = require('../../components/color'); +var Drawing = require('../../components/drawing'); +var Plots = require('../plots'); +var Axes = require('../../plots/cartesian/axes'); +var setConvertCartesian = require('../cartesian/set_convert'); +var setConvertSmith = require('./set_convert'); +var doAutoRange = require('../cartesian/autorange').doAutoRange; +var dragBox = require('../cartesian/dragbox'); +var dragElement = require('../../components/dragelement'); +var Fx = require('../../components/fx'); +var Titles = require('../../components/titles'); +var prepSelect = require('../cartesian/select').prepSelect; + +var MID_SHIFT = require('../../constants/alignment').MID_SHIFT; +var constants = require('./constants'); +var helpers = require('../polar/helpers'); + +var _ = Lib._; +var deg2rad = Lib.deg2rad; +var rad2deg = Lib.rad2deg; + +function Smith(gd, id) { + this.id = id; + this.gd = gd; + + this._hasClipOnAxisFalse = null; + this.vangles = null; + this.radialAxisAngle = null; + this.traceHash = {}; + this.layers = {}; + this.clipPaths = {}; + this.clipIds = {}; + this.viewInitial = {}; + + var fullLayout = gd._fullLayout; + var clipIdBase = 'clip' + fullLayout._uid + id; + + this.clipIds.forTraces = clipIdBase + '-for-traces'; + this.clipPaths.forTraces = fullLayout._clips.append('clipPath') + .attr('id', this.clipIds.forTraces); + this.clipPaths.forTraces.append('path'); + + this.framework = fullLayout._smithlayer.append('g') + .attr('class', id); + + // unfortunately, we have to keep track of some axis tick settings + // as smith subplots do not implement the 'ticks' editType + this.radialTickLayout = null; + this.angularTickLayout = null; +} + +var proto = Smith.prototype; + +module.exports = function createSmith(gd, id) { + return new Smith(gd, id); +}; + +proto.plot = function(smithCalcData, fullLayout) { + var _this = this; + var smithLayout = fullLayout[_this.id]; + + _this._hasClipOnAxisFalse = false; + for(var i = 0; i < smithCalcData.length; i++) { + var trace = smithCalcData[i][0].trace; + if(trace.cliponaxis === false) { + _this._hasClipOnAxisFalse = true; + break; + } + } + + _this.updateLayers(fullLayout, smithLayout); + _this.updateLayout(fullLayout, smithLayout); + Plots.generalUpdatePerTraceModule(_this.gd, _this, smithCalcData, smithLayout); + _this.updateFx(); +}; + +proto.updateLayers = function(fullLayout, smithLayout) { + var _this = this; + var layers = _this.layers; + var radialLayout = smithLayout.realaxis; + var angularLayout = smithLayout.imaginaryaxis; + var layerNames = constants.layerNames; + + var frontPlotIndex = layerNames.indexOf('frontplot'); + var layerData = layerNames.slice(0, frontPlotIndex); + var isAngularAxisBelowTraces = angularLayout.layer === 'below traces'; + var isRadialAxisBelowTraces = radialLayout.layer === 'below traces'; + + if(isAngularAxisBelowTraces) layerData.push('angular-line'); + if(isRadialAxisBelowTraces) layerData.push('radial-line'); + if(isAngularAxisBelowTraces) layerData.push('angular-axis'); + if(isRadialAxisBelowTraces) layerData.push('radial-axis'); + + layerData.push('frontplot'); + + if(!isAngularAxisBelowTraces) layerData.push('angular-line'); + if(!isRadialAxisBelowTraces) layerData.push('radial-line'); + if(!isAngularAxisBelowTraces) layerData.push('angular-axis'); + if(!isRadialAxisBelowTraces) layerData.push('radial-axis'); + + var join = _this.framework.selectAll('.smithsublayer') + .data(layerData, String); + + join.enter().append('g') + .attr('class', function(d) { return 'smithsublayer ' + d;}) + .each(function(d) { + var sel = layers[d] = d3.select(this); + + switch(d) { + case 'frontplot': + // TODO add option to place in 'backplot' layer?? + sel.append('g').classed('barlayer', true); + sel.append('g').classed('scatterlayer', true); + break; + case 'backplot': + sel.append('g').classed('maplayer', true); + break; + case 'plotbg': + layers.bg = sel.append('path'); + break; + case 'radial-grid': + sel.style('fill', 'none'); + break; + case 'angular-grid': + sel.style('fill', 'none'); + break; + case 'radial-line': + sel.append('line').style('fill', 'none'); + break; + case 'angular-line': + sel.append('path').style('fill', 'none'); + break; + } + }); + + join.order(); +}; + +/* smith subplots juggle with 6 'axis objects' (!), these are: + * + * - smithLayout.realaxis (aka radialLayout in this file): + * - smithLayout.imaginaryaxis (aka angularLayout in this file): + * used for data -> calcdata conversions (aka d2c) during the calc step + * + * - this.radialAxis + * extends smithLayout.realaxis, adds mocked 'domain' and + * few other keys in order to reuse Cartesian doAutoRange and the Axes + * drawing routines. + * used for calcdata -> geometric conversions (aka c2g) during the plot step + * + setGeometry setups ax.c2g for given ax.range + * + setScale setups ax._m,ax._b for given ax.range + * + * - this.angularAxis + * extends smithLayout.imaginaryaxis, adds mocked 'range' and 'domain' and + * a few other keys in order to reuse the Axes drawing routines. + * used for calcdata -> geometric conversions (aka c2g) during the plot step + * + setGeometry setups ax.c2g given ax.rotation, ax.direction & ax._categories, + * and mocks ax.range + * + setScale setups ax._m,ax._b with that mocked ax.range + * + * - this.xaxis + * - this.yaxis + * setup so that smith traces can reuse plot methods of Cartesian traces + * which mostly rely on 2pixel methods (e.g ax.c2p) + */ +proto.updateLayout = function(fullLayout, smithLayout) { + var _this = this; + var layers = _this.layers; + var gs = fullLayout._size; + + // axis attributes + var radialLayout = smithLayout.realaxis; + var angularLayout = smithLayout.imaginaryaxis; + // layout domains + var xDomain = smithLayout.domain.x; + var yDomain = smithLayout.domain.y; + // offsets from paper edge to layout domain box + _this.xOffset = gs.l + gs.w * xDomain[0]; + _this.yOffset = gs.t + gs.h * (1 - yDomain[1]); + // lengths of the layout domain box + var xLength = _this.xLength = gs.w * (xDomain[1] - xDomain[0]); + var yLength = _this.yLength = gs.h * (yDomain[1] - yDomain[0]); + // sector to plot + var sector = [0, 360]; + _this.sectorInRad = sector.map(deg2rad); + var sectorBBox = _this.sectorBBox = [-1, -1, 1, 1]; + var dxSectorBBox = sectorBBox[2] - sectorBBox[0]; + var dySectorBBox = sectorBBox[3] - sectorBBox[1]; + // aspect ratios + var arDomain = yLength / xLength; + var arSector = Math.abs(dySectorBBox / dxSectorBBox); + // actual lengths and domains of subplot box + var xLength2, yLength2; + var xDomain2, yDomain2; + var gap; + if(arDomain > arSector) { + xLength2 = xLength; + yLength2 = xLength * arSector; + gap = (yLength - yLength2) / gs.h / 2; + xDomain2 = [xDomain[0], xDomain[1]]; + yDomain2 = [yDomain[0] + gap, yDomain[1] - gap]; + } else { + xLength2 = yLength / arSector; + yLength2 = yLength; + gap = (xLength - xLength2) / gs.w / 2; + xDomain2 = [xDomain[0] + gap, xDomain[1] - gap]; + yDomain2 = [yDomain[0], yDomain[1]]; + } + _this.xLength2 = xLength2; + _this.yLength2 = yLength2; + _this.xDomain2 = xDomain2; + _this.yDomain2 = yDomain2; + // actual offsets from paper edge to the subplot box top-left corner + var xOffset2 = _this.xOffset2 = gs.l + gs.w * xDomain2[0]; + var yOffset2 = _this.yOffset2 = gs.t + gs.h * (1 - yDomain2[1]); + // circle radius in px + var radius = _this.radius = xLength2 / dxSectorBBox; + // circle center position in px + var cx = _this.cx = xOffset2 - radius * sectorBBox[0]; + var cy = _this.cy = yOffset2 + radius * sectorBBox[3]; + // circle center in the coordinate system of plot area + var cxx = _this.cxx = cx - xOffset2; + var cyy = _this.cyy = cy - yOffset2; + + _this.radialAxis = _this.mockAxis(fullLayout, smithLayout, radialLayout, { + _id: 'realaxis2', + side: { + counterclockwise: 'top', + clockwise: 'bottom' + }[radialLayout.side], + // keep track of real side + _realSide: radialLayout.side, + domain: [0, 100] + }); + + _this.angularAxis = _this.mockAxis(fullLayout, smithLayout, angularLayout, { + side: 'right', + // to get auto nticks right + domain: [0, Math.PI], + // don't pass through autorange logic + autorange: false + }); + + _this.doAutoRange(fullLayout, smithLayout); + // N.B. this sets _this.vangles + _this.updateAngularAxis(fullLayout, smithLayout); + // N.B. this sets _this.radialAxisAngle + _this.updateRadialAxis(fullLayout, smithLayout); + _this.updateRadialAxisTitle(fullLayout, smithLayout); + + _this.xaxis = _this.mockCartesianAxis(fullLayout, smithLayout, { + _id: 'x', + domain: xDomain2 + }); + + _this.yaxis = _this.mockCartesianAxis(fullLayout, smithLayout, { + _id: 'y', + domain: yDomain2 + }); + + var dPath = _this.pathSubplot(); + + _this.clipPaths.forTraces.select('path') + .attr('d', dPath) + .attr('transform', strTranslate(cxx, cyy)); + + layers.frontplot + .attr('transform', strTranslate(xOffset2, yOffset2)) + .call(Drawing.setClipUrl, _this._hasClipOnAxisFalse ? null : _this.clipIds.forTraces, _this.gd); + + layers.bg + .attr('d', dPath) + .attr('transform', strTranslate(cx, cy)) + .call(Color.fill, smithLayout.bgcolor); +}; + +proto.mockAxis = function(fullLayout, smithLayout, axLayout, opts) { + var ax = Lib.extendFlat({}, axLayout, opts); + setConvertSmith(ax, smithLayout, fullLayout); + return ax; +}; + +proto.mockCartesianAxis = function(fullLayout, smithLayout, opts) { + var _this = this; + var axId = opts._id; + + var ax = Lib.extendFlat({type: 'linear'}, opts); + setConvertCartesian(ax, fullLayout); + + var bboxIndices = { + x: [0, 2], + y: [1, 3] + }; + + ax.setRange = function() { + var sectorBBox = _this.sectorBBox; + var ind = bboxIndices[axId]; + var rl = _this.radialAxis._rl; + var drl = (rl[1] - rl[0]); + ax.range = [sectorBBox[ind[0]] * drl, sectorBBox[ind[1]] * drl]; + }; + + ax.isPtWithinRange = axId === 'x' ? + function(d) { return _this.isPtInside(d); } : + function() { return true; }; + + ax.setRange(); + ax.setScale(); + return ax; +}; + +proto.doAutoRange = function(fullLayout, smithLayout) { + var gd = this.gd; + var radialAxis = this.radialAxis; + var radialLayout = smithLayout.realaxis; + + radialAxis.setScale(); + doAutoRange(gd, radialAxis); + + var rng = radialAxis.range; + radialLayout.range = rng.slice(); + radialLayout._input.range = rng.slice(); + + radialAxis._rl = [ + radialAxis.r2l(rng[0], null, 'gregorian'), + radialAxis.r2l(rng[1], null, 'gregorian') + ]; +}; + +proto.updateRadialAxis = function(fullLayout, smithLayout) { + var _this = this; + var gd = _this.gd; + var layers = _this.layers; + var radius = _this.radius; + var cx = _this.cx; + var cy = _this.cy; + var radialLayout = smithLayout.realaxis; + var a0 = 0; + var ax = _this.radialAxis; + var hasRoomForIt = true; + + var realStops = [0.2, 0.5, 1.0, 2.0, 5.0]; + + _this.fillViewInitialKey('realaxis.angle', radialLayout.angle); + _this.fillViewInitialKey('realaxis.range', ax.range.slice()); + + ax.setGeometry(); + + // rotate auto tick labels by 180 if in quadrant II and III to make them + // readable from left-to-right + // + // TODO try moving deeper in Axes.drawLabels for better results? + if(ax.tickangle === 'auto' && (a0 > 90 && a0 <= 270)) { + ax.tickangle = 180; + } + + var transFn2 = function(d) { + return strTranslate(ax.c2p(d.x), -2); + }; + + // set special grid path function + var gridPathFn = function(d) { + var value = d.x; + + var gridRadius = 0.5 * (_this.radius - ax.c2p(value)); + var gridCenter = gridRadius + ax.c2p(value); + return Lib.pathArc(gridRadius, 0, 2 * Math.PI, gridCenter, 0); + }; + + var newTickLayout = strTickLayout(radialLayout); + if(_this.radialTickLayout !== newTickLayout) { + layers['radial-axis'].selectAll('.xtick').remove(); + _this.radialTickLayout = newTickLayout; + } + + var labelFns = {}; + + labelFns.xFn = function() { + return 0; + }; + + labelFns.yFn = function() { + return 0; + }; + + labelFns.anchorFn = function() { + return 'end'; + }; + + labelFns.heightFn = function() { + return 0; + }; + + if(hasRoomForIt) { + ax.setScale(); + + // circular grid lines + Axes.drawGrid(gd, ax, { + vals: realStops.map(function(v) { + return {x: v}; + }), + layer: layers['radial-grid'], + path: gridPathFn, + transFn: Lib.noop, + crisp: false + }); + + var font = ax.tickfont || {}; + + Axes.drawLabels(gd, ax, { + vals: realStops.map(function(d) { + return { + x: d, + text: d, + font: font.family, + fontColor: font.color, + fontSize: font.size + }; + }), + layer: layers['radial-axis'], + transFn: transFn2, + // labelFns: Axes.makeLabelFns(ax, 0), + labelFns: labelFns + }); + } + + // stash 'actual' radial axis angle for drag handlers (in degrees) + var angle = _this.radialAxisAngle = _this.vangles ? + rad2deg(snapToVertexAngle(deg2rad(radialLayout.angle), _this.vangles)) : + radialLayout.angle; + + var tLayer = strTranslate(cx, cy); + var tLayer2 = tLayer + strRotate(-angle); + + updateElement( + layers['radial-axis'], + hasRoomForIt && (radialLayout.showticklabels || radialLayout.ticks), + {transform: tLayer2} + ); + + updateElement( + layers['radial-grid'], + hasRoomForIt && radialLayout.showgrid, + {transform: tLayer} + ); + + updateElement( + layers['radial-line'].select('line'), + hasRoomForIt && radialLayout.showline, + { + x1: -radius, + y1: 0, + x2: radius, + y2: 0, + transform: tLayer2 + } + ) + .attr('stroke-width', radialLayout.linewidth) + .call(Color.stroke, radialLayout.linecolor); +}; + +proto.updateRadialAxisTitle = function(fullLayout, smithLayout, _angle) { + var _this = this; + var gd = _this.gd; + var radius = _this.radius; + var cx = _this.cx; + var cy = _this.cy; + var radialLayout = smithLayout.realaxis; + var titleClass = _this.id + 'title'; + + var angle = _angle !== undefined ? _angle : _this.radialAxisAngle; + var angleRad = deg2rad(angle); + var cosa = Math.cos(angleRad); + var sina = Math.sin(angleRad); + + var pad = 0; + + // Hint: no need to check if there is in fact a title.text set + // because if plot is editable, pad needs to be calculated anyways + // to properly show placeholder text when title is empty. + if(radialLayout.title) { + var h = Drawing.bBox(_this.layers['radial-axis'].node()).height; + var ts = radialLayout.title.font.size; + pad = radialLayout.side === 'counterclockwise' ? + -h - ts * 0.4 : + h + ts * 0.8; + } + + _this.layers['radial-axis-title'] = Titles.draw(gd, titleClass, { + propContainer: radialLayout, + propName: _this.id + '.realaxis.title', + placeholder: _(gd, 'Click to enter radial axis title'), + attributes: { + x: cx + (radius / 2) * cosa + pad * sina, + y: cy - (radius / 2) * sina + pad * cosa, + 'text-anchor': 'middle' + }, + transform: {rotate: -angle} + }); +}; + +proto.updateAngularAxis = function(fullLayout, smithLayout) { + var _this = this; + var gd = _this.gd; + var layers = _this.layers; + var radius = _this.radius; + var cx = _this.cx; + var cy = _this.cy; + var angularLayout = smithLayout.imaginaryaxis; + var ax = _this.angularAxis; + + var angleLabelStops = [-5.0, -2.0, -1.0, -0.5, -0.2, 0.0, 0.2, 0.5, 1.0, 2.0, 5.0, Infinity]; + var angleGridStops = [-5.0, -2.0, -1.0, -0.5, -0.2, 0.2, 0.5, 1.0, 2.0, 5.0]; + + _this.fillViewInitialKey('imaginaryaxis.rotation', angularLayout.rotation); + + ax.setGeometry(); + ax.setScale(); + + // 't'ick to 'g'eometric radians is used all over the place here + var t2g = function(d) { return ax.t2g(d.x); }; + + // run rad2deg on tick0 and ditck for thetaunit: 'radians' axes + if(ax.thetaunit === 'radians') { + ax.tick0 = rad2deg(ax.tick0); + ax.dtick = rad2deg(ax.dtick); + } + + var _transFn = function(rad) { + return strTranslate(cx + radius * Math.cos(rad), cy - radius * Math.sin(rad)); + }; + + var transFn = function(d) { + return _transFn(t2g(d)); + }; + + var gridPathFn = function(d) { + var value = d.x; + var radius = _this.radius / d.x; + + var arc = 2.0 * Math.atan(Math.abs(d.x)); + var startAngle = value > 0.0 ? 1.5 * Math.PI - arc : Math.PI / 2.0; + var endAngle = value > 0.0 ? 1.5 * Math.PI : Math.PI / 2.0 + arc; + + return Lib.pathArc(Math.abs(radius), startAngle, endAngle, cx + _this.radius, cy - radius); + }; + + var out = Axes.makeLabelFns(ax, 0); + var labelStandoff = out.labelStandoff; + var labelFns = {}; + + labelFns.xFn = function(d) { + var rad = t2g(d); + return Math.cos(rad) * labelStandoff; + }; + + labelFns.yFn = function(d) { + var rad = t2g(d); + var ff = Math.sin(rad) > 0 ? 0.2 : 1; + return -Math.sin(rad) * (labelStandoff + d.fontSize * ff) + + Math.abs(Math.cos(rad)) * (d.fontSize * MID_SHIFT); + }; + + labelFns.anchorFn = function(d) { + var rad = t2g(d); + var cos = Math.cos(rad); + return Math.abs(cos) < 0.1 ? + 'middle' : + (cos > 0 ? 'start' : 'end'); + }; + + labelFns.heightFn = function(d, a, h) { + var rad = t2g(d); + return -0.5 * (1 + Math.sin(rad)) * h; + }; + + var newTickLayout = strTickLayout(angularLayout); + if(_this.angularTickLayout !== newTickLayout) { + layers['angular-axis'].selectAll('.' + ax._id + 'tick').remove(); + _this.angularTickLayout = newTickLayout; + } + + // angle of polygon vertices in geometric radians (null means circles) + // TODO what to do when ax.period > ax._categories ?? + _this.vangles = null; + + if(ax.visible) { + Axes.drawGrid(gd, ax, { + vals: angleGridStops.map(function(v) { + return { + x: v, + }; + }), + layer: layers['angular-grid'], + path: gridPathFn, + transFn: Lib.noop, + crisp: false + }); + + Axes.drawLabels(gd, ax, { + vals: angleLabelStops.map(function(v) { + var radius = _this.radius / v; + var theta = 2.0 * Math.atan2(radius, _this.radius); + + var font = ax.tickfont || {}; + + return { + x: theta * 360.0 / (2 * Math.PI), + text: v === Infinity ? '∞' : ((v === 0.0 ? '0 + 0' : v) + 'j'), + font: font.family, + fontColor: font.color, + fontSize: font.size + }; + }), + layer: layers['angular-axis'], + repositionOnUpdate: true, + transFn: transFn, + labelFns: labelFns + }); + } + + // TODO maybe two arcs is better here? + // maybe split style attributes between inner and outer angular axes? + + updateElement(layers['angular-line'].select('path'), angularLayout.showline, { + d: _this.pathSubplot(), + transform: strTranslate(cx, cy) + }) + .attr('stroke-width', angularLayout.linewidth) + .call(Color.stroke, angularLayout.linecolor); +}; + +proto.updateFx = function() { + if(!this.gd._context.staticPlot) { + this.updateMainDrag(); + } +}; + +proto.updateMainDrag = function() { + var _this = this; + var gd = _this.gd; + var layers = _this.layers; + var cx = _this.cx; + var cy = _this.cy; + + var mainDrag = dragBox.makeDragger(layers, 'path', 'maindrag', 'crosshair'); + + d3.select(mainDrag) + .attr('d', _this.pathSubplot()) + .attr('transform', strTranslate(cx, cy)); + + var dragOpts = { + element: mainDrag, + gd: gd, + subplot: _this.id, + plotinfo: { + id: _this.id, + xaxis: _this.xaxis, + yaxis: _this.yaxis + }, + xaxes: [_this.xaxis], + yaxes: [_this.yaxis] + }; + + dragOpts.prepFn = function(evt, startX, startY) { + var dragModeNow = gd._fullLayout.dragmode; + gd._fullLayout._calcInverseTransform(gd); + + switch(dragModeNow) { + case 'select': + case 'lasso': + prepSelect(evt, startX, startY, dragOpts, dragModeNow); + break; + } + }; + + mainDrag.onmousemove = function(evt) { + Fx.hover(gd, evt, _this.id); + gd._fullLayout._lasthover = mainDrag; + gd._fullLayout._hoversubplot = _this.id; + }; + + mainDrag.onmouseout = function(evt) { + dragElement.unhover(gd, evt); + }; + + dragElement.init(dragOpts); +}; + +proto.isPtInside = function(d) { + return d.re >= 0; +}; + +proto.pathArc = function(r) { + var sectorInRad = this.sectorInRad; + var vangles = this.vangles; + var fn = vangles ? helpers.pathPolygon : Lib.pathArc; + return fn(r, sectorInRad[0], sectorInRad[1], vangles); +}; + +proto.pathSector = function(r) { + var sectorInRad = this.sectorInRad; + var vangles = this.vangles; + var fn = vangles ? helpers.pathPolygon : Lib.pathSector; + return fn(r, sectorInRad[0], sectorInRad[1], vangles); +}; + +proto.pathAnnulus = function(r0, r1) { + var sectorInRad = this.sectorInRad; + var vangles = this.vangles; + var fn = vangles ? helpers.pathPolygonAnnulus : Lib.pathAnnulus; + return fn(r0, r1, sectorInRad[0], sectorInRad[1], vangles); +}; + +proto.pathSubplot = function() { + var r0 = this.innerRadius; + var r1 = this.radius; + return r0 ? this.pathAnnulus(r0, r1) : this.pathSector(r1); +}; + +proto.fillViewInitialKey = function(key, val) { + if(!(key in this.viewInitial)) { + this.viewInitial[key] = val; + } +}; + +function strTickLayout(axLayout) { + var out = axLayout.ticks + String(axLayout.ticklen) + String(axLayout.showticklabels); + if('side' in axLayout) out += axLayout.side; + return out; +} + +function snapToVertexAngle(a, vangles) { + var fn = function(v) { return Lib.angleDist(a, v); }; + var ind = Lib.findIndexOfMin(vangles, fn); + return vangles[ind]; +} + +function updateElement(sel, showAttr, attrs) { + if(showAttr) { + sel.attr('display', null); + sel.attr(attrs); + } else if(sel) { + sel.attr('display', 'none'); + } + return sel; +} diff --git a/src/traces/scattersmith/attributes.js b/src/traces/scattersmith/attributes.js new file mode 100644 index 00000000000..be329fd8004 --- /dev/null +++ b/src/traces/scattersmith/attributes.js @@ -0,0 +1,70 @@ +'use strict'; + +var hovertemplateAttrs = require('../../plots/template_attributes').hovertemplateAttrs; +var texttemplateAttrs = require('../../plots/template_attributes').texttemplateAttrs; +var extendFlat = require('../../lib/extend').extendFlat; +var scatterAttrs = require('../scatter/attributes'); +var lineAttrs = scatterAttrs.line; + +module.exports = { + mode: scatterAttrs.mode, + + re: { + valType: 'data_array', + editType: 'calc+clearAxisTypes', + description: 'Sets the real coordinates' + }, + + im: { + valType: 'data_array', + editType: 'calc+clearAxisTypes', + description: 'Sets the imaginary coordinates' + }, + + text: scatterAttrs.text, + texttemplate: texttemplateAttrs({editType: 'plot'}, { + keys: ['re', 'im', 'text'] + }), + hovertext: scatterAttrs.hovertext, + + line: { + color: lineAttrs.color, + width: lineAttrs.width, + dash: lineAttrs.dash, + shape: extendFlat({}, lineAttrs.shape, { + values: ['linear', 'spline'] + }), + smoothing: lineAttrs.smoothing, + editType: 'calc' + }, + connectgaps: scatterAttrs.connectgaps, + + marker: scatterAttrs.marker, + cliponaxis: extendFlat({}, scatterAttrs.cliponaxis, {dflt: false}), + + textposition: scatterAttrs.textposition, + textfont: scatterAttrs.textfont, + + fill: extendFlat({}, scatterAttrs.fill, { + values: ['none', 'toself', 'tonext'], + dflt: 'none', + description: [ + 'Sets the area to fill with a solid color.', + 'Use with `fillcolor` if not *none*.', + 'scattersmith has a subset of the options available to scatter.', + '*toself* connects the endpoints of the trace (or each segment', + 'of the trace if it has gaps) into a closed shape.', + '*tonext* fills the space between two traces if one completely', + 'encloses the other (eg consecutive contour lines), and behaves like', + '*toself* if there is no trace before it. *tonext* should not be', + 'used if one trace does not enclose the other.' + ].join(' ') + }), + fillcolor: scatterAttrs.fillcolor, + + hoveron: scatterAttrs.hoveron, + hovertemplate: hovertemplateAttrs(), + + selected: scatterAttrs.selected, + unselected: scatterAttrs.unselected +}; diff --git a/src/traces/scattersmith/calc.js b/src/traces/scattersmith/calc.js new file mode 100644 index 00000000000..09c9cfe88f5 --- /dev/null +++ b/src/traces/scattersmith/calc.js @@ -0,0 +1,44 @@ +'use strict'; + +var isNumeric = require('fast-isnumeric'); +var BADNUM = require('../../constants/numerical').BADNUM; + +var Axes = require('../../plots/cartesian/axes'); + +var calcColorscale = require('../scatter/colorscale_calc'); +var arraysToCalcdata = require('../scatter/arrays_to_calcdata'); +var calcSelection = require('../scatter/calc_selection'); +var calcMarkerSize = require('../scatter/calc').calcMarkerSize; + +module.exports = function calc(gd, trace) { + var fullLayout = gd._fullLayout; + var subplotId = trace.subplot; + var radialAxis = fullLayout[subplotId].realaxis; + var angularAxis = fullLayout[subplotId].imaginaryaxis; + var reArray = radialAxis.makeCalcdata(trace, 're'); + var imArray = angularAxis.makeCalcdata(trace, 'im'); + var len = trace._length; + var cd = new Array(len); + + for(var i = 0; i < len; i++) { + var re = reArray[i]; + var im = imArray[i]; + var cdi = cd[i] = {}; + + if(isNumeric(re) && isNumeric(im)) { + cdi.re = re; + cdi.im = im; + } else { + cdi.re = BADNUM; + } + } + + var ppad = calcMarkerSize(trace, len); + trace._extremes.x = Axes.findExtremes(radialAxis, reArray, {ppad: ppad}); + + calcColorscale(gd, trace); + arraysToCalcdata(cd, trace); + calcSelection(cd, trace); + + return cd; +}; diff --git a/src/traces/scattersmith/defaults.js b/src/traces/scattersmith/defaults.js new file mode 100644 index 00000000000..e0fa1ea7271 --- /dev/null +++ b/src/traces/scattersmith/defaults.js @@ -0,0 +1,84 @@ +'use strict'; + +var Lib = require('../../lib'); + +var subTypes = require('../scatter/subtypes'); +var handleMarkerDefaults = require('../scatter/marker_defaults'); +var handleLineDefaults = require('../scatter/line_defaults'); +var handleLineShapeDefaults = require('../scatter/line_shape_defaults'); +var handleTextDefaults = require('../scatter/text_defaults'); +var handleFillColorDefaults = require('../scatter/fillcolor_defaults'); +var PTS_LINESONLY = require('../scatter/constants').PTS_LINESONLY; + +var attributes = require('./attributes'); + +function supplyDefaults(traceIn, traceOut, defaultColor, layout) { + function coerce(attr, dflt) { + return Lib.coerce(traceIn, traceOut, attributes, attr, dflt); + } + + var len = handleReImDefaults(traceIn, traceOut, layout, coerce); + if(!len) { + traceOut.visible = false; + return; + } + + coerce('mode', len < PTS_LINESONLY ? 'lines+markers' : 'lines'); + coerce('text'); + coerce('hovertext'); + if(traceOut.hoveron !== 'fills') coerce('hovertemplate'); + + if(subTypes.hasLines(traceOut)) { + handleLineDefaults(traceIn, traceOut, defaultColor, layout, coerce); + handleLineShapeDefaults(traceIn, traceOut, coerce); + coerce('connectgaps'); + } + + if(subTypes.hasMarkers(traceOut)) { + handleMarkerDefaults(traceIn, traceOut, defaultColor, layout, coerce, {gradient: true}); + } + + if(subTypes.hasText(traceOut)) { + coerce('texttemplate'); + handleTextDefaults(traceIn, traceOut, layout, coerce); + } + + var dfltHoverOn = []; + + if(subTypes.hasMarkers(traceOut) || subTypes.hasText(traceOut)) { + coerce('cliponaxis'); + coerce('marker.maxdisplayed'); + dfltHoverOn.push('points'); + } + + coerce('fill'); + + if(traceOut.fill !== 'none') { + handleFillColorDefaults(traceIn, traceOut, defaultColor, coerce); + if(!subTypes.hasLines(traceOut)) handleLineShapeDefaults(traceIn, traceOut, coerce); + } + + if(traceOut.fill === 'tonext' || traceOut.fill === 'toself') { + dfltHoverOn.push('fills'); + } + coerce('hoveron', dfltHoverOn.join('+') || 'points'); + + Lib.coerceSelectionMarkerOpacity(traceOut, coerce); +} + +function handleReImDefaults(traceIn, traceOut, layout, coerce) { + var re = coerce('re'); + var im = coerce('im'); + var len = 0; + + if(re && im) { + len = Math.min(re.length, im.length); + } + + traceOut._length = len; + return len; +} + +module.exports = { + supplyDefaults: supplyDefaults +}; diff --git a/src/traces/scattersmith/format_labels.js b/src/traces/scattersmith/format_labels.js new file mode 100644 index 00000000000..6b1d186da8f --- /dev/null +++ b/src/traces/scattersmith/format_labels.js @@ -0,0 +1,24 @@ +'use strict'; + +var Lib = require('../../lib'); +var Axes = require('../../plots/cartesian/axes'); + +module.exports = function formatLabels(cdi, trace, fullLayout) { + var labels = {}; + + var subplot = fullLayout[trace.subplot]._subplot; + var radialAxis; + var angularAxis; + + radialAxis = subplot.radialAxis; + angularAxis = subplot.angularAxis; + + var rVal = radialAxis.c2l(cdi.re); + labels.rLabel = Axes.tickText(radialAxis, rVal, true).text; + + // N.B here the ° sign is part of the formatted value for thetaunit:'degrees' + var thetaVal = angularAxis.thetaunit === 'degrees' ? Lib.rad2deg(cdi.im) : cdi.im; + labels.thetaLabel = Axes.tickText(angularAxis, thetaVal, true).text; + + return labels; +}; diff --git a/src/traces/scattersmith/hover.js b/src/traces/scattersmith/hover.js new file mode 100644 index 00000000000..e14081e5572 --- /dev/null +++ b/src/traces/scattersmith/hover.js @@ -0,0 +1,49 @@ +'use strict'; + +var scatterHover = require('../scatter/hover'); + +function hoverPoints(pointData, xval, yval, hovermode) { + var scatterPointData = scatterHover(pointData, xval, yval, hovermode); + if(!scatterPointData || scatterPointData[0].index === false) return; + + var newPointData = scatterPointData[0]; + + // hovering on fill case + if(newPointData.index === undefined) { + return scatterPointData; + } + + var subplot = pointData.subplot; + var cdi = newPointData.cd[newPointData.index]; + var trace = newPointData.trace; + + if(!subplot.isPtInside(cdi)) return; + + newPointData.xLabelVal = undefined; + newPointData.yLabelVal = undefined; + makeHoverPointText(cdi, trace, subplot, newPointData); + newPointData.hovertemplate = trace.hovertemplate; + return scatterPointData; +} + +function makeHoverPointText(cdi, trace, subplot, pointData) { + var radialAxis = subplot.radialAxis; + var angularAxis = subplot.angularAxis; + radialAxis._hovertitle = 're'; + angularAxis._hovertitle = 'im'; + + var fullLayout = {}; + fullLayout[trace.subplot] = {_subplot: subplot}; + var labels = trace._module.formatLabels(cdi, trace, fullLayout); + pointData.rLabel = labels.rLabel; + pointData.thetaLabel = labels.thetaLabel; + + if(!trace.hovertemplate) { + pointData.extraText = cdi.re + ' + ' + cdi.im + 'j'; + } +} + +module.exports = { + hoverPoints: hoverPoints, + makeHoverPointText: makeHoverPointText +}; diff --git a/src/traces/scattersmith/index.js b/src/traces/scattersmith/index.js new file mode 100644 index 00000000000..9b4137c368a --- /dev/null +++ b/src/traces/scattersmith/index.js @@ -0,0 +1,32 @@ +'use strict'; + +module.exports = { + moduleType: 'trace', + name: 'scattersmith', + basePlotModule: require('../../plots/smith'), + categories: ['symbols', 'showLegend', 'scatter-like'], + + attributes: require('./attributes'), + supplyDefaults: require('./defaults').supplyDefaults, + colorbar: require('../scatter/marker_colorbar'), + formatLabels: require('./format_labels'), + calc: require('./calc'), + plot: require('./plot'), + style: require('../scatter/style').style, + styleOnSelect: require('../scatter/style').styleOnSelect, + hoverPoints: require('./hover').hoverPoints, + selectPoints: require('../scatter/select'), + + meta: { + hrName: 'scatter_smith', + description: [ + 'The scattersmith trace type encompasses line charts, scatter charts, text charts, and bubble charts', + 'in smith chart coordinates.', + 'The data visualized as scatter point or lines is set in', + '`re` (real) and `im` (imaginary) coordinates', + 'Text (appearing either on the chart or on hover only) is via `text`.', + 'Bubble charts are achieved by setting `marker.size` and/or `marker.color`', + 'to numerical arrays.' + ].join(' ') + } +}; diff --git a/src/traces/scattersmith/plot.js b/src/traces/scattersmith/plot.js new file mode 100644 index 00000000000..2117752933b --- /dev/null +++ b/src/traces/scattersmith/plot.js @@ -0,0 +1,52 @@ +'use strict'; + +var scatterPlot = require('../scatter/plot'); +var BADNUM = require('../../constants/numerical').BADNUM; + +function sq(x) { + return x * x; +} + +function gammaTransformReal(re, im) { + var denom = sq(re + 1.0) + sq(im); + var result = (sq(re) + sq(im) - 1.0) / denom; + return result; +} + +function gammaTransformImaginary(re, im) { + var denom = sq(re + 1.0) + sq(im); + var result = (2 * im) / denom; + return result; +} + +module.exports = function plot(gd, subplot, moduleCalcData) { + var mlayer = subplot.layers.frontplot.select('g.scatterlayer'); + + var plotinfo = { + xaxis: subplot.xaxis, + yaxis: subplot.yaxis, + plot: subplot.framework, + layerClipId: subplot._hasClipOnAxisFalse ? subplot.clipIds.forTraces : null + }; + + // convert: + // 'c' (r,theta) -> 'geometric' (r,theta) -> (x,y) + for(var i = 0; i < moduleCalcData.length; i++) { + var cdi = moduleCalcData[i]; + + for(var j = 0; j < cdi.length; j++) { + var cd = cdi[j]; + var re = cd.re; + var im = cd.im; + + if(re === BADNUM) { + cd.x = cd.y = BADNUM; + } else { + cd.x = gammaTransformReal(re, im); + cd.y = gammaTransformImaginary(re, im); + } + } + } + + scatterPlot(gd, plotinfo, moduleCalcData, mlayer); +}; diff --git a/test/image/baselines/zzz_smith_axes.png b/test/image/baselines/zzz_smith_axes.png new file mode 100644 index 00000000000..33b1916fa04 Binary files /dev/null and b/test/image/baselines/zzz_smith_axes.png differ diff --git a/test/image/baselines/zzz_smith_basic.png b/test/image/baselines/zzz_smith_basic.png new file mode 100644 index 00000000000..5bbaa35dbf2 Binary files /dev/null and b/test/image/baselines/zzz_smith_basic.png differ diff --git a/test/image/baselines/zzz_smith_fill.png b/test/image/baselines/zzz_smith_fill.png new file mode 100644 index 00000000000..8ef787cfb98 Binary files /dev/null and b/test/image/baselines/zzz_smith_fill.png differ diff --git a/test/image/baselines/zzz_smith_gaps.png b/test/image/baselines/zzz_smith_gaps.png new file mode 100644 index 00000000000..4dee11aa92c Binary files /dev/null and b/test/image/baselines/zzz_smith_gaps.png differ diff --git a/test/image/baselines/zzz_smith_line.png b/test/image/baselines/zzz_smith_line.png new file mode 100644 index 00000000000..2c9d8e04e4e Binary files /dev/null and b/test/image/baselines/zzz_smith_line.png differ diff --git a/test/image/baselines/zzz_smith_single.png b/test/image/baselines/zzz_smith_single.png new file mode 100644 index 00000000000..c7aff5cc520 Binary files /dev/null and b/test/image/baselines/zzz_smith_single.png differ diff --git a/test/image/mocks/zzz_smith_axes.json b/test/image/mocks/zzz_smith_axes.json new file mode 100644 index 00000000000..6b2729b8f1d --- /dev/null +++ b/test/image/mocks/zzz_smith_axes.json @@ -0,0 +1,82 @@ +{ + "data": [ + { + "type": "scattersmith", + "re": [0, 0.1, 0.5, 1, 2, 3, 4, 5, 10, 0.1, 0.5, 10], + "im": [0, 0.1, 0.5, 1, 2, 3, 4, 5, 10, -0.1, -0.5, -10], + "mode": "lines+markers" + }, + { + "type": "scattersmith", + "re": [0, 0.1, 0.5, 1, 2, 3, 4, 5, 10, 0.1, 0.5, 10], + "im": [0, 0.1, 0.5, 1, 2, 3, 4, 5, 10, -0.1, -0.5, -10], + "mode": "lines+markers", + "subplot": "smith2" + }, + { + "type": "scattersmith", + "re": [0, 0.1, 0.5, 1, 2, 3, 4, 5, 10, 0.1, 0.5, 10], + "im": [0, 0.1, 0.5, 1, 2, 3, 4, 5, 10, -0.1, -0.5, -10], + "mode": "lines+markers", + "subplot": "smith3" + }, + { + "type": "scattersmith", + "re": [0, 0.1, 0.5, 1, 2, 3, 4, 5, 10, 0.1, 0.5, 10], + "im": [0, 0.1, 0.5, 1, 2, 3, 4, 5, 10, -0.1, -0.5, -10], + "mode": "lines+markers", + "subplot": "smith4" + } + ], + "layout": { + "smith": { + "domain": { + "x": [0, 0.46], + "y": [0.56, 1] + }, + "imaginaryaxis": { + "showgrid": false, + "showticklabels": false, + "visible": true + } + }, + "smith2": { + "domain": { + "x": [0, 0.46], + "y": [0, 0.44] + }, + "realaxis": { + "showgrid": false, + "visible": true + } + }, + "smith3": { + "domain": { + "x": [0.54, 1], + "y": [0.56, 1] + }, + "realaxis": { + "showgrid": true, + "showticklabels": false, + "visible": true + } + }, + "smith4": { + "domain": { + "x": [0.54, 1], + "y": [0, 0.44] + }, + "imaginaryaxis": { + "visible": false + }, + "realaxis": { + "visible": false + } + }, + "showlegend": true, + "paper_bgcolor": "lightgray", + "margin": {"t": 40, "b": 40, "r": 40, "l": 40}, + "width": 800, + "height": 800 + } +} diff --git a/test/image/mocks/zzz_smith_basic.json b/test/image/mocks/zzz_smith_basic.json new file mode 100644 index 00000000000..8f742c33231 --- /dev/null +++ b/test/image/mocks/zzz_smith_basic.json @@ -0,0 +1,72 @@ +{ + "data": [ + { + "type": "scattersmith", + "re": [0, 0.1, 0.5, 1, 2, 3, 4, 5, 10, 0.1, 0.5, 10], + "im": [0, 0.1, 0.5, 1, 2, 3, 4, 5, 10, -0.1, -0.5, -10], + "mode": "markers", + "marker": { + "symbol": "triangle-up", + "size": 20 + } + }, + { + "type": "scattersmith", + "re": [0, 0.1, 0.5, 1, 2, 3, 4, 5, 10, 0.1, 0.5, 10], + "im": [0, 0.1, 0.5, 1, 2, 3, 4, 5, 10, -0.1, -0.5, -10], + "mode": "lines+markers", + "subplot": "smith2" + }, + { + "type": "scattersmith", + "re": [], + "im": [], + "subplot": "smith3" + }, + { + "type": "scattersmith", + "re": [0, 0.1, 0.5, 1, 2, 3, 4, 5, 10, 0.1, 0.5, 10], + "im": [0, 0.1, 0.5, 1, 2, 3, 4, 5, 10, -0.1, -0.5, -10], + "mode": "markers+text", + "marker": { + "symbol": "x", + "color": "green" + }, + "line": { + "color": "chartreuse" + }, + "texttemplate": "value: (%{re}, %{im})", + "subplot": "smith4" + } + ], + "layout": { + "smith": { + "domain": { + "x": [0, 0.46], + "y": [0.56, 1] + } + }, + "smith2": { + "domain": { + "x": [0, 0.46], + "y": [0, 0.44] + } + }, + "smith3": { + "domain": { + "x": [0.54, 1], + "y": [0.56, 1] + } + }, + "smith4": { + "domain": { + "x": [0.54, 1], + "y": [0, 0.44] + } + }, + "showlegend": false, + "margin": {"t": 40, "b": 40, "r": 40, "l": 40}, + "width": 800, + "height": 800 + } +} diff --git a/test/image/mocks/zzz_smith_fill.json b/test/image/mocks/zzz_smith_fill.json new file mode 100644 index 00000000000..eafa18af04b --- /dev/null +++ b/test/image/mocks/zzz_smith_fill.json @@ -0,0 +1,74 @@ +{ + "data": [ + { + "re": [0, 0.3, 1, 2, 3, 5, 10], + "im": [0, 0.3, 1, 2, 3, 5, 10], + "mode": "lines+text", + "name": "Curved", + "line": { + "color": "peru", + "shape": "spline" + }, + "fill": "toself", + "text": "smith", + "type": "scattersmith" + }, + { + "re": [0, 0.3, 1, 2, 3, 5, 10], + "im": [0, 0.3, 1, 2, 3, 5, 10], + "mode": "lines+text", + "name": "Curved", + "line": { + "color": "peru", + "shape": "spline" + }, + "fill": "toself", + "text": "smith", + "type": "scattersmith", + "subplot": "smith2" + } + ], + "layout": { + "title": {"text": "Smith chart fill"}, + "font": { + "family": "Arial, sans-serif", + "size": 12, + "color": "darkblue" + }, + "width": 800, + "height": 800, + "margin": {"l": 40, "r": 40, "b": 30, "t": 60, "pad": 0}, + "smith": { + "domain": { + "x": [0, 0.46], + "y": [0.56, 1] + }, + "bgcolor": "lightblue", + "realaxis": { + "tickangle": 45 + }, + "imaginaryaxis": { + "showgrid": true, + "tickwidth": 2, + "ticklen": 5 + } + }, + "smith2": { + "domain": { + "x": [0.56, 1], + "y": [0.56, 1] + }, + "bgcolor": "lightblue", + "realaxis": { + "tickangle": 45 + }, + "imaginaryaxis": { + "showgrid": true, + "tickwidth": 2, + "ticklen": 5 + } + }, + "showlegend": false, + "paper_bgcolor": "rgb(255, 255, 255)" + } +} diff --git a/test/image/mocks/zzz_smith_gaps.json b/test/image/mocks/zzz_smith_gaps.json new file mode 100644 index 00000000000..41c8d4f52ba --- /dev/null +++ b/test/image/mocks/zzz_smith_gaps.json @@ -0,0 +1,49 @@ +{ + "data": [ + { + "type": "scattersmith", + "re": [0, 0.1, 0.5, 1, 2, 3, 4, 5, 10, 0.1, 0.5, 10], + "im": [0, 0.1, 0.5, 1, 2, 3, 4, 5, 10, -0.1, -0.5, -10], + "mode": "markers+lines" + }, + { + "type": "scattersmith", + "re": [0, 0.1, null, 1, 2, 3, 4, 5, 10, 0.1, 0.5, 10], + "im": [0, 0.1, 0.5, 1, 2, 3, 4, 5, 10, -0.1, -0.5, -10], + "mode": "markers+lines", + "subplot": "smith2" + }, + { + "type": "scattersmith", + "re": [0, 0.1, null, 1, 2, 3, 4, 5, 10, 0.1, 0.5, 10], + "im": [0, 0.1, 0.5, 1, 2, 3, 4, 5, 10, -0.1, -0.5, -10], + "connectgaps": true, + "mode": "markers+lines", + "subplot": "smith3" + } + ], + "layout": { + "smith": { + "domain": { + "x": [0, 0.46], + "y": [0.56, 1] + } + }, + "smith2": { + "domain": { + "x": [0, 0.46], + "y": [0, 0.44] + } + }, + "smith3": { + "domain": { + "x": [0.54, 1], + "y": [0.56, 1] + } + }, + "showlegend": false, + "margin": {"t": 40, "b": 40, "r": 40, "l": 40}, + "width": 800, + "height": 800 + } +} diff --git a/test/image/mocks/zzz_smith_line.json b/test/image/mocks/zzz_smith_line.json new file mode 100644 index 00000000000..5f6b36c32ab --- /dev/null +++ b/test/image/mocks/zzz_smith_line.json @@ -0,0 +1,62 @@ +{ + "data": [ + { + "re": [0, 0.3, 1, 2, 3, 5, 10], + "im": [0, 0.3, 1, 2, 3, 5, 10], + "mode": "markers+text", + "name": "Curved", + "line": { + "color": "peru", + "shape": "spline" + }, + "text": "smith", + "type": "scattersmith" + }, + { + "re": [0, 0.3, 1, 2, 3, 5, 10], + "im": [0, 0.6, 2, 4, 6, 10, 20], + "mode": "lines+markers", + "name": "Interpolated", + "line": { + "color": "darkviolet", + "shape": "linear" + }, + "type": "scattersmith" + }, + { + "re": [0, 0.3, 1, 2, 3, 5, 10], + "im": [0, -0.3, -1, -2, -3, -5, -10], + "mode": "lines+markers", + "name": "Interpolated negative", + "line": { + "color": "firebrick", + "shape": "linear" + }, + "type": "scattersmith" + } + ], + "layout": { + "title": {"text": "Smith chart lines"}, + "font": { + "family": "Arial, sans-serif", + "size": 12, + "color": "darkblue" + }, + "width": 500, + "height": 400, + "margin": {"l": 40, "r": 40, "b": 30, "t": 60, "pad": 0}, + "smith": { + "bgcolor": "lightblue", + "realaxis": { + "tickangle": 45 + }, + "imaginaryaxis": { + "showgrid": true, + "tickwidth": 2, + "ticklen": 5 + } + }, + "showlegend": false, + "paper_bgcolor": "rgb(255, 255, 255)" + } +} diff --git a/test/image/mocks/zzz_smith_single.json b/test/image/mocks/zzz_smith_single.json new file mode 100644 index 00000000000..9f690aaa4dd --- /dev/null +++ b/test/image/mocks/zzz_smith_single.json @@ -0,0 +1,28 @@ +{ + "data": [ + { + "type": "scattersmith", + "re": [0, 0.1, 0.5, 1, 2, 3, 4, 5, 10, 0.1, 0.5, 10], + "im": [0, 0.1, 0.5, 1, 2, 3, 4, 5, 10, -0.1, -0.5, -10], + "mode": "lines+markers" + } + ], + "layout": { + "smith": { + "domain": { + "x": [0, 0.46], + "y": [0.56, 1] + }, + "imaginaryaxis": { + "showgrid": false, + "showticklabels": false, + "visible": true + } + }, + "showlegend": true, + "paper_bgcolor": "lightgray", + "margin": {"t": 40, "b": 40, "r": 40, "l": 40}, + "width": 800, + "height": 800 + } +} diff --git a/test/jasmine/assets/mock_lists.js b/test/jasmine/assets/mock_lists.js index a7112686864..9daa193d16e 100644 --- a/test/jasmine/assets/mock_lists.js +++ b/test/jasmine/assets/mock_lists.js @@ -38,6 +38,7 @@ var svgMockList = [ ['icicle_coffee', require('@mocks/icicle_coffee.json')], ['parcats_bad-displayindex', require('@mocks/parcats_bad-displayindex.json')], ['scattercarpet', require('@mocks/scattercarpet.json')], + ['zzz_smith_basic', require('@mocks/zzz_smith_basic.json')], ['shapes', require('@mocks/shapes.json')], ['splom_iris', require('@mocks/splom_iris.json')], ['table_wrapped_birds', require('@mocks/table_wrapped_birds.json')], diff --git a/test/jasmine/bundle_tests/plotschema_test.js b/test/jasmine/bundle_tests/plotschema_test.js index a8839522a92..171eaf5e869 100644 --- a/test/jasmine/bundle_tests/plotschema_test.js +++ b/test/jasmine/bundle_tests/plotschema_test.js @@ -134,7 +134,7 @@ describe('plot schema', function() { var cnt = 0; var astrs = [ - 'xaxis', 'yaxis', 'scene', 'geo', 'ternary', 'mapbox', 'polar', + 'xaxis', 'yaxis', 'scene', 'geo', 'ternary', 'mapbox', 'polar', 'smith', // not really a 'subplot' object but supports yaxis, yaxis2, yaxis3, // ... counters, so list it here 'xaxis.rangeslider.yaxis', diff --git a/test/jasmine/tests/plot_api_react_test.js b/test/jasmine/tests/plot_api_react_test.js index 90e54d81184..7c6424f9c56 100644 --- a/test/jasmine/tests/plot_api_react_test.js +++ b/test/jasmine/tests/plot_api_react_test.js @@ -461,6 +461,28 @@ describe('@noCIdep Plotly.react', function() { .then(done, done.fail); }); + it('can put smith plots into staticPlot mode', function(done) { + var data = [{re: [0, 1, 2, 3, 4, 5], im: [0, 1, 2, 3, 4, 5], type: 'scattersmith'}]; + var layout = {}; + + Plotly.newPlot(gd, data, layout) + .then(countPlots) + .then(function() { + expect(d3Select(gd).selectAll('.drag').size()).toBe(4); + + return Plotly.react(gd, data, layout, {staticPlot: true}); + }) + .then(function() { + expect(d3Select(gd).selectAll('.drag').size()).toBe(0); + + return Plotly.react(gd, data, layout, {}); + }) + .then(function() { + expect(d3Select(gd).selectAll('.drag').size()).toBe(4); + }) + .then(done, done.fail); + }); + it('can change from scatter to category scatterpolar and back', function(done) { function scatter() { return { diff --git a/test/jasmine/tests/scattersmith_test.js b/test/jasmine/tests/scattersmith_test.js new file mode 100644 index 00000000000..e28c7aea818 --- /dev/null +++ b/test/jasmine/tests/scattersmith_test.js @@ -0,0 +1,79 @@ +var Plotly = require('@lib/index'); +var ScatterSmith = require('@src/traces/scattersmith'); +var Lib = require('@src/lib'); +var assertHoverLabelContent = require('../assets/custom_assertions').assertHoverLabelContent; + +var createGraphDiv = require('../assets/create_graph_div'); +var destroyGraphDiv = require('../assets/destroy_graph_div'); + +var mouseEvent = require('../assets/mouse_event'); + +describe('Test scattersmith trace defaults:', function() { + var traceOut; + + function _supply(traceIn, layout) { + traceOut = {}; + ScatterSmith.supplyDefaults(traceIn, traceOut, '#444', layout || {}); + } + + it('should not truncate *re* when longer than *im*', function() { + // this is handled at the calc step now via _length. + _supply({ + re: [1, 2, 3, 4, 5], + im: [1, 2, 3] + }); + + expect(traceOut.re).toEqual([1, 2, 3, 4, 5]); + expect(traceOut.im).toEqual([1, 2, 3]); + expect(traceOut._length).toBe(3); + }); + + it('should not truncate *im* when longer than *re*', function() { + // this is handled at the calc step now via _length. + _supply({ + re: [1, 2, 3], + im: [1, 2, 3, 4, 5] + }); + + expect(traceOut.re).toEqual([1, 2, 3]); + expect(traceOut.im).toEqual([1, 2, 3, 4, 5]); + expect(traceOut._length).toBe(3); + }); +}); + +describe('Test scattersmith hover', function() { + var gd; + + afterEach(destroyGraphDiv); + + function run(specs) { + gd = createGraphDiv(); + + var fig = Lib.extendDeep( + {width: 700, height: 500}, + specs.mock || require('@mocks/zzz_smith_basic.json') + ); + + if(specs.patch) { + fig = specs.patch(fig); + } + + var pos = specs.pos || [200, 200]; + + return Plotly.newPlot(gd, fig).then(function() { + mouseEvent('mousemove', pos[0], pos[1]); + assertHoverLabelContent(specs); + }); + } + + [{ + desc: 'Smith chart hover labels', + nums: '0.1 + 0.1j', + pos: [80, 175], + name: 'trace 0' + }].forEach(function(specs) { + it('should generate correct hover labels ' + specs.desc, function(done) { + run(specs).then(done, done.fail); + }); + }); +}); diff --git a/test/jasmine/tests/select_test.js b/test/jasmine/tests/select_test.js index 233af05aae7..858cb79dd7d 100644 --- a/test/jasmine/tests/select_test.js +++ b/test/jasmine/tests/select_test.js @@ -2205,6 +2205,48 @@ describe('Test select box and lasso per trace:', function() { }); }); + [false, true].forEach(function(hasCssTransform) { + it('should work on scattersmith traces, hasCssTransform: ' + hasCssTransform, function(done) { + var assertPoints = makeAssertPoints(['re', 'im']); + var assertSelectedPoints = makeAssertSelectedPoints(); + + var fig = Lib.extendDeep({}, require('@mocks/zzz_smith_basic.json')); + fig.layout.width = 800; + fig.layout.dragmode = 'select'; + addInvisible(fig); + + Plotly.newPlot(gd, fig) + .then(function() { + if(hasCssTransform) transformPlot(gd, cssTransform); + + return _run(hasCssTransform, + [[150, 150], [350, 250]], + function() { + assertPoints([[3, 3], [4, 4], [5, 5], [10, 10], [10, -10]]); + assertSelectedPoints({0: [5, 6, 7, 8, 11]}); + }, + [200, 200], + BOXEVENTS, 'scattersmith select' + ); + }) + .then(function() { + return Plotly.relayout(gd, 'dragmode', 'lasso'); + }) + .then(function() { + return _run(hasCssTransform, + [[150, 150], [350, 150], [350, 250], [150, 250], [150, 150]], + function() { + assertPoints([[3, 3], [4, 4], [5, 5], [10, 10], [10, -10]]); + assertSelectedPoints({0: [5, 6, 7, 8, 11]}); + }, + [200, 200], + LASSOEVENTS, 'scattersmith lasso' + ); + }) + .then(done, done.fail); + }); + }); + [false, true].forEach(function(hasCssTransform) { it('should work on barpolar traces, hasCssTransform: ' + hasCssTransform, function(done) { var assertPoints = makeAssertPoints(['r', 'theta']); diff --git a/test/jasmine/tests/smith_test.js b/test/jasmine/tests/smith_test.js new file mode 100644 index 00000000000..d0cf79273bd --- /dev/null +++ b/test/jasmine/tests/smith_test.js @@ -0,0 +1,378 @@ +var Plotly = require('@lib/index'); +var constants = require('@src/plots/smith/constants'); +var Smith = require('@src/plots/smith'); +var Lib = require('@src/lib'); + +var d3Select = require('../../strict-d3').select; +var d3SelectAll = require('../../strict-d3').selectAll; + +var destroyGraphDiv = require('../assets/destroy_graph_div'); +var createGraphDiv = require('../assets/create_graph_div'); + +var mouseEvent = require('../assets/mouse_event'); + +describe('Test smith plot defaults:', function() { + var layoutOut; + + function _supply(layoutIn, fullData) { + fullData = fullData || [{ + type: 'scattersmith', + r: [], + theta: [], + subplot: 'smith' + }]; + + layoutOut = { + autotypenumbers: 'convert types', + font: {color: 'red'}, + _subplots: {smith: ['smith']} + }; + + Smith.supplyLayoutDefaults(layoutIn, layoutOut, fullData); + } + + it('should contain correct default top level values', function() { + _supply({ + smith: {} + }); + + var smith = layoutOut.smith; + + expect(smith.domain.x).toEqual([0, 1]); + expect(smith.domain.y).toEqual([0, 1]); + expect(smith.bgcolor).toBe('#fff'); + }); + + it('should contain correct defaults for the axes', function() { + _supply({ + smith: {} + }); + + var imag = layoutOut.smith.imaginaryaxis; + var real = layoutOut.smith.realaxis; + + expect(imag.type).toBe('linear'); + expect(real.type).toBe('linear'); + }); + + it('should propagate axis *color* settings', function() { + _supply({ + smith: { + imaginaryaxis: {color: 'red'}, + realaxis: {color: 'blue'} + } + }); + + expect(layoutOut.smith.imaginaryaxis.linecolor).toBe('red'); + expect(layoutOut.smith.imaginaryaxis.gridcolor).toBe('rgb(255, 153, 153)', 'blend by 60% with bgcolor'); + + expect(layoutOut.smith.realaxis.title.font.color).toBe('blue'); + expect(layoutOut.smith.realaxis.linecolor).toBe('blue'); + expect(layoutOut.smith.realaxis.gridcolor).toBe('rgb(153, 153, 255)', 'blend by 60% with bgcolor'); + }); + + it('should coerce hoverformat even for `visible: false` axes', function() { + _supply({ + smith: { + realaxis: { + visible: false, + hoverformat: 'g' + }, + imaginaryaxis: { + visible: false, + hoverformat: 'g' + } + } + }, [{ + type: 'scattersmith', + re: [1, 2], + im: [90, 180], + visible: true, + subplot: 'smith' + }]); + + expect(layoutOut.smith.realaxis.hoverformat).toBe('g'); + expect(layoutOut.smith.imaginaryaxis.hoverformat).toBe('g'); + }); +}); + +describe('Test relayout on smith subplots:', function() { + afterEach(destroyGraphDiv); + + it('should be able to reorder axis layers when relayout\'ing *layer*', function(done) { + var gd = createGraphDiv(); + var fig = Lib.extendDeep({}, require('@mocks/zzz_smith_axes.json')); + var dflt = constants.layerNames; + + function _assert(expected) { + var actual = d3SelectAll('g.smith > .smithsublayer'); + + expect(actual.size()).toBe(expected.length, '# of layer'); + + actual.each(function(d, i) { + var className = d3Select(this) + .attr('class') + .split('smithsublayer ')[1]; + + expect(className).toBe(expected[i], 'layer ' + i); + }); + } + + Plotly.newPlot(gd, fig).then(function() { + _assert(dflt); + return Plotly.relayout(gd, 'smith.realaxis.layer', 'below traces'); + }) + .then(function() { + _assert([ + 'draglayer', 'plotbg', 'angular-grid', 'radial-grid', + 'radial-line', 'radial-axis', + 'frontplot', + 'angular-line', 'angular-axis' + ]); + return Plotly.relayout(gd, 'smith.imaginaryaxis.layer', 'below traces'); + }) + .then(function() { + _assert([ + 'draglayer', 'plotbg', 'angular-grid', 'radial-grid', + 'angular-line', + 'radial-line', + 'angular-axis', + 'radial-axis', + 'frontplot' + ]); + return Plotly.relayout(gd, 'smith.realaxis.layer', 'above traces'); + }) + .then(function() { + _assert([ + 'draglayer', 'plotbg', 'angular-grid', 'radial-grid', + 'angular-line', 'angular-axis', + 'frontplot', + 'radial-line', 'radial-axis' + ]); + return Plotly.relayout(gd, 'smith.imaginaryaxis.layer', null); + }) + .then(function() { + _assert(dflt); + }) + .then(done, done.fail); + }); + + it('should be able to toggle axis features', function(done) { + var gd = createGraphDiv(); + var fig = Lib.extendDeep({}, require('@mocks/zzz_smith_single.json')); + + function assertCnt(selector, expected, msg) { + var sel = d3Select(gd).selectAll(selector); + expect(sel.size()).toBe(expected, msg); + } + + function assertDisplay(selector, expected, msg) { + var sel = d3Select(gd).select(selector); + + if(!sel.size()) fail(selector + ' not found'); + + sel.each(function() { + expect(d3Select(this).attr('display')).toBe(expected, msg); + }); + } + + function toggle(astr, vals, exps, selector, fn) { + return function() { + return Plotly.relayout(gd, astr, vals[0]).then(function() { + fn(selector, exps[0], astr + ' ' + vals[0]); + return Plotly.relayout(gd, astr, vals[1]); + }) + .then(function() { + fn(selector, exps[1], astr + ' ' + vals[1]); + return Plotly.relayout(gd, astr, vals[0]); + }) + .then(function() { + fn(selector, exps[0], astr + ' ' + vals[0]); + }); + }; + } + + Plotly.newPlot(gd, fig) + .then(toggle( + 'smith.realaxis.showline', + [true, false], [null, 'none'], + '.radial-line > line', assertDisplay + )) + .then(toggle( + 'smith.realaxis.showgrid', + [true, false], [null, 'none'], + '.radial-grid', assertDisplay + )) + .then(toggle( + 'smith.realaxis.showticklabels', + [true, false], [5, 0], + '.radial-axis > .realaxis2tick > text', assertCnt + )) + .then(toggle( + 'smith.imaginaryaxis.showline', + [true, false], [null, 'none'], + '.angular-line > path', assertDisplay + )) + .then(toggle( + 'smith.imaginaryaxis.showgrid', + [true, false], [10, 0], + '.angular-grid > path', assertCnt + )) + .then(toggle( + 'smith.imaginaryaxis.showticklabels', + [true, false], [12, 0], + '.angular-axis > .imaginaryaxistick > text', assertCnt + )) + .then(done, done.fail); + }); + + it('should clean up its framework, clip paths and info layers when getting deleted', function(done) { + var gd = createGraphDiv(); + var fig = Lib.extendDeep({}, require('@mocks/zzz_smith_fill.json')); + var traces = Lib.extendDeep([], fig.data); + var inds = traces.map(function(_, i) { return i; }); + + function _assert(exp) { + expect(d3SelectAll('g.smith').size()).toBe(exp.subplot, '# subplot layer'); + expect(d3SelectAll('g.g-smithtitle').size()).toBe(exp.rtitle, '# radial title'); + + var clipCnt = 0; + d3SelectAll('clipPath').each(function() { + if(/smith-for-traces/.test(this.id)) clipCnt++; + }); + expect(clipCnt).toBe(exp.clip, '# clip paths'); + } + + Plotly.newPlot(gd, fig).then(function() { + _assert({subplot: 1, clip: 1, rtitle: 1}); + + return Plotly.deleteTraces(gd, inds); + }) + .then(function() { + _assert({subplot: 0, clip: 0, rtitle: 0}); + + return Plotly.addTraces(gd, traces); + }) + .then(function() { + _assert({subplot: 1, clip: 1, rtitle: 1}); + }) + .then(done, done.fail); + }); +}); + +describe('Test smith interactions:', function() { + var gd; + var eventData; + var eventCnts; + + var eventNames = [ + 'plotly_hover', 'plotly_unhover', + 'plotly_click', 'plotly_doubleclick', + 'plotly_relayout' + ]; + + beforeEach(function() { + jasmine.DEFAULT_TIMEOUT_INTERVAL = 10000; + eventData = ''; + eventCnts = {}; + gd = createGraphDiv(); + }); + + afterEach(destroyGraphDiv); + + function _plot(fig) { + return Plotly.newPlot(gd, fig).then(function() { + eventNames.forEach(function(k) { + eventCnts[k] = 0; + gd.on(k, function(d) { + eventData = d; + eventCnts[k]++; + Lib.clearThrottle(); + }); + }); + }); + } + + function assertEventPointData(expected, msg) { + var actual = eventData.points || []; + + expect(actual.length) + .toBe(expected.length, msg + ' same number of pts'); + + expected.forEach(function(e, i) { + var a = actual[i]; + var m = msg + ' (pt ' + i + ')'; + + for(var k in e) { + expect(a[k]).toBeCloseTo(e[k], 1, m + ' ' + k); + } + }); + } + + function assertEventCnt(expected, msg) { + eventNames.forEach(function(k) { + var m = msg + ' event cnt for ' + k; + + if(k in expected) { + expect(eventCnts[k]).toBe(expected[k], m); + } else { + expect(eventCnts[k]).toBe(0, m); + } + }); + } + + function _hover(pos) { + eventData = ''; + mouseEvent('mousemove', pos[0], pos[1]); + } + + function _unhover(pos) { + eventData = ''; + mouseEvent('mouseout', pos[0], pos[1]); + } + + it('should trigger hover/unhover/click/doubleclick events', function(done) { + var fig = Lib.extendDeep({}, require('@mocks/zzz_smith_axes.json')); + var ptPos = [159, 138]; + var blankPos = [109, 109]; + var marginPos = [20, 20]; + + function _assert(ptExpectation, cntExpecation, msg) { + if(Array.isArray(ptExpectation)) { + assertEventPointData(ptExpectation, msg); + } else { + expect(eventData).toBe(ptExpectation, msg); + } + assertEventCnt(cntExpecation, msg); + } + + _plot(fig) + .then(function() { _hover(ptPos); }) + .then(function() { + _assert([{ + re: 0.5, + im: 0.5 + }], { + plotly_hover: 1 + }, 'after hover on pt'); + }) + .then(function() { _unhover(blankPos);}) + .then(function() { + _assert([{ + re: 0.5, + im: 0.5 + }], { + plotly_hover: 1, + plotly_unhover: 1 + }, 'after unhover off pt'); + }) + .then(function() { _hover(marginPos);}) + .then(function() { + _assert('', { + plotly_hover: 1, + plotly_unhover: 1, + }, 'after hovering in margin'); + }) + .then(done, done.fail); + }); +}); diff --git a/test/plot-schema.json b/test/plot-schema.json index 772e34b2e65..a41685d567f 100644 --- a/test/plot-schema.json +++ b/test/plot-schema.json @@ -7271,61 +7271,95 @@ }, "role": "object" }, - "spikedistance": { - "description": "Sets the default distance (in pixels) to look for data to draw spikelines to (-1 means no cutoff, 0 means no looking for data). As with hoverdistance, distance does not apply to area-like objects. In addition, some objects can be hovered on but will not generate spikelines, such as scatter fills.", - "dflt": -1, - "editType": "none", - "min": -1, - "valType": "integer" - }, - "template": { - "description": "Default attributes to be applied to the plot. Templates can be created from existing plots using `Plotly.makeTemplate`, or created manually. They should be objects with format: `{layout: layoutTemplate, data: {[type]: [traceTemplate, ...]}, ...}` `layoutTemplate` and `traceTemplate` are objects matching the attribute structure of `layout` and a data trace. Trace templates are applied cyclically to traces of each type. Container arrays (eg `annotations`) have special handling: An object ending in `defaults` (eg `annotationdefaults`) is applied to each array item. But if an item has a `templateitemname` key we look in the template array for an item with matching `name` and apply that instead. If no matching `name` is found we mark the item invisible. Any named template item not referenced is appended to the end of the array, so you can use this for a watermark annotation or a logo image, for example. To omit one of these items on the plot, make an item with matching `templateitemname` and `visible: false`.", - "editType": "calc", - "valType": "any" - }, - "ternary": { + "smith": { "_isSubplotObj": true, - "aaxis": { - "_deprecated": { - "title": { - "description": "Value of `title` is no longer a simple *string* but a set of sub-attributes. To set the axis' title, please use `title.text` now.", - "editType": "plot", - "valType": "string" - }, - "titlefont": { - "color": { + "bgcolor": { + "description": "Set the background color of the subplot", + "dflt": "#fff", + "editType": "plot", + "valType": "color" + }, + "domain": { + "column": { + "description": "If there is a layout grid, use the domain for this column in the grid for this smith subplot .", + "dflt": 0, + "editType": "plot", + "min": 0, + "valType": "integer" + }, + "editType": "plot", + "role": "object", + "row": { + "description": "If there is a layout grid, use the domain for this row in the grid for this smith subplot .", + "dflt": 0, + "editType": "plot", + "min": 0, + "valType": "integer" + }, + "x": { + "description": "Sets the horizontal domain of this smith subplot (in plot fraction).", + "dflt": [ + 0, + 1 + ], + "editType": "plot", + "items": [ + { "editType": "plot", - "valType": "color" + "max": 1, + "min": 0, + "valType": "number" }, - "description": "Former `titlefont` is now the sub-attribute `font` of `title`. To customize title font properties, please use `title.font` now.", - "editType": "plot", - "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": "plot", - "noBlank": true, - "strict": true, - "valType": "string" + "max": 1, + "min": 0, + "valType": "number" + } + ], + "valType": "info_array" + }, + "y": { + "description": "Sets the vertical domain of this smith subplot (in plot fraction).", + "dflt": [ + 0, + 1 + ], + "editType": "plot", + "items": [ + { + "editType": "plot", + "max": 1, + "min": 0, + "valType": "number" }, - "size": { + { "editType": "plot", - "min": 1, + "max": 1, + "min": 0, "valType": "number" } - } - }, + ], + "valType": "info_array" + } + }, + "editType": "calc", + "imaginaryaxis": { "color": { "description": "Sets default for all colors associated with this axis all at once: line, font, tick, and grid colors. Grid color is lightened by blending this with the plot background Individual pieces can override this.", "dflt": "#444", "editType": "plot", "valType": "color" }, - "dtick": { - "description": "Sets the step in-between ticks on this axis. Use with `tick0`. Must be a positive number, or special strings available to *log* and *date* axes. If the axis `type` is *log*, then ticks are set every 10^(n*dtick) where n is the tick number. For example, to set a tick mark at 1, 10, 100, 1000, ... set dtick to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to log_10(5), or 0.69897000433. *log* has several special values; *L*, where `f` is a positive number, gives ticks linearly spaced in value (but not position). For example `tick0` = 0.1, `dtick` = *L0.5* will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus small digits between, use *D1* (all digits) or *D2* (only 2 and 5). `tick0` is ignored for *D1* and *D2*. If the axis `type` is *date*, then you must convert the time to milliseconds. For example, to set the interval between ticks to one day, set `dtick` to 86400000.0. *date* also has special values *M* gives ticks spaced by a number of months. `n` must be a positive integer. To set ticks on the 15th of every third month, set `tick0` to *2000-01-15* and `dtick` to *M3*. To set ticks every 4 years, set `dtick` to *M48*", - "editType": "plot", - "impliedEdits": { - "tickmode": "linear" - }, - "valType": "any" + "direction": { + "description": "Sets the direction corresponding to positive angles.", + "dflt": "counterclockwise", + "editType": "calc", + "valType": "enumerated", + "values": [ + "counterclockwise", + "clockwise" + ] }, "editType": "plot", "exponentformat": { @@ -7358,7 +7392,7 @@ "hoverformat": { "description": "Sets the hover text formatting rule using d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format. We add two items to d3's date formatter: *%h* for half of the year as a decimal number as well as *%{n}f* for fractional seconds with n digits. For example, *2016-10-13 09:15:23.456* with tickformat *%H~%M~%S.%2f* would display *09~15~23.46*", "dflt": "", - "editType": "plot", + "editType": "none", "valType": "string" }, "layer": { @@ -7384,13 +7418,6 @@ "min": 0, "valType": "number" }, - "min": { - "description": "The minimum value visible on this axis. The maximum is determined by the sum minus the minimum values of the other two axes. The full view corresponds to all the minima set to zero.", - "dflt": 0, - "editType": "plot", - "min": 0, - "valType": "number" - }, "minexponent": { "description": "Hide SI prefix for 10^n if |n| is below this number. This only has an effect when `tickformat` is *SI* or *B*.", "dflt": 3, @@ -7398,14 +7425,12 @@ "min": 0, "valType": "number" }, - "nticks": { - "description": "Specifies the maximum number of ticks for the particular axis. The actual number of ticks will be chosen automatically to be less than or equal to `nticks`. Has an effect only if `tickmode` is set to *auto*.", - "dflt": 6, - "editType": "plot", - "min": 1, - "valType": "integer" - }, "role": "object", + "rotation": { + "description": "Sets that start position (in degrees) of the angular axis By default, smith subplots with `direction` set to *counterclockwise* get a `rotation` of *0* which corresponds to due East (like what mathematicians prefer). In turn, smith with `direction` set to *clockwise* get a rotation of *90* which corresponds to due North (like on a compass),", + "editType": "calc", + "valType": "angle" + }, "separatethousands": { "description": "If \"true\", even 4-digit integers are separated", "dflt": false, @@ -7466,14 +7491,6 @@ "none" ] }, - "tick0": { - "description": "Sets the placement of the first tick on this axis. Use with `dtick`. If the axis `type` is *log*, then you must take the log of your starting tick (e.g. to set the starting tick to 100, set the `tick0` to 2) except when `dtick`=*L* (see `dtick` for more info). If the axis `type` is *date*, it should be a date string, like date data. If the axis `type` is *category*, it should be a number, using the scale where each category is assigned a serial number from zero in the order it appears.", - "editType": "plot", - "impliedEdits": { - "tickmode": "linear" - }, - "valType": "any" - }, "tickangle": { "description": "Sets the angle of the tick labels with respect to the horizontal. For example, a `tickangle` of -90 draws the tick labels vertically.", "dflt": "auto", @@ -7626,84 +7643,25 @@ "min": 0, "valType": "number" }, - "title": { - "editType": "plot", - "font": { - "color": { - "editType": "plot", - "valType": "color" - }, - "description": "Sets this axis' title font. Note that the title's font used to be customized by the now deprecated `titlefont` attribute.", - "editType": "plot", - "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": "plot", - "noBlank": true, - "strict": true, - "valType": "string" - }, - "role": "object", - "size": { - "editType": "plot", - "min": 1, - "valType": "number" - } - }, - "role": "object", - "text": { - "description": "Sets the title of this axis. Note that before the existence of `title.text`, the title's contents used to be defined as the `title` attribute itself. This behavior has been deprecated.", - "editType": "plot", - "valType": "string" - } - }, "uirevision": { - "description": "Controls persistence of user-driven changes in axis `min`, and `title` if in `editable: true` configuration. Defaults to `ternary.uirevision`.", + "description": "Controls persistence of user-driven changes in axis `rotation`. Defaults to `smith.uirevision`.", "editType": "none", "valType": "any" + }, + "visible": { + "description": "A single toggle to hide the axis while preserving interaction like dragging. Default is true when a cheater plot is present on the axis, otherwise false", + "dflt": true, + "editType": "plot", + "valType": "boolean" } }, - "baxis": { - "_deprecated": { - "title": { - "description": "Value of `title` is no longer a simple *string* but a set of sub-attributes. To set the axis' title, please use `title.text` now.", - "editType": "plot", - "valType": "string" - }, - "titlefont": { - "color": { - "editType": "plot", - "valType": "color" - }, - "description": "Former `titlefont` is now the sub-attribute `font` of `title`. To customize title font properties, please use `title.font` now.", - "editType": "plot", - "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": "plot", - "noBlank": true, - "strict": true, - "valType": "string" - }, - "size": { - "editType": "plot", - "min": 1, - "valType": "number" - } - } - }, + "realaxis": { "color": { "description": "Sets default for all colors associated with this axis all at once: line, font, tick, and grid colors. Grid color is lightened by blending this with the plot background Individual pieces can override this.", "dflt": "#444", "editType": "plot", "valType": "color" }, - "dtick": { - "description": "Sets the step in-between ticks on this axis. Use with `tick0`. Must be a positive number, or special strings available to *log* and *date* axes. If the axis `type` is *log*, then ticks are set every 10^(n*dtick) where n is the tick number. For example, to set a tick mark at 1, 10, 100, 1000, ... set dtick to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to log_10(5), or 0.69897000433. *log* has several special values; *L*, where `f` is a positive number, gives ticks linearly spaced in value (but not position). For example `tick0` = 0.1, `dtick` = *L0.5* will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus small digits between, use *D1* (all digits) or *D2* (only 2 and 5). `tick0` is ignored for *D1* and *D2*. If the axis `type` is *date*, then you must convert the time to milliseconds. For example, to set the interval between ticks to one day, set `dtick` to 86400000.0. *date* also has special values *M* gives ticks spaced by a number of months. `n` must be a positive integer. To set ticks on the 15th of every third month, set `tick0` to *2000-01-15* and `dtick` to *M3*. To set ticks every 4 years, set `dtick` to *M48*", - "editType": "plot", - "impliedEdits": { - "tickmode": "linear" - }, - "valType": "any" - }, "editType": "plot", "exponentformat": { "description": "Determines a formatting rule for the tick exponents. For example, consider the number 1,000,000,000. If *none*, it appears as 1,000,000,000. If *e*, 1e+9. If *E*, 1E+9. If *power*, 1x10^9 (with 9 in a super script). If *SI*, 1G. If *B*, 1B.", @@ -7735,7 +7693,7 @@ "hoverformat": { "description": "Sets the hover text formatting rule using d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format. We add two items to d3's date formatter: *%h* for half of the year as a decimal number as well as *%{n}f* for fractional seconds with n digits. For example, *2016-10-13 09:15:23.456* with tickformat *%H~%M~%S.%2f* would display *09~15~23.46*", "dflt": "", - "editType": "plot", + "editType": "none", "valType": "string" }, "layer": { @@ -7761,13 +7719,6 @@ "min": 0, "valType": "number" }, - "min": { - "description": "The minimum value visible on this axis. The maximum is determined by the sum minus the minimum values of the other two axes. The full view corresponds to all the minima set to zero.", - "dflt": 0, - "editType": "plot", - "min": 0, - "valType": "number" - }, "minexponent": { "description": "Hide SI prefix for 10^n if |n| is below this number. This only has an effect when `tickformat` is *SI* or *B*.", "dflt": 3, @@ -7775,13 +7726,6 @@ "min": 0, "valType": "number" }, - "nticks": { - "description": "Specifies the maximum number of ticks for the particular axis. The actual number of ticks will be chosen automatically to be less than or equal to `nticks`. Has an effect only if `tickmode` is set to *auto*.", - "dflt": 6, - "editType": "plot", - "min": 1, - "valType": "integer" - }, "role": "object", "separatethousands": { "description": "If \"true\", even 4-digit integers are separated", @@ -7843,14 +7787,6 @@ "none" ] }, - "tick0": { - "description": "Sets the placement of the first tick on this axis. Use with `dtick`. If the axis `type` is *log*, then you must take the log of your starting tick (e.g. to set the starting tick to 100, set the `tick0` to 2) except when `dtick`=*L* (see `dtick` for more info). If the axis `type` is *date*, it should be a date string, like date data. If the axis `type` is *category*, it should be a number, using the scale where each category is assigned a serial number from zero in the order it appears.", - "editType": "plot", - "impliedEdits": { - "tickmode": "linear" - }, - "valType": "any" - }, "tickangle": { "description": "Sets the angle of the tick labels with respect to the horizontal. For example, a `tickangle` of -90 draws the tick labels vertically.", "dflt": "auto", @@ -8007,21 +7943,21 @@ "editType": "plot", "font": { "color": { - "editType": "plot", + "editType": "ticks", "valType": "color" }, "description": "Sets this axis' title font. Note that the title's font used to be customized by the now deprecated `titlefont` attribute.", "editType": "plot", "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": "plot", + "editType": "ticks", "noBlank": true, "strict": true, "valType": "string" }, "role": "object", "size": { - "editType": "plot", + "editType": "ticks", "min": 1, "valType": "number" } @@ -8029,23 +7965,45 @@ "role": "object", "text": { "description": "Sets the title of this axis. Note that before the existence of `title.text`, the title's contents used to be defined as the `title` attribute itself. This behavior has been deprecated.", + "dflt": "", "editType": "plot", "valType": "string" } }, "uirevision": { - "description": "Controls persistence of user-driven changes in axis `min`, and `title` if in `editable: true` configuration. Defaults to `ternary.uirevision`.", + "description": "Controls persistence of user-driven changes in axis `range`, `autorange`, `angle`, and `title` if in `editable: true` configuration. Defaults to `smith.uirevision`.", "editType": "none", "valType": "any" + }, + "visible": { + "description": "A single toggle to hide the axis while preserving interaction like dragging. Default is true when a cheater plot is present on the axis, otherwise false", + "dflt": true, + "editType": "plot", + "valType": "boolean" } }, - "bgcolor": { - "description": "Set the background color of the subplot", - "dflt": "#fff", - "editType": "plot", - "valType": "color" - }, - "caxis": { + "role": "object", + "uirevision": { + "description": "Controls persistence of user-driven changes in axis attributes, if not overridden in the individual axes. Defaults to `layout.uirevision`.", + "editType": "none", + "valType": "any" + } + }, + "spikedistance": { + "description": "Sets the default distance (in pixels) to look for data to draw spikelines to (-1 means no cutoff, 0 means no looking for data). As with hoverdistance, distance does not apply to area-like objects. In addition, some objects can be hovered on but will not generate spikelines, such as scatter fills.", + "dflt": -1, + "editType": "none", + "min": -1, + "valType": "integer" + }, + "template": { + "description": "Default attributes to be applied to the plot. Templates can be created from existing plots using `Plotly.makeTemplate`, or created manually. They should be objects with format: `{layout: layoutTemplate, data: {[type]: [traceTemplate, ...]}, ...}` `layoutTemplate` and `traceTemplate` are objects matching the attribute structure of `layout` and a data trace. Trace templates are applied cyclically to traces of each type. Container arrays (eg `annotations`) have special handling: An object ending in `defaults` (eg `annotationdefaults`) is applied to each array item. But if an item has a `templateitemname` key we look in the template array for an item with matching `name` and apply that instead. If no matching `name` is found we mark the item invisible. Any named template item not referenced is appended to the end of the array, so you can use this for a watermark annotation or a logo image, for example. To omit one of these items on the plot, make an item with matching `templateitemname` and `visible: false`.", + "editType": "calc", + "valType": "any" + }, + "ternary": { + "_isSubplotObj": true, + "aaxis": { "_deprecated": { "title": { "description": "Value of `title` is no longer a simple *string* but a set of sub-attributes. To set the axis' title, please use `title.text` now.", @@ -8422,121 +8380,881 @@ "valType": "any" } }, - "domain": { - "column": { - "description": "If there is a layout grid, use the domain for this column in the grid for this ternary subplot .", - "dflt": 0, + "baxis": { + "_deprecated": { + "title": { + "description": "Value of `title` is no longer a simple *string* but a set of sub-attributes. To set the axis' title, please use `title.text` now.", + "editType": "plot", + "valType": "string" + }, + "titlefont": { + "color": { + "editType": "plot", + "valType": "color" + }, + "description": "Former `titlefont` is now the sub-attribute `font` of `title`. To customize title font properties, please use `title.font` now.", + "editType": "plot", + "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": "plot", + "noBlank": true, + "strict": true, + "valType": "string" + }, + "size": { + "editType": "plot", + "min": 1, + "valType": "number" + } + } + }, + "color": { + "description": "Sets default for all colors associated with this axis all at once: line, font, tick, and grid colors. Grid color is lightened by blending this with the plot background Individual pieces can override this.", + "dflt": "#444", "editType": "plot", - "min": 0, - "valType": "integer" + "valType": "color" + }, + "dtick": { + "description": "Sets the step in-between ticks on this axis. Use with `tick0`. Must be a positive number, or special strings available to *log* and *date* axes. If the axis `type` is *log*, then ticks are set every 10^(n*dtick) where n is the tick number. For example, to set a tick mark at 1, 10, 100, 1000, ... set dtick to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to log_10(5), or 0.69897000433. *log* has several special values; *L*, where `f` is a positive number, gives ticks linearly spaced in value (but not position). For example `tick0` = 0.1, `dtick` = *L0.5* will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus small digits between, use *D1* (all digits) or *D2* (only 2 and 5). `tick0` is ignored for *D1* and *D2*. If the axis `type` is *date*, then you must convert the time to milliseconds. For example, to set the interval between ticks to one day, set `dtick` to 86400000.0. *date* also has special values *M* gives ticks spaced by a number of months. `n` must be a positive integer. To set ticks on the 15th of every third month, set `tick0` to *2000-01-15* and `dtick` to *M3*. To set ticks every 4 years, set `dtick` to *M48*", + "editType": "plot", + "impliedEdits": { + "tickmode": "linear" + }, + "valType": "any" }, "editType": "plot", - "role": "object", - "row": { - "description": "If there is a layout grid, use the domain for this row in the grid for this ternary subplot .", + "exponentformat": { + "description": "Determines a formatting rule for the tick exponents. For example, consider the number 1,000,000,000. If *none*, it appears as 1,000,000,000. If *e*, 1e+9. If *E*, 1E+9. If *power*, 1x10^9 (with 9 in a super script). If *SI*, 1G. If *B*, 1B.", + "dflt": "B", + "editType": "plot", + "valType": "enumerated", + "values": [ + "none", + "e", + "E", + "power", + "SI", + "B" + ] + }, + "gridcolor": { + "description": "Sets the color of the grid lines.", + "dflt": "#eee", + "editType": "plot", + "valType": "color" + }, + "gridwidth": { + "description": "Sets the width (in px) of the grid lines.", + "dflt": 1, + "editType": "plot", + "min": 0, + "valType": "number" + }, + "hoverformat": { + "description": "Sets the hover text formatting rule using d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format. We add two items to d3's date formatter: *%h* for half of the year as a decimal number as well as *%{n}f* for fractional seconds with n digits. For example, *2016-10-13 09:15:23.456* with tickformat *%H~%M~%S.%2f* would display *09~15~23.46*", + "dflt": "", + "editType": "plot", + "valType": "string" + }, + "layer": { + "description": "Sets the layer on which this axis is displayed. If *above traces*, this axis is displayed above all the subplot's traces If *below traces*, this axis is displayed below all the subplot's traces, but above the grid lines. Useful when used together with scatter-like traces with `cliponaxis` set to *false* to show markers and/or text nodes above this axis.", + "dflt": "above traces", + "editType": "plot", + "valType": "enumerated", + "values": [ + "above traces", + "below traces" + ] + }, + "linecolor": { + "description": "Sets the axis line color.", + "dflt": "#444", + "editType": "plot", + "valType": "color" + }, + "linewidth": { + "description": "Sets the width (in px) of the axis line.", + "dflt": 1, + "editType": "plot", + "min": 0, + "valType": "number" + }, + "min": { + "description": "The minimum value visible on this axis. The maximum is determined by the sum minus the minimum values of the other two axes. The full view corresponds to all the minima set to zero.", "dflt": 0, "editType": "plot", "min": 0, + "valType": "number" + }, + "minexponent": { + "description": "Hide SI prefix for 10^n if |n| is below this number. This only has an effect when `tickformat` is *SI* or *B*.", + "dflt": 3, + "editType": "plot", + "min": 0, + "valType": "number" + }, + "nticks": { + "description": "Specifies the maximum number of ticks for the particular axis. The actual number of ticks will be chosen automatically to be less than or equal to `nticks`. Has an effect only if `tickmode` is set to *auto*.", + "dflt": 6, + "editType": "plot", + "min": 1, "valType": "integer" }, - "x": { - "description": "Sets the horizontal domain of this ternary subplot (in plot fraction).", - "dflt": [ - 0, - 1 - ], + "role": "object", + "separatethousands": { + "description": "If \"true\", even 4-digit integers are separated", + "dflt": false, "editType": "plot", - "items": [ - { - "editType": "plot", - "max": 1, - "min": 0, - "valType": "number" - }, - { + "valType": "boolean" + }, + "showexponent": { + "description": "If *all*, all exponents are shown besides their significands. If *first*, only the exponent of the first tick is shown. If *last*, only the exponent of the last tick is shown. If *none*, no exponents appear.", + "dflt": "all", + "editType": "plot", + "valType": "enumerated", + "values": [ + "all", + "first", + "last", + "none" + ] + }, + "showgrid": { + "description": "Determines whether or not grid lines are drawn. If *true*, the grid lines are drawn at every tick mark.", + "dflt": true, + "editType": "plot", + "valType": "boolean" + }, + "showline": { + "description": "Determines whether or not a line bounding this axis is drawn.", + "dflt": true, + "editType": "plot", + "valType": "boolean" + }, + "showticklabels": { + "description": "Determines whether or not the tick labels are drawn.", + "dflt": true, + "editType": "plot", + "valType": "boolean" + }, + "showtickprefix": { + "description": "If *all*, all tick labels are displayed with a prefix. If *first*, only the first tick is displayed with a prefix. If *last*, only the last tick is displayed with a suffix. If *none*, tick prefixes are hidden.", + "dflt": "all", + "editType": "plot", + "valType": "enumerated", + "values": [ + "all", + "first", + "last", + "none" + ] + }, + "showticksuffix": { + "description": "Same as `showtickprefix` but for tick suffixes.", + "dflt": "all", + "editType": "plot", + "valType": "enumerated", + "values": [ + "all", + "first", + "last", + "none" + ] + }, + "tick0": { + "description": "Sets the placement of the first tick on this axis. Use with `dtick`. If the axis `type` is *log*, then you must take the log of your starting tick (e.g. to set the starting tick to 100, set the `tick0` to 2) except when `dtick`=*L* (see `dtick` for more info). If the axis `type` is *date*, it should be a date string, like date data. If the axis `type` is *category*, it should be a number, using the scale where each category is assigned a serial number from zero in the order it appears.", + "editType": "plot", + "impliedEdits": { + "tickmode": "linear" + }, + "valType": "any" + }, + "tickangle": { + "description": "Sets the angle of the tick labels with respect to the horizontal. For example, a `tickangle` of -90 draws the tick labels vertically.", + "dflt": "auto", + "editType": "plot", + "valType": "angle" + }, + "tickcolor": { + "description": "Sets the tick color.", + "dflt": "#444", + "editType": "plot", + "valType": "color" + }, + "tickfont": { + "color": { + "editType": "plot", + "valType": "color" + }, + "description": "Sets the tick font.", + "editType": "plot", + "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": "plot", + "noBlank": true, + "strict": true, + "valType": "string" + }, + "role": "object", + "size": { + "editType": "plot", + "min": 1, + "valType": "number" + } + }, + "tickformat": { + "description": "Sets the tick label formatting rule using d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format. We add two items to d3's date formatter: *%h* for half of the year as a decimal number as well as *%{n}f* for fractional seconds with n digits. For example, *2016-10-13 09:15:23.456* with tickformat *%H~%M~%S.%2f* would display *09~15~23.46*", + "dflt": "", + "editType": "plot", + "valType": "string" + }, + "tickformatstops": { + "items": { + "tickformatstop": { + "dtickrange": { + "description": "range [*min*, *max*], where *min*, *max* - dtick values which describe some zoom level, it is possible to omit *min* or *max* value by passing *null*", + "editType": "plot", + "items": [ + { + "editType": "plot", + "valType": "any" + }, + { + "editType": "plot", + "valType": "any" + } + ], + "valType": "info_array" + }, "editType": "plot", - "max": 1, - "min": 0, - "valType": "number" + "enabled": { + "description": "Determines whether or not this stop is used. If `false`, this stop is ignored even within its `dtickrange`.", + "dflt": true, + "editType": "plot", + "valType": "boolean" + }, + "name": { + "description": "When used in a template, named items are created in the output figure in addition to any items the figure already has in this array. You can modify these items in the output figure by making your own item with `templateitemname` matching this `name` alongside your modifications (including `visible: false` or `enabled: false` to hide it). Has no effect outside of a template.", + "editType": "plot", + "valType": "string" + }, + "role": "object", + "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": "plot", + "valType": "string" + }, + "value": { + "description": "string - dtickformat for described zoom level, the same as *tickformat*", + "dflt": "", + "editType": "plot", + "valType": "string" + } } - ], - "valType": "info_array" + }, + "role": "object" }, - "y": { - "description": "Sets the vertical domain of this ternary subplot (in plot fraction).", - "dflt": [ - 0, - 1 - ], + "ticklen": { + "description": "Sets the tick length (in px).", + "dflt": 5, "editType": "plot", - "items": [ - { + "min": 0, + "valType": "number" + }, + "tickmode": { + "description": "Sets the tick mode for this axis. If *auto*, the number of ticks is set via `nticks`. If *linear*, the placement of the ticks is determined by a starting position `tick0` and a tick step `dtick` (*linear* is the default value if `tick0` and `dtick` are provided). If *array*, the placement of the ticks is set via `tickvals` and the tick text is `ticktext`. (*array* is the default value if `tickvals` is provided).", + "editType": "plot", + "impliedEdits": {}, + "valType": "enumerated", + "values": [ + "auto", + "linear", + "array" + ] + }, + "tickprefix": { + "description": "Sets a tick label prefix.", + "dflt": "", + "editType": "plot", + "valType": "string" + }, + "ticks": { + "description": "Determines whether ticks are drawn or not. If **, this axis' ticks are not drawn. If *outside* (*inside*), this axis' are drawn outside (inside) the axis lines.", + "editType": "plot", + "valType": "enumerated", + "values": [ + "outside", + "inside", + "" + ] + }, + "ticksuffix": { + "description": "Sets a tick label suffix.", + "dflt": "", + "editType": "plot", + "valType": "string" + }, + "ticktext": { + "description": "Sets the text displayed at the ticks position via `tickvals`. Only has an effect if `tickmode` is set to *array*. Used with `tickvals`.", + "editType": "plot", + "valType": "data_array" + }, + "ticktextsrc": { + "description": "Sets the source reference on Chart Studio Cloud for ticktext .", + "editType": "none", + "valType": "string" + }, + "tickvals": { + "description": "Sets the values at which ticks on this axis appear. Only has an effect if `tickmode` is set to *array*. Used with `ticktext`.", + "editType": "plot", + "valType": "data_array" + }, + "tickvalssrc": { + "description": "Sets the source reference on Chart Studio Cloud for tickvals .", + "editType": "none", + "valType": "string" + }, + "tickwidth": { + "description": "Sets the tick width (in px).", + "dflt": 1, + "editType": "plot", + "min": 0, + "valType": "number" + }, + "title": { + "editType": "plot", + "font": { + "color": { "editType": "plot", - "max": 1, - "min": 0, - "valType": "number" + "valType": "color" }, - { + "description": "Sets this axis' title font. Note that the title's font used to be customized by the now deprecated `titlefont` attribute.", + "editType": "plot", + "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": "plot", - "max": 1, - "min": 0, + "noBlank": true, + "strict": true, + "valType": "string" + }, + "role": "object", + "size": { + "editType": "plot", + "min": 1, "valType": "number" } - ], - "valType": "info_array" + }, + "role": "object", + "text": { + "description": "Sets the title of this axis. Note that before the existence of `title.text`, the title's contents used to be defined as the `title` attribute itself. This behavior has been deprecated.", + "editType": "plot", + "valType": "string" + } + }, + "uirevision": { + "description": "Controls persistence of user-driven changes in axis `min`, and `title` if in `editable: true` configuration. Defaults to `ternary.uirevision`.", + "editType": "none", + "valType": "any" } }, - "editType": "plot", - "role": "object", - "sum": { - "description": "The number each triplet should sum to, and the maximum range of each axis", - "dflt": 1, + "bgcolor": { + "description": "Set the background color of the subplot", + "dflt": "#fff", "editType": "plot", - "min": 0, - "valType": "number" + "valType": "color" }, - "uirevision": { - "description": "Controls persistence of user-driven changes in axis `min` and `title`, if not overridden in the individual axes. Defaults to `layout.uirevision`.", - "editType": "none", - "valType": "any" - } - }, - "title": { - "editType": "layoutstyle", - "font": { + "caxis": { + "_deprecated": { + "title": { + "description": "Value of `title` is no longer a simple *string* but a set of sub-attributes. To set the axis' title, please use `title.text` now.", + "editType": "plot", + "valType": "string" + }, + "titlefont": { + "color": { + "editType": "plot", + "valType": "color" + }, + "description": "Former `titlefont` is now the sub-attribute `font` of `title`. To customize title font properties, please use `title.font` now.", + "editType": "plot", + "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": "plot", + "noBlank": true, + "strict": true, + "valType": "string" + }, + "size": { + "editType": "plot", + "min": 1, + "valType": "number" + } + } + }, "color": { - "editType": "layoutstyle", + "description": "Sets default for all colors associated with this axis all at once: line, font, tick, and grid colors. Grid color is lightened by blending this with the plot background Individual pieces can override this.", + "dflt": "#444", + "editType": "plot", "valType": "color" }, - "description": "Sets the title font. Note that the title's font used to be customized by the now deprecated `titlefont` attribute.", - "editType": "layoutstyle", - "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": "layoutstyle", - "noBlank": true, - "strict": true, - "valType": "string" + "dtick": { + "description": "Sets the step in-between ticks on this axis. Use with `tick0`. Must be a positive number, or special strings available to *log* and *date* axes. If the axis `type` is *log*, then ticks are set every 10^(n*dtick) where n is the tick number. For example, to set a tick mark at 1, 10, 100, 1000, ... set dtick to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to log_10(5), or 0.69897000433. *log* has several special values; *L*, where `f` is a positive number, gives ticks linearly spaced in value (but not position). For example `tick0` = 0.1, `dtick` = *L0.5* will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus small digits between, use *D1* (all digits) or *D2* (only 2 and 5). `tick0` is ignored for *D1* and *D2*. If the axis `type` is *date*, then you must convert the time to milliseconds. For example, to set the interval between ticks to one day, set `dtick` to 86400000.0. *date* also has special values *M* gives ticks spaced by a number of months. `n` must be a positive integer. To set ticks on the 15th of every third month, set `tick0` to *2000-01-15* and `dtick` to *M3*. To set ticks every 4 years, set `dtick` to *M48*", + "editType": "plot", + "impliedEdits": { + "tickmode": "linear" + }, + "valType": "any" }, - "role": "object", - "size": { - "editType": "layoutstyle", - "min": 1, - "valType": "number" - } - }, - "pad": { - "b": { - "description": "The amount of padding (in px) along the bottom of the component.", - "dflt": 0, - "editType": "layoutstyle", - "valType": "number" + "editType": "plot", + "exponentformat": { + "description": "Determines a formatting rule for the tick exponents. For example, consider the number 1,000,000,000. If *none*, it appears as 1,000,000,000. If *e*, 1e+9. If *E*, 1E+9. If *power*, 1x10^9 (with 9 in a super script). If *SI*, 1G. If *B*, 1B.", + "dflt": "B", + "editType": "plot", + "valType": "enumerated", + "values": [ + "none", + "e", + "E", + "power", + "SI", + "B" + ] }, - "description": "Sets the padding of the title. Each padding value only applies when the corresponding `xanchor`/`yanchor` value is set accordingly. E.g. for left padding to take effect, `xanchor` must be set to *left*. The same rule applies if `xanchor`/`yanchor` is determined automatically. Padding is muted if the respective anchor value is *middle*/*center*.", - "editType": "layoutstyle", - "l": { - "description": "The amount of padding (in px) on the left side of the component.", - "dflt": 0, - "editType": "layoutstyle", + "gridcolor": { + "description": "Sets the color of the grid lines.", + "dflt": "#eee", + "editType": "plot", + "valType": "color" + }, + "gridwidth": { + "description": "Sets the width (in px) of the grid lines.", + "dflt": 1, + "editType": "plot", + "min": 0, + "valType": "number" + }, + "hoverformat": { + "description": "Sets the hover text formatting rule using d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format. We add two items to d3's date formatter: *%h* for half of the year as a decimal number as well as *%{n}f* for fractional seconds with n digits. For example, *2016-10-13 09:15:23.456* with tickformat *%H~%M~%S.%2f* would display *09~15~23.46*", + "dflt": "", + "editType": "plot", + "valType": "string" + }, + "layer": { + "description": "Sets the layer on which this axis is displayed. If *above traces*, this axis is displayed above all the subplot's traces If *below traces*, this axis is displayed below all the subplot's traces, but above the grid lines. Useful when used together with scatter-like traces with `cliponaxis` set to *false* to show markers and/or text nodes above this axis.", + "dflt": "above traces", + "editType": "plot", + "valType": "enumerated", + "values": [ + "above traces", + "below traces" + ] + }, + "linecolor": { + "description": "Sets the axis line color.", + "dflt": "#444", + "editType": "plot", + "valType": "color" + }, + "linewidth": { + "description": "Sets the width (in px) of the axis line.", + "dflt": 1, + "editType": "plot", + "min": 0, + "valType": "number" + }, + "min": { + "description": "The minimum value visible on this axis. The maximum is determined by the sum minus the minimum values of the other two axes. The full view corresponds to all the minima set to zero.", + "dflt": 0, + "editType": "plot", + "min": 0, + "valType": "number" + }, + "minexponent": { + "description": "Hide SI prefix for 10^n if |n| is below this number. This only has an effect when `tickformat` is *SI* or *B*.", + "dflt": 3, + "editType": "plot", + "min": 0, + "valType": "number" + }, + "nticks": { + "description": "Specifies the maximum number of ticks for the particular axis. The actual number of ticks will be chosen automatically to be less than or equal to `nticks`. Has an effect only if `tickmode` is set to *auto*.", + "dflt": 6, + "editType": "plot", + "min": 1, + "valType": "integer" + }, + "role": "object", + "separatethousands": { + "description": "If \"true\", even 4-digit integers are separated", + "dflt": false, + "editType": "plot", + "valType": "boolean" + }, + "showexponent": { + "description": "If *all*, all exponents are shown besides their significands. If *first*, only the exponent of the first tick is shown. If *last*, only the exponent of the last tick is shown. If *none*, no exponents appear.", + "dflt": "all", + "editType": "plot", + "valType": "enumerated", + "values": [ + "all", + "first", + "last", + "none" + ] + }, + "showgrid": { + "description": "Determines whether or not grid lines are drawn. If *true*, the grid lines are drawn at every tick mark.", + "dflt": true, + "editType": "plot", + "valType": "boolean" + }, + "showline": { + "description": "Determines whether or not a line bounding this axis is drawn.", + "dflt": true, + "editType": "plot", + "valType": "boolean" + }, + "showticklabels": { + "description": "Determines whether or not the tick labels are drawn.", + "dflt": true, + "editType": "plot", + "valType": "boolean" + }, + "showtickprefix": { + "description": "If *all*, all tick labels are displayed with a prefix. If *first*, only the first tick is displayed with a prefix. If *last*, only the last tick is displayed with a suffix. If *none*, tick prefixes are hidden.", + "dflt": "all", + "editType": "plot", + "valType": "enumerated", + "values": [ + "all", + "first", + "last", + "none" + ] + }, + "showticksuffix": { + "description": "Same as `showtickprefix` but for tick suffixes.", + "dflt": "all", + "editType": "plot", + "valType": "enumerated", + "values": [ + "all", + "first", + "last", + "none" + ] + }, + "tick0": { + "description": "Sets the placement of the first tick on this axis. Use with `dtick`. If the axis `type` is *log*, then you must take the log of your starting tick (e.g. to set the starting tick to 100, set the `tick0` to 2) except when `dtick`=*L* (see `dtick` for more info). If the axis `type` is *date*, it should be a date string, like date data. If the axis `type` is *category*, it should be a number, using the scale where each category is assigned a serial number from zero in the order it appears.", + "editType": "plot", + "impliedEdits": { + "tickmode": "linear" + }, + "valType": "any" + }, + "tickangle": { + "description": "Sets the angle of the tick labels with respect to the horizontal. For example, a `tickangle` of -90 draws the tick labels vertically.", + "dflt": "auto", + "editType": "plot", + "valType": "angle" + }, + "tickcolor": { + "description": "Sets the tick color.", + "dflt": "#444", + "editType": "plot", + "valType": "color" + }, + "tickfont": { + "color": { + "editType": "plot", + "valType": "color" + }, + "description": "Sets the tick font.", + "editType": "plot", + "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": "plot", + "noBlank": true, + "strict": true, + "valType": "string" + }, + "role": "object", + "size": { + "editType": "plot", + "min": 1, + "valType": "number" + } + }, + "tickformat": { + "description": "Sets the tick label formatting rule using d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format. We add two items to d3's date formatter: *%h* for half of the year as a decimal number as well as *%{n}f* for fractional seconds with n digits. For example, *2016-10-13 09:15:23.456* with tickformat *%H~%M~%S.%2f* would display *09~15~23.46*", + "dflt": "", + "editType": "plot", + "valType": "string" + }, + "tickformatstops": { + "items": { + "tickformatstop": { + "dtickrange": { + "description": "range [*min*, *max*], where *min*, *max* - dtick values which describe some zoom level, it is possible to omit *min* or *max* value by passing *null*", + "editType": "plot", + "items": [ + { + "editType": "plot", + "valType": "any" + }, + { + "editType": "plot", + "valType": "any" + } + ], + "valType": "info_array" + }, + "editType": "plot", + "enabled": { + "description": "Determines whether or not this stop is used. If `false`, this stop is ignored even within its `dtickrange`.", + "dflt": true, + "editType": "plot", + "valType": "boolean" + }, + "name": { + "description": "When used in a template, named items are created in the output figure in addition to any items the figure already has in this array. You can modify these items in the output figure by making your own item with `templateitemname` matching this `name` alongside your modifications (including `visible: false` or `enabled: false` to hide it). Has no effect outside of a template.", + "editType": "plot", + "valType": "string" + }, + "role": "object", + "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": "plot", + "valType": "string" + }, + "value": { + "description": "string - dtickformat for described zoom level, the same as *tickformat*", + "dflt": "", + "editType": "plot", + "valType": "string" + } + } + }, + "role": "object" + }, + "ticklen": { + "description": "Sets the tick length (in px).", + "dflt": 5, + "editType": "plot", + "min": 0, + "valType": "number" + }, + "tickmode": { + "description": "Sets the tick mode for this axis. If *auto*, the number of ticks is set via `nticks`. If *linear*, the placement of the ticks is determined by a starting position `tick0` and a tick step `dtick` (*linear* is the default value if `tick0` and `dtick` are provided). If *array*, the placement of the ticks is set via `tickvals` and the tick text is `ticktext`. (*array* is the default value if `tickvals` is provided).", + "editType": "plot", + "impliedEdits": {}, + "valType": "enumerated", + "values": [ + "auto", + "linear", + "array" + ] + }, + "tickprefix": { + "description": "Sets a tick label prefix.", + "dflt": "", + "editType": "plot", + "valType": "string" + }, + "ticks": { + "description": "Determines whether ticks are drawn or not. If **, this axis' ticks are not drawn. If *outside* (*inside*), this axis' are drawn outside (inside) the axis lines.", + "editType": "plot", + "valType": "enumerated", + "values": [ + "outside", + "inside", + "" + ] + }, + "ticksuffix": { + "description": "Sets a tick label suffix.", + "dflt": "", + "editType": "plot", + "valType": "string" + }, + "ticktext": { + "description": "Sets the text displayed at the ticks position via `tickvals`. Only has an effect if `tickmode` is set to *array*. Used with `tickvals`.", + "editType": "plot", + "valType": "data_array" + }, + "ticktextsrc": { + "description": "Sets the source reference on Chart Studio Cloud for ticktext .", + "editType": "none", + "valType": "string" + }, + "tickvals": { + "description": "Sets the values at which ticks on this axis appear. Only has an effect if `tickmode` is set to *array*. Used with `ticktext`.", + "editType": "plot", + "valType": "data_array" + }, + "tickvalssrc": { + "description": "Sets the source reference on Chart Studio Cloud for tickvals .", + "editType": "none", + "valType": "string" + }, + "tickwidth": { + "description": "Sets the tick width (in px).", + "dflt": 1, + "editType": "plot", + "min": 0, + "valType": "number" + }, + "title": { + "editType": "plot", + "font": { + "color": { + "editType": "plot", + "valType": "color" + }, + "description": "Sets this axis' title font. Note that the title's font used to be customized by the now deprecated `titlefont` attribute.", + "editType": "plot", + "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": "plot", + "noBlank": true, + "strict": true, + "valType": "string" + }, + "role": "object", + "size": { + "editType": "plot", + "min": 1, + "valType": "number" + } + }, + "role": "object", + "text": { + "description": "Sets the title of this axis. Note that before the existence of `title.text`, the title's contents used to be defined as the `title` attribute itself. This behavior has been deprecated.", + "editType": "plot", + "valType": "string" + } + }, + "uirevision": { + "description": "Controls persistence of user-driven changes in axis `min`, and `title` if in `editable: true` configuration. Defaults to `ternary.uirevision`.", + "editType": "none", + "valType": "any" + } + }, + "domain": { + "column": { + "description": "If there is a layout grid, use the domain for this column in the grid for this ternary subplot .", + "dflt": 0, + "editType": "plot", + "min": 0, + "valType": "integer" + }, + "editType": "plot", + "role": "object", + "row": { + "description": "If there is a layout grid, use the domain for this row in the grid for this ternary subplot .", + "dflt": 0, + "editType": "plot", + "min": 0, + "valType": "integer" + }, + "x": { + "description": "Sets the horizontal domain of this ternary subplot (in plot fraction).", + "dflt": [ + 0, + 1 + ], + "editType": "plot", + "items": [ + { + "editType": "plot", + "max": 1, + "min": 0, + "valType": "number" + }, + { + "editType": "plot", + "max": 1, + "min": 0, + "valType": "number" + } + ], + "valType": "info_array" + }, + "y": { + "description": "Sets the vertical domain of this ternary subplot (in plot fraction).", + "dflt": [ + 0, + 1 + ], + "editType": "plot", + "items": [ + { + "editType": "plot", + "max": 1, + "min": 0, + "valType": "number" + }, + { + "editType": "plot", + "max": 1, + "min": 0, + "valType": "number" + } + ], + "valType": "info_array" + } + }, + "editType": "plot", + "role": "object", + "sum": { + "description": "The number each triplet should sum to, and the maximum range of each axis", + "dflt": 1, + "editType": "plot", + "min": 0, + "valType": "number" + }, + "uirevision": { + "description": "Controls persistence of user-driven changes in axis `min` and `title`, if not overridden in the individual axes. Defaults to `layout.uirevision`.", + "editType": "none", + "valType": "any" + } + }, + "title": { + "editType": "layoutstyle", + "font": { + "color": { + "editType": "layoutstyle", + "valType": "color" + }, + "description": "Sets the title font. Note that the title's font used to be customized by the now deprecated `titlefont` attribute.", + "editType": "layoutstyle", + "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": "layoutstyle", + "noBlank": true, + "strict": true, + "valType": "string" + }, + "role": "object", + "size": { + "editType": "layoutstyle", + "min": 1, + "valType": "number" + } + }, + "pad": { + "b": { + "description": "The amount of padding (in px) along the bottom of the component.", + "dflt": 0, + "editType": "layoutstyle", + "valType": "number" + }, + "description": "Sets the padding of the title. Each padding value only applies when the corresponding `xanchor`/`yanchor` value is set accordingly. E.g. for left padding to take effect, `xanchor` must be set to *left*. The same rule applies if `xanchor`/`yanchor` is determined automatically. Padding is muted if the respective anchor value is *middle*/*center*.", + "editType": "layoutstyle", + "l": { + "description": "The amount of padding (in px) on the left side of the component.", + "dflt": 0, + "editType": "layoutstyle", "valType": "number" }, "r": { @@ -50582,7 +51300,1328 @@ "valType": "string" }, "mode": { - "description": "Determines the drawing mode for this scatter trace.", + "description": "Determines the drawing mode for this scatter trace.", + "editType": "calc", + "extras": [ + "none" + ], + "flags": [ + "lines", + "markers", + "text" + ], + "valType": "flaglist" + }, + "name": { + "description": "Sets the trace name. The trace name appear as the legend item and on hover.", + "editType": "style", + "valType": "string" + }, + "opacity": { + "description": "Sets the opacity of the trace.", + "dflt": 1, + "editType": "calc", + "max": 1, + "min": 0, + "valType": "number" + }, + "selected": { + "editType": "calc", + "marker": { + "color": { + "description": "Sets the marker color of selected points.", + "editType": "calc", + "valType": "color" + }, + "editType": "calc", + "opacity": { + "description": "Sets the marker opacity of selected points.", + "editType": "calc", + "max": 1, + "min": 0, + "valType": "number" + }, + "role": "object", + "size": { + "description": "Sets the marker size of selected points.", + "editType": "calc", + "min": 0, + "valType": "number" + } + }, + "role": "object", + "textfont": { + "color": { + "description": "Sets the text font color of selected points.", + "editType": "calc", + "valType": "color" + }, + "editType": "calc", + "role": "object" + } + }, + "selectedpoints": { + "description": "Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the `unselected` are turned on for all points, whereas, any other non-array values means no selection all where the `selected` and `unselected` styles have no effect.", + "editType": "calc", + "valType": "any" + }, + "showlegend": { + "description": "Determines whether or not an item corresponding to this trace is shown in the legend.", + "dflt": true, + "editType": "style", + "valType": "boolean" + }, + "stream": { + "editType": "calc", + "maxpoints": { + "description": "Sets the maximum number of points to keep on the plots from an incoming stream. If `maxpoints` is set to *50*, only the newest 50 points will be displayed on the plot.", + "dflt": 500, + "editType": "calc", + "max": 10000, + "min": 0, + "valType": "number" + }, + "role": "object", + "token": { + "description": "The stream id number links a data trace on a plot with a stream. See https://chart-studio.plotly.com/settings for more details.", + "editType": "calc", + "noBlank": true, + "strict": true, + "valType": "string" + } + }, + "text": { + "arrayOk": true, + "description": "Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a *text* flag and *hovertext* is not set, these elements will be seen in the hover labels.", + "dflt": "", + "editType": "calc", + "valType": "string" + }, + "textfont": { + "color": { + "arrayOk": true, + "editType": "calc", + "valType": "color" + }, + "colorsrc": { + "description": "Sets the source reference on Chart Studio Cloud for color .", + "editType": "none", + "valType": "string" + }, + "description": "Sets the text font.", + "editType": "calc", + "family": { + "arrayOk": true, + "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", + "noBlank": true, + "strict": true, + "valType": "string" + }, + "familysrc": { + "description": "Sets the source reference on Chart Studio Cloud for family .", + "editType": "none", + "valType": "string" + }, + "role": "object", + "size": { + "arrayOk": true, + "editType": "calc", + "min": 1, + "valType": "number" + }, + "sizesrc": { + "description": "Sets the source reference on Chart Studio Cloud for size .", + "editType": "none", + "valType": "string" + } + }, + "textposition": { + "arrayOk": true, + "description": "Sets the positions of the `text` elements with respects to the (x,y) coordinates.", + "dflt": "middle center", + "editType": "calc", + "valType": "enumerated", + "values": [ + "top left", + "top center", + "top right", + "middle left", + "middle center", + "middle right", + "bottom left", + "bottom center", + "bottom right" + ] + }, + "textpositionsrc": { + "description": "Sets the source reference on Chart Studio Cloud for textposition .", + "editType": "none", + "valType": "string" + }, + "textsrc": { + "description": "Sets the source reference on Chart Studio Cloud for text .", + "editType": "none", + "valType": "string" + }, + "texttemplate": { + "arrayOk": true, + "description": "Template string used for rendering the information text that appear on points. Note that this will override `textinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format for details on the date formatting syntax. Every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. ", + "dflt": "", + "editType": "calc", + "valType": "string" + }, + "texttemplatesrc": { + "description": "Sets the source reference on Chart Studio Cloud for texttemplate .", + "editType": "none", + "valType": "string" + }, + "transforms": { + "items": { + "transform": { + "description": "WARNING: All transforms are deprecated and may be removed from the API in next major version. An array of operations that manipulate the trace data, for example filtering or sorting the data arrays.", + "editType": "calc", + "role": "object" + } + }, + "role": "object" + }, + "type": "scattergl", + "uid": { + "description": "Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.", + "editType": "plot", + "valType": "string" + }, + "uirevision": { + "description": "Controls persistence of some user-driven changes to the trace: `constraintrange` in `parcoords` traces, as well as some `editable: true` modifications such as `name` and `colorbar.title`. Defaults to `layout.uirevision`. Note that other user-driven trace attribute changes are controlled by `layout` attributes: `trace.visible` is controlled by `layout.legend.uirevision`, `selectedpoints` is controlled by `layout.selectionrevision`, and `colorbar.(x|y)` (accessible with `config: {editable: true}`) is controlled by `layout.editrevision`. Trace changes are tracked by `uid`, which only falls back on trace index if no `uid` is provided. So if your app can add/remove traces before the end of the `data` array, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace a `uid` that stays with it as it moves.", + "editType": "none", + "valType": "any" + }, + "unselected": { + "editType": "calc", + "marker": { + "color": { + "description": "Sets the marker color of unselected points, applied only when a selection exists.", + "editType": "calc", + "valType": "color" + }, + "editType": "calc", + "opacity": { + "description": "Sets the marker opacity of unselected points, applied only when a selection exists.", + "editType": "calc", + "max": 1, + "min": 0, + "valType": "number" + }, + "role": "object", + "size": { + "description": "Sets the marker size of unselected points, applied only when a selection exists.", + "editType": "calc", + "min": 0, + "valType": "number" + } + }, + "role": "object", + "textfont": { + "color": { + "description": "Sets the text font color of unselected points, applied only when a selection exists.", + "editType": "calc", + "valType": "color" + }, + "editType": "calc", + "role": "object" + } + }, + "visible": { + "description": "Determines whether or not this trace is visible. If *legendonly*, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).", + "dflt": true, + "editType": "calc", + "valType": "enumerated", + "values": [ + true, + false, + "legendonly" + ] + }, + "x": { + "description": "Sets the x coordinates.", + "editType": "calc+clearAxisTypes", + "valType": "data_array" + }, + "x0": { + "description": "Alternate to `x`. Builds a linear space of x coordinates. Use with `dx` where `x0` is the starting coordinate and `dx` the step.", + "dflt": 0, + "editType": "calc+clearAxisTypes", + "valType": "any" + }, + "xaxis": { + "description": "Sets a reference between this trace's x coordinates and a 2D cartesian x axis. If *x* (the default value), the x coordinates refer to `layout.xaxis`. If *x2*, the x coordinates refer to `layout.xaxis2`, and so on.", + "dflt": "x", + "editType": "calc+clearAxisTypes", + "valType": "subplotid" + }, + "xcalendar": { + "description": "Sets the calendar system to use with `x` date data.", + "dflt": "gregorian", + "editType": "calc", + "valType": "enumerated", + "values": [ + "chinese", + "coptic", + "discworld", + "ethiopian", + "gregorian", + "hebrew", + "islamic", + "jalali", + "julian", + "mayan", + "nanakshahi", + "nepali", + "persian", + "taiwan", + "thai", + "ummalqura" + ] + }, + "xhoverformat": { + "description": "Sets the hover text formatting rulefor `x` using d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format. We add two items to d3's date formatter: *%h* for half of the year as a decimal number as well as *%{n}f* for fractional seconds with n digits. For example, *2016-10-13 09:15:23.456* with tickformat *%H~%M~%S.%2f* would display *09~15~23.46*By default the values are formatted using `xaxis.hoverformat`.", + "dflt": "", + "editType": "calc", + "valType": "string" + }, + "xperiod": { + "description": "Only relevant when the axis `type` is *date*. Sets the period positioning in milliseconds or *M* on the x axis. Special values in the form of *M* could be used to declare the number of months. In this case `n` must be a positive integer.", + "dflt": 0, + "editType": "calc", + "valType": "any" + }, + "xperiod0": { + "description": "Only relevant when the axis `type` is *date*. Sets the base for period positioning in milliseconds or date string on the x0 axis. When `x0period` is round number of weeks, the `x0period0` by default would be on a Sunday i.e. 2000-01-02, otherwise it would be at 2000-01-01.", + "editType": "calc", + "valType": "any" + }, + "xperiodalignment": { + "description": "Only relevant when the axis `type` is *date*. Sets the alignment of data points on the x axis.", + "dflt": "middle", + "editType": "calc", + "valType": "enumerated", + "values": [ + "start", + "middle", + "end" + ] + }, + "xsrc": { + "description": "Sets the source reference on Chart Studio Cloud for x .", + "editType": "none", + "valType": "string" + }, + "y": { + "description": "Sets the y coordinates.", + "editType": "calc+clearAxisTypes", + "valType": "data_array" + }, + "y0": { + "description": "Alternate to `y`. Builds a linear space of y coordinates. Use with `dy` where `y0` is the starting coordinate and `dy` the step.", + "dflt": 0, + "editType": "calc+clearAxisTypes", + "valType": "any" + }, + "yaxis": { + "description": "Sets a reference between this trace's y coordinates and a 2D cartesian y axis. If *y* (the default value), the y coordinates refer to `layout.yaxis`. If *y2*, the y coordinates refer to `layout.yaxis2`, and so on.", + "dflt": "y", + "editType": "calc+clearAxisTypes", + "valType": "subplotid" + }, + "ycalendar": { + "description": "Sets the calendar system to use with `y` date data.", + "dflt": "gregorian", + "editType": "calc", + "valType": "enumerated", + "values": [ + "chinese", + "coptic", + "discworld", + "ethiopian", + "gregorian", + "hebrew", + "islamic", + "jalali", + "julian", + "mayan", + "nanakshahi", + "nepali", + "persian", + "taiwan", + "thai", + "ummalqura" + ] + }, + "yhoverformat": { + "description": "Sets the hover text formatting rulefor `y` using d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format. We add two items to d3's date formatter: *%h* for half of the year as a decimal number as well as *%{n}f* for fractional seconds with n digits. For example, *2016-10-13 09:15:23.456* with tickformat *%H~%M~%S.%2f* would display *09~15~23.46*By default the values are formatted using `yaxis.hoverformat`.", + "dflt": "", + "editType": "calc", + "valType": "string" + }, + "yperiod": { + "description": "Only relevant when the axis `type` is *date*. Sets the period positioning in milliseconds or *M* on the y axis. Special values in the form of *M* could be used to declare the number of months. In this case `n` must be a positive integer.", + "dflt": 0, + "editType": "calc", + "valType": "any" + }, + "yperiod0": { + "description": "Only relevant when the axis `type` is *date*. Sets the base for period positioning in milliseconds or date string on the y0 axis. When `y0period` is round number of weeks, the `y0period0` by default would be on a Sunday i.e. 2000-01-02, otherwise it would be at 2000-01-01.", + "editType": "calc", + "valType": "any" + }, + "yperiodalignment": { + "description": "Only relevant when the axis `type` is *date*. Sets the alignment of data points on the y axis.", + "dflt": "middle", + "editType": "calc", + "valType": "enumerated", + "values": [ + "start", + "middle", + "end" + ] + }, + "ysrc": { + "description": "Sets the source reference on Chart Studio Cloud for y .", + "editType": "none", + "valType": "string" + } + }, + "categories": [ + "gl", + "regl", + "cartesian", + "symbols", + "errorBarsOK", + "showLegend", + "scatter-like" + ], + "meta": { + "description": "The data visualized as scatter point or lines is set in `x` and `y` using the WebGL plotting engine. Bubble charts are achieved by setting `marker.size` and/or `marker.color` to a numerical arrays.", + "hrName": "scatter_gl" + }, + "type": "scattergl" + }, + "scattermapbox": { + "animatable": false, + "attributes": { + "below": { + "description": "Determines if this scattermapbox trace's layers are to be inserted before the layer with the specified ID. By default, scattermapbox layers are inserted above all the base layers. To place the scattermapbox layers above every other layer, set `below` to *''*.", + "editType": "calc", + "valType": "string" + }, + "connectgaps": { + "description": "Determines whether or not gaps (i.e. {nan} or missing values) in the provided data arrays are connected.", + "dflt": false, + "editType": "calc", + "valType": "boolean" + }, + "customdata": { + "description": "Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, *scatter* traces also appends customdata items in the markers DOM elements", + "editType": "calc", + "valType": "data_array" + }, + "customdatasrc": { + "description": "Sets the source reference on Chart Studio Cloud for customdata .", + "editType": "none", + "valType": "string" + }, + "fill": { + "description": "Sets the area to fill with a solid color. Use with `fillcolor` if not *none*. *toself* connects the endpoints of the trace (or each segment of the trace if it has gaps) into a closed shape.", + "dflt": "none", + "editType": "calc", + "valType": "enumerated", + "values": [ + "none", + "toself" + ] + }, + "fillcolor": { + "description": "Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available.", + "editType": "calc", + "valType": "color" + }, + "hoverinfo": { + "arrayOk": true, + "description": "Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed upon hovering. But, if `none` is set, click and hover events are still fired.", + "dflt": "all", + "editType": "calc", + "extras": [ + "all", + "none", + "skip" + ], + "flags": [ + "lon", + "lat", + "text", + "name" + ], + "valType": "flaglist" + }, + "hoverinfosrc": { + "description": "Sets the source reference on Chart Studio Cloud for hoverinfo .", + "editType": "none", + "valType": "string" + }, + "hoverlabel": { + "align": { + "arrayOk": true, + "description": "Sets the horizontal alignment of the text content within hover label box. Has an effect only if the hover label text spans more two or more lines", + "dflt": "auto", + "editType": "none", + "valType": "enumerated", + "values": [ + "left", + "right", + "auto" + ] + }, + "alignsrc": { + "description": "Sets the source reference on Chart Studio Cloud for align .", + "editType": "none", + "valType": "string" + }, + "bgcolor": { + "arrayOk": true, + "description": "Sets the background color of the hover labels for this trace", + "editType": "none", + "valType": "color" + }, + "bgcolorsrc": { + "description": "Sets the source reference on Chart Studio Cloud for bgcolor .", + "editType": "none", + "valType": "string" + }, + "bordercolor": { + "arrayOk": true, + "description": "Sets the border color of the hover labels for this trace.", + "editType": "none", + "valType": "color" + }, + "bordercolorsrc": { + "description": "Sets the source reference on Chart Studio Cloud for bordercolor .", + "editType": "none", + "valType": "string" + }, + "editType": "none", + "font": { + "color": { + "arrayOk": true, + "editType": "none", + "valType": "color" + }, + "colorsrc": { + "description": "Sets the source reference on Chart Studio Cloud for color .", + "editType": "none", + "valType": "string" + }, + "description": "Sets the font used in hover labels.", + "editType": "none", + "family": { + "arrayOk": true, + "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" + }, + "familysrc": { + "description": "Sets the source reference on Chart Studio Cloud for family .", + "editType": "none", + "valType": "string" + }, + "role": "object", + "size": { + "arrayOk": true, + "editType": "none", + "min": 1, + "valType": "number" + }, + "sizesrc": { + "description": "Sets the source reference on Chart Studio Cloud for size .", + "editType": "none", + "valType": "string" + } + }, + "namelength": { + "arrayOk": true, + "description": "Sets the default length (in number of characters) of the trace name in the hover labels for all traces. -1 shows the whole name regardless of length. 0-3 shows the first 0-3 characters, and an integer >3 will show the whole name if it is less than that many characters, but if it is longer, will truncate to `namelength - 3` characters and add an ellipsis.", + "dflt": 15, + "editType": "none", + "min": -1, + "valType": "integer" + }, + "namelengthsrc": { + "description": "Sets the source reference on Chart Studio Cloud for namelength .", + "editType": "none", + "valType": "string" + }, + "role": "object" + }, + "hovertemplate": { + "arrayOk": true, + "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\" as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, *xother* will be added to those with different x positions from the first point. An underscore before or after *(x|y)other* will add a space on that side, only when this field is shown. Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", + "dflt": "", + "editType": "calc", + "valType": "string" + }, + "hovertemplatesrc": { + "description": "Sets the source reference on Chart Studio Cloud for hovertemplate .", + "editType": "none", + "valType": "string" + }, + "hovertext": { + "arrayOk": true, + "description": "Sets hover text elements associated with each (lon,lat) pair If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (lon,lat) coordinates. To be seen, trace `hoverinfo` must contain a *text* flag.", + "dflt": "", + "editType": "calc", + "valType": "string" + }, + "hovertextsrc": { + "description": "Sets the source reference on Chart Studio Cloud for hovertext .", + "editType": "none", + "valType": "string" + }, + "ids": { + "description": "Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.", + "editType": "calc", + "valType": "data_array" + }, + "idssrc": { + "description": "Sets the source reference on Chart Studio Cloud for ids .", + "editType": "none", + "valType": "string" + }, + "lat": { + "description": "Sets the latitude coordinates (in degrees North).", + "editType": "calc", + "valType": "data_array" + }, + "latsrc": { + "description": "Sets the source reference on Chart Studio Cloud for lat .", + "editType": "none", + "valType": "string" + }, + "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.", + "dflt": "", + "editType": "style", + "valType": "string" + }, + "legendgrouptitle": { + "editType": "style", + "font": { + "color": { + "editType": "style", + "valType": "color" + }, + "description": "Sets this legend group's title font.", + "editType": "style", + "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": "style", + "noBlank": true, + "strict": true, + "valType": "string" + }, + "role": "object", + "size": { + "editType": "style", + "min": 1, + "valType": "number" + } + }, + "role": "object", + "text": { + "description": "Sets the title of the legend group.", + "dflt": "", + "editType": "style", + "valType": "string" + } + }, + "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.", + "dflt": 1000, + "editType": "style", + "valType": "number" + }, + "line": { + "color": { + "description": "Sets the line color.", + "editType": "calc", + "valType": "color" + }, + "editType": "calc", + "role": "object", + "width": { + "description": "Sets the line width (in px).", + "dflt": 2, + "editType": "calc", + "min": 0, + "valType": "number" + } + }, + "lon": { + "description": "Sets the longitude coordinates (in degrees East).", + "editType": "calc", + "valType": "data_array" + }, + "lonsrc": { + "description": "Sets the source reference on Chart Studio Cloud for lon .", + "editType": "none", + "valType": "string" + }, + "marker": { + "allowoverlap": { + "description": "Flag to draw all symbols, even if they overlap.", + "dflt": false, + "editType": "calc", + "valType": "boolean" + }, + "angle": { + "arrayOk": true, + "description": "Sets the marker orientation from true North, in degrees clockwise. When using the *auto* default, no rotation would be applied in perspective views which is different from using a zero angle.", + "dflt": "auto", + "editType": "calc", + "valType": "number" + }, + "anglesrc": { + "description": "Sets the source reference on Chart Studio Cloud for angle .", + "editType": "none", + "valType": "string" + }, + "autocolorscale": { + "description": "Determines whether the colorscale is a default palette (`autocolorscale: true`) or the palette determined by `marker.colorscale`. Has an effect only if in `marker.color`is set to a numerical array. In case `colorscale` is unspecified or `autocolorscale` is true, the default palette will be chosen according to whether numbers in the `color` array are all positive, all negative or mixed.", + "dflt": true, + "editType": "calc", + "impliedEdits": {}, + "valType": "boolean" + }, + "cauto": { + "description": "Determines whether or not the color domain is computed with respect to the input data (here in `marker.color`) or the bounds set in `marker.cmin` and `marker.cmax` Has an effect only if in `marker.color`is set to a numerical array. Defaults to `false` when `marker.cmin` and `marker.cmax` are set by the user.", + "dflt": true, + "editType": "calc", + "impliedEdits": {}, + "valType": "boolean" + }, + "cmax": { + "description": "Sets the upper bound of the color domain. Has an effect only if in `marker.color`is set to a numerical array. Value should have the same units as in `marker.color` and if set, `marker.cmin` must be set as well.", + "dflt": null, + "editType": "calc", + "impliedEdits": { + "cauto": false + }, + "valType": "number" + }, + "cmid": { + "description": "Sets the mid-point of the color domain by scaling `marker.cmin` and/or `marker.cmax` to be equidistant to this point. Has an effect only if in `marker.color`is set to a numerical array. Value should have the same units as in `marker.color`. Has no effect when `marker.cauto` is `false`.", + "dflt": null, + "editType": "calc", + "impliedEdits": {}, + "valType": "number" + }, + "cmin": { + "description": "Sets the lower bound of the color domain. Has an effect only if in `marker.color`is set to a numerical array. Value should have the same units as in `marker.color` and if set, `marker.cmax` must be set as well.", + "dflt": null, + "editType": "calc", + "impliedEdits": { + "cauto": false + }, + "valType": "number" + }, + "color": { + "arrayOk": true, + "description": "Sets themarkercolor. It accepts either a specific color or an array of numbers that are mapped to the colorscale relative to the max and min values of the array or relative to `marker.cmin` and `marker.cmax` if set.", + "editType": "calc", + "valType": "color" + }, + "coloraxis": { + "description": "Sets a reference to a shared color axis. References to these shared color axes are *coloraxis*, *coloraxis2*, *coloraxis3*, etc. Settings for these shared color axes are set in the layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. Note that multiple color scales can be linked to the same color axis.", + "dflt": null, + "editType": "calc", + "regex": "/^coloraxis([2-9]|[1-9][0-9]+)?$/", + "valType": "subplotid" + }, + "colorbar": { + "_deprecated": { + "title": { + "description": "Deprecated in favor of color bar's `title.text`. Note that value of color bar's `title` is no longer a simple *string* but a set of sub-attributes.", + "editType": "calc", + "valType": "string" + }, + "titlefont": { + "color": { + "editType": "calc", + "valType": "color" + }, + "description": "Deprecated in favor of color bar's `title.font`.", + "editType": "calc", + "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", + "noBlank": true, + "strict": true, + "valType": "string" + }, + "size": { + "editType": "calc", + "min": 1, + "valType": "number" + } + }, + "titleside": { + "description": "Deprecated in favor of color bar's `title.side`.", + "dflt": "top", + "editType": "calc", + "valType": "enumerated", + "values": [ + "right", + "top", + "bottom" + ] + } + }, + "bgcolor": { + "description": "Sets the color of padded area.", + "dflt": "rgba(0,0,0,0)", + "editType": "calc", + "valType": "color" + }, + "bordercolor": { + "description": "Sets the axis line color.", + "dflt": "#444", + "editType": "calc", + "valType": "color" + }, + "borderwidth": { + "description": "Sets the width (in px) or the border enclosing this color bar.", + "dflt": 0, + "editType": "calc", + "min": 0, + "valType": "number" + }, + "dtick": { + "description": "Sets the step in-between ticks on this axis. Use with `tick0`. Must be a positive number, or special strings available to *log* and *date* axes. If the axis `type` is *log*, then ticks are set every 10^(n*dtick) where n is the tick number. For example, to set a tick mark at 1, 10, 100, 1000, ... set dtick to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to log_10(5), or 0.69897000433. *log* has several special values; *L*, where `f` is a positive number, gives ticks linearly spaced in value (but not position). For example `tick0` = 0.1, `dtick` = *L0.5* will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus small digits between, use *D1* (all digits) or *D2* (only 2 and 5). `tick0` is ignored for *D1* and *D2*. If the axis `type` is *date*, then you must convert the time to milliseconds. For example, to set the interval between ticks to one day, set `dtick` to 86400000.0. *date* also has special values *M* gives ticks spaced by a number of months. `n` must be a positive integer. To set ticks on the 15th of every third month, set `tick0` to *2000-01-15* and `dtick` to *M3*. To set ticks every 4 years, set `dtick` to *M48*", + "editType": "calc", + "impliedEdits": { + "tickmode": "linear" + }, + "valType": "any" + }, + "editType": "calc", + "exponentformat": { + "description": "Determines a formatting rule for the tick exponents. For example, consider the number 1,000,000,000. If *none*, it appears as 1,000,000,000. If *e*, 1e+9. If *E*, 1E+9. If *power*, 1x10^9 (with 9 in a super script). If *SI*, 1G. If *B*, 1B.", + "dflt": "B", + "editType": "calc", + "valType": "enumerated", + "values": [ + "none", + "e", + "E", + "power", + "SI", + "B" + ] + }, + "len": { + "description": "Sets the length of the color bar This measure excludes the padding of both ends. That is, the color bar length is this length minus the padding on both ends.", + "dflt": 1, + "editType": "calc", + "min": 0, + "valType": "number" + }, + "lenmode": { + "description": "Determines whether this color bar's length (i.e. the measure in the color variation direction) is set in units of plot *fraction* or in *pixels. Use `len` to set the value.", + "dflt": "fraction", + "editType": "calc", + "valType": "enumerated", + "values": [ + "fraction", + "pixels" + ] + }, + "minexponent": { + "description": "Hide SI prefix for 10^n if |n| is below this number. This only has an effect when `tickformat` is *SI* or *B*.", + "dflt": 3, + "editType": "calc", + "min": 0, + "valType": "number" + }, + "nticks": { + "description": "Specifies the maximum number of ticks for the particular axis. The actual number of ticks will be chosen automatically to be less than or equal to `nticks`. Has an effect only if `tickmode` is set to *auto*.", + "dflt": 0, + "editType": "calc", + "min": 0, + "valType": "integer" + }, + "outlinecolor": { + "description": "Sets the axis line color.", + "dflt": "#444", + "editType": "calc", + "valType": "color" + }, + "outlinewidth": { + "description": "Sets the width (in px) of the axis line.", + "dflt": 1, + "editType": "calc", + "min": 0, + "valType": "number" + }, + "role": "object", + "separatethousands": { + "description": "If \"true\", even 4-digit integers are separated", + "dflt": false, + "editType": "calc", + "valType": "boolean" + }, + "showexponent": { + "description": "If *all*, all exponents are shown besides their significands. If *first*, only the exponent of the first tick is shown. If *last*, only the exponent of the last tick is shown. If *none*, no exponents appear.", + "dflt": "all", + "editType": "calc", + "valType": "enumerated", + "values": [ + "all", + "first", + "last", + "none" + ] + }, + "showticklabels": { + "description": "Determines whether or not the tick labels are drawn.", + "dflt": true, + "editType": "calc", + "valType": "boolean" + }, + "showtickprefix": { + "description": "If *all*, all tick labels are displayed with a prefix. If *first*, only the first tick is displayed with a prefix. If *last*, only the last tick is displayed with a suffix. If *none*, tick prefixes are hidden.", + "dflt": "all", + "editType": "calc", + "valType": "enumerated", + "values": [ + "all", + "first", + "last", + "none" + ] + }, + "showticksuffix": { + "description": "Same as `showtickprefix` but for tick suffixes.", + "dflt": "all", + "editType": "calc", + "valType": "enumerated", + "values": [ + "all", + "first", + "last", + "none" + ] + }, + "thickness": { + "description": "Sets the thickness of the color bar This measure excludes the size of the padding, ticks and labels.", + "dflt": 30, + "editType": "calc", + "min": 0, + "valType": "number" + }, + "thicknessmode": { + "description": "Determines whether this color bar's thickness (i.e. the measure in the constant color direction) is set in units of plot *fraction* or in *pixels*. Use `thickness` to set the value.", + "dflt": "pixels", + "editType": "calc", + "valType": "enumerated", + "values": [ + "fraction", + "pixels" + ] + }, + "tick0": { + "description": "Sets the placement of the first tick on this axis. Use with `dtick`. If the axis `type` is *log*, then you must take the log of your starting tick (e.g. to set the starting tick to 100, set the `tick0` to 2) except when `dtick`=*L* (see `dtick` for more info). If the axis `type` is *date*, it should be a date string, like date data. If the axis `type` is *category*, it should be a number, using the scale where each category is assigned a serial number from zero in the order it appears.", + "editType": "calc", + "impliedEdits": { + "tickmode": "linear" + }, + "valType": "any" + }, + "tickangle": { + "description": "Sets the angle of the tick labels with respect to the horizontal. For example, a `tickangle` of -90 draws the tick labels vertically.", + "dflt": "auto", + "editType": "calc", + "valType": "angle" + }, + "tickcolor": { + "description": "Sets the tick color.", + "dflt": "#444", + "editType": "calc", + "valType": "color" + }, + "tickfont": { + "color": { + "editType": "calc", + "valType": "color" + }, + "description": "Sets the color bar's tick label font", + "editType": "calc", + "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", + "noBlank": true, + "strict": true, + "valType": "string" + }, + "role": "object", + "size": { + "editType": "calc", + "min": 1, + "valType": "number" + } + }, + "tickformat": { + "description": "Sets the tick label formatting rule using d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format. We add two items to d3's date formatter: *%h* for half of the year as a decimal number as well as *%{n}f* for fractional seconds with n digits. For example, *2016-10-13 09:15:23.456* with tickformat *%H~%M~%S.%2f* would display *09~15~23.46*", + "dflt": "", + "editType": "calc", + "valType": "string" + }, + "tickformatstops": { + "items": { + "tickformatstop": { + "dtickrange": { + "description": "range [*min*, *max*], where *min*, *max* - dtick values which describe some zoom level, it is possible to omit *min* or *max* value by passing *null*", + "editType": "calc", + "items": [ + { + "editType": "calc", + "valType": "any" + }, + { + "editType": "calc", + "valType": "any" + } + ], + "valType": "info_array" + }, + "editType": "calc", + "enabled": { + "description": "Determines whether or not this stop is used. If `false`, this stop is ignored even within its `dtickrange`.", + "dflt": true, + "editType": "calc", + "valType": "boolean" + }, + "name": { + "description": "When used in a template, named items are created in the output figure in addition to any items the figure already has in this array. You can modify these items in the output figure by making your own item with `templateitemname` matching this `name` alongside your modifications (including `visible: false` or `enabled: false` to hide it). Has no effect outside of a template.", + "editType": "calc", + "valType": "string" + }, + "role": "object", + "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", + "valType": "string" + }, + "value": { + "description": "string - dtickformat for described zoom level, the same as *tickformat*", + "dflt": "", + "editType": "calc", + "valType": "string" + } + } + }, + "role": "object" + }, + "ticklabeloverflow": { + "description": "Determines how we handle tick labels that would overflow either the graph div or the domain of the axis. The default value for inside tick labels is *hide past domain*. In other cases the default is *hide past div*.", + "editType": "calc", + "valType": "enumerated", + "values": [ + "allow", + "hide past div", + "hide past domain" + ] + }, + "ticklabelposition": { + "description": "Determines where tick labels are drawn.", + "dflt": "outside", + "editType": "calc", + "valType": "enumerated", + "values": [ + "outside", + "inside", + "outside top", + "inside top", + "outside bottom", + "inside bottom" + ] + }, + "ticklen": { + "description": "Sets the tick length (in px).", + "dflt": 5, + "editType": "calc", + "min": 0, + "valType": "number" + }, + "tickmode": { + "description": "Sets the tick mode for this axis. If *auto*, the number of ticks is set via `nticks`. If *linear*, the placement of the ticks is determined by a starting position `tick0` and a tick step `dtick` (*linear* is the default value if `tick0` and `dtick` are provided). If *array*, the placement of the ticks is set via `tickvals` and the tick text is `ticktext`. (*array* is the default value if `tickvals` is provided).", + "editType": "calc", + "impliedEdits": {}, + "valType": "enumerated", + "values": [ + "auto", + "linear", + "array" + ] + }, + "tickprefix": { + "description": "Sets a tick label prefix.", + "dflt": "", + "editType": "calc", + "valType": "string" + }, + "ticks": { + "description": "Determines whether ticks are drawn or not. If **, this axis' ticks are not drawn. If *outside* (*inside*), this axis' are drawn outside (inside) the axis lines.", + "dflt": "", + "editType": "calc", + "valType": "enumerated", + "values": [ + "outside", + "inside", + "" + ] + }, + "ticksuffix": { + "description": "Sets a tick label suffix.", + "dflt": "", + "editType": "calc", + "valType": "string" + }, + "ticktext": { + "description": "Sets the text displayed at the ticks position via `tickvals`. Only has an effect if `tickmode` is set to *array*. Used with `tickvals`.", + "editType": "calc", + "valType": "data_array" + }, + "ticktextsrc": { + "description": "Sets the source reference on Chart Studio Cloud for ticktext .", + "editType": "none", + "valType": "string" + }, + "tickvals": { + "description": "Sets the values at which ticks on this axis appear. Only has an effect if `tickmode` is set to *array*. Used with `ticktext`.", + "editType": "calc", + "valType": "data_array" + }, + "tickvalssrc": { + "description": "Sets the source reference on Chart Studio Cloud for tickvals .", + "editType": "none", + "valType": "string" + }, + "tickwidth": { + "description": "Sets the tick width (in px).", + "dflt": 1, + "editType": "calc", + "min": 0, + "valType": "number" + }, + "title": { + "editType": "calc", + "font": { + "color": { + "editType": "calc", + "valType": "color" + }, + "description": "Sets this color bar's title font. Note that the title's font used to be set by the now deprecated `titlefont` attribute.", + "editType": "calc", + "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", + "noBlank": true, + "strict": true, + "valType": "string" + }, + "role": "object", + "size": { + "editType": "calc", + "min": 1, + "valType": "number" + } + }, + "role": "object", + "side": { + "description": "Determines the location of color bar's title with respect to the color bar. Note that the title's location used to be set by the now deprecated `titleside` attribute.", + "dflt": "top", + "editType": "calc", + "valType": "enumerated", + "values": [ + "right", + "top", + "bottom" + ] + }, + "text": { + "description": "Sets the title of the color bar. Note that before the existence of `title.text`, the title's contents used to be defined as the `title` attribute itself. This behavior has been deprecated.", + "editType": "calc", + "valType": "string" + } + }, + "x": { + "description": "Sets the x position of the color bar (in plot fraction).", + "dflt": 1.02, + "editType": "calc", + "max": 3, + "min": -2, + "valType": "number" + }, + "xanchor": { + "description": "Sets this color bar's horizontal position anchor. This anchor binds the `x` position to the *left*, *center* or *right* of the color bar.", + "dflt": "left", + "editType": "calc", + "valType": "enumerated", + "values": [ + "left", + "center", + "right" + ] + }, + "xpad": { + "description": "Sets the amount of padding (in px) along the x direction.", + "dflt": 10, + "editType": "calc", + "min": 0, + "valType": "number" + }, + "y": { + "description": "Sets the y position of the color bar (in plot fraction).", + "dflt": 0.5, + "editType": "calc", + "max": 3, + "min": -2, + "valType": "number" + }, + "yanchor": { + "description": "Sets this color bar's vertical position anchor This anchor binds the `y` position to the *top*, *middle* or *bottom* of the color bar.", + "dflt": "middle", + "editType": "calc", + "valType": "enumerated", + "values": [ + "top", + "middle", + "bottom" + ] + }, + "ypad": { + "description": "Sets the amount of padding (in px) along the y direction.", + "dflt": 10, + "editType": "calc", + "min": 0, + "valType": "number" + } + }, + "colorscale": { + "description": "Sets the colorscale. Has an effect only if in `marker.color`is set to a numerical array. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the bounds of the colorscale in color space, use`marker.cmin` and `marker.cmax`. Alternatively, `colorscale` may be a palette name string of the following list: Blackbody,Bluered,Blues,Cividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd.", + "dflt": null, + "editType": "calc", + "impliedEdits": { + "autocolorscale": false + }, + "valType": "colorscale" + }, + "colorsrc": { + "description": "Sets the source reference on Chart Studio Cloud for color .", + "editType": "none", + "valType": "string" + }, + "editType": "calc", + "opacity": { + "arrayOk": true, + "description": "Sets the marker opacity.", + "editType": "calc", + "max": 1, + "min": 0, + "valType": "number" + }, + "opacitysrc": { + "description": "Sets the source reference on Chart Studio Cloud for opacity .", + "editType": "none", + "valType": "string" + }, + "reversescale": { + "description": "Reverses the color mapping if true. Has an effect only if in `marker.color`is set to a numerical array. If true, `marker.cmin` will correspond to the last color in the array and `marker.cmax` will correspond to the first color.", + "dflt": false, + "editType": "calc", + "valType": "boolean" + }, + "role": "object", + "showscale": { + "description": "Determines whether or not a colorbar is displayed for this trace. Has an effect only if in `marker.color`is set to a numerical array.", + "dflt": false, + "editType": "calc", + "valType": "boolean" + }, + "size": { + "arrayOk": true, + "description": "Sets the marker size (in px).", + "dflt": 6, + "editType": "calc", + "min": 0, + "valType": "number" + }, + "sizemin": { + "description": "Has an effect only if `marker.size` is set to a numerical array. Sets the minimum size (in px) of the rendered marker points.", + "dflt": 0, + "editType": "calc", + "min": 0, + "valType": "number" + }, + "sizemode": { + "description": "Has an effect only if `marker.size` is set to a numerical array. Sets the rule for which the data in `size` is converted to pixels.", + "dflt": "diameter", + "editType": "calc", + "valType": "enumerated", + "values": [ + "diameter", + "area" + ] + }, + "sizeref": { + "description": "Has an effect only if `marker.size` is set to a numerical array. Sets the scale factor used to determine the rendered size of marker points. Use with `sizemin` and `sizemode`.", + "dflt": 1, + "editType": "calc", + "valType": "number" + }, + "sizesrc": { + "description": "Sets the source reference on Chart Studio Cloud for size .", + "editType": "none", + "valType": "string" + }, + "symbol": { + "arrayOk": true, + "description": "Sets the marker symbol. Full list: https://www.mapbox.com/maki-icons/ Note that the array `marker.color` and `marker.size` are only available for *circle* symbols.", + "dflt": "circle", + "editType": "calc", + "valType": "string" + }, + "symbolsrc": { + "description": "Sets the source reference on Chart Studio Cloud for symbol .", + "editType": "none", + "valType": "string" + } + }, + "meta": { + "arrayOk": true, + "description": "Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace `name`, graph, axis and colorbar `title.text`, annotation `text` `rangeselector`, `updatemenues` and `sliders` `label` text all support `meta`. To access the trace `meta` values in an attribute in the same trace, simply use `%{meta[i]}` where `i` is the index or key of the `meta` item in question. To access trace `meta` in layout attributes, use `%{data[n[.meta[i]}` where `i` is the index or key of the `meta` and `n` is the trace index.", + "editType": "plot", + "valType": "any" + }, + "metasrc": { + "description": "Sets the source reference on Chart Studio Cloud for meta .", + "editType": "none", + "valType": "string" + }, + "mode": { + "description": "Determines the drawing mode for this scatter trace. If the provided `mode` includes *text* then the `text` elements appear at the coordinates. Otherwise, the `text` elements appear on hover.", + "dflt": "markers", "editType": "calc", "extras": [ "none" @@ -50602,7 +52641,7 @@ "opacity": { "description": "Sets the opacity of the trace.", "dflt": 1, - "editType": "calc", + "editType": "style", "max": 1, "min": 0, "valType": "number" @@ -50631,16 +52670,7 @@ "valType": "number" } }, - "role": "object", - "textfont": { - "color": { - "description": "Sets the text font color of selected points.", - "editType": "calc", - "valType": "color" - }, - "editType": "calc", - "role": "object" - } + "role": "object" }, "selectedpoints": { "description": "Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the `unselected` are turned on for all points, whereas, any other non-array values means no selection all where the `selected` and `unselected` styles have no effect.", @@ -50672,54 +52702,43 @@ "valType": "string" } }, + "subplot": { + "description": "Sets a reference between this trace's data coordinates and a mapbox subplot. If *mapbox* (the default value), the data refer to `layout.mapbox`. If *mapbox2*, the data refer to `layout.mapbox2`, and so on.", + "dflt": "mapbox", + "editType": "calc", + "valType": "subplotid" + }, "text": { "arrayOk": true, - "description": "Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a *text* flag and *hovertext* is not set, these elements will be seen in the hover labels.", + "description": "Sets text elements associated with each (lon,lat) pair If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (lon,lat) coordinates. If trace `hoverinfo` contains a *text* flag and *hovertext* is not set, these elements will be seen in the hover labels.", "dflt": "", "editType": "calc", "valType": "string" }, "textfont": { "color": { - "arrayOk": true, "editType": "calc", "valType": "color" }, - "colorsrc": { - "description": "Sets the source reference on Chart Studio Cloud for color .", - "editType": "none", - "valType": "string" - }, - "description": "Sets the text font.", + "description": "Sets the icon text font (color=mapbox.layer.paint.text-color, size=mapbox.layer.layout.text-size). Has an effect only when `type` is set to *symbol*.", "editType": "calc", "family": { - "arrayOk": true, "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*.", + "dflt": "Open Sans Regular, Arial Unicode MS Regular", "editType": "calc", "noBlank": true, "strict": true, "valType": "string" }, - "familysrc": { - "description": "Sets the source reference on Chart Studio Cloud for family .", - "editType": "none", - "valType": "string" - }, "role": "object", "size": { - "arrayOk": true, "editType": "calc", "min": 1, "valType": "number" - }, - "sizesrc": { - "description": "Sets the source reference on Chart Studio Cloud for size .", - "editType": "none", - "valType": "string" } }, "textposition": { - "arrayOk": true, + "arrayOk": false, "description": "Sets the positions of the `text` elements with respects to the (x,y) coordinates.", "dflt": "middle center", "editType": "calc", @@ -50736,11 +52755,6 @@ "bottom right" ] }, - "textpositionsrc": { - "description": "Sets the source reference on Chart Studio Cloud for textposition .", - "editType": "none", - "valType": "string" - }, "textsrc": { "description": "Sets the source reference on Chart Studio Cloud for text .", "editType": "none", @@ -50748,7 +52762,7 @@ }, "texttemplate": { "arrayOk": true, - "description": "Template string used for rendering the information text that appear on points. Note that this will override `textinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format for details on the date formatting syntax. Every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. ", + "description": "Template string used for rendering the information text that appear on points. Note that this will override `textinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format for details on the date formatting syntax. Every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. variables `lat`, `lon` and `text`.", "dflt": "", "editType": "calc", "valType": "string" @@ -50768,7 +52782,7 @@ }, "role": "object" }, - "type": "scattergl", + "type": "scattermapbox", "uid": { "description": "Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.", "editType": "plot", @@ -50803,16 +52817,7 @@ "valType": "number" } }, - "role": "object", - "textfont": { - "color": { - "description": "Sets the text font color of unselected points, applied only when a selection exists.", - "editType": "calc", - "valType": "color" - }, - "editType": "calc", - "role": "object" - } + "role": "object" }, "visible": { "description": "Determines whether or not this trace is visible. If *legendonly*, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).", @@ -50824,178 +52829,29 @@ false, "legendonly" ] - }, - "x": { - "description": "Sets the x coordinates.", - "editType": "calc+clearAxisTypes", - "valType": "data_array" - }, - "x0": { - "description": "Alternate to `x`. Builds a linear space of x coordinates. Use with `dx` where `x0` is the starting coordinate and `dx` the step.", - "dflt": 0, - "editType": "calc+clearAxisTypes", - "valType": "any" - }, - "xaxis": { - "description": "Sets a reference between this trace's x coordinates and a 2D cartesian x axis. If *x* (the default value), the x coordinates refer to `layout.xaxis`. If *x2*, the x coordinates refer to `layout.xaxis2`, and so on.", - "dflt": "x", - "editType": "calc+clearAxisTypes", - "valType": "subplotid" - }, - "xcalendar": { - "description": "Sets the calendar system to use with `x` date data.", - "dflt": "gregorian", - "editType": "calc", - "valType": "enumerated", - "values": [ - "chinese", - "coptic", - "discworld", - "ethiopian", - "gregorian", - "hebrew", - "islamic", - "jalali", - "julian", - "mayan", - "nanakshahi", - "nepali", - "persian", - "taiwan", - "thai", - "ummalqura" - ] - }, - "xhoverformat": { - "description": "Sets the hover text formatting rulefor `x` using d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format. We add two items to d3's date formatter: *%h* for half of the year as a decimal number as well as *%{n}f* for fractional seconds with n digits. For example, *2016-10-13 09:15:23.456* with tickformat *%H~%M~%S.%2f* would display *09~15~23.46*By default the values are formatted using `xaxis.hoverformat`.", - "dflt": "", - "editType": "calc", - "valType": "string" - }, - "xperiod": { - "description": "Only relevant when the axis `type` is *date*. Sets the period positioning in milliseconds or *M* on the x axis. Special values in the form of *M* could be used to declare the number of months. In this case `n` must be a positive integer.", - "dflt": 0, - "editType": "calc", - "valType": "any" - }, - "xperiod0": { - "description": "Only relevant when the axis `type` is *date*. Sets the base for period positioning in milliseconds or date string on the x0 axis. When `x0period` is round number of weeks, the `x0period0` by default would be on a Sunday i.e. 2000-01-02, otherwise it would be at 2000-01-01.", - "editType": "calc", - "valType": "any" - }, - "xperiodalignment": { - "description": "Only relevant when the axis `type` is *date*. Sets the alignment of data points on the x axis.", - "dflt": "middle", - "editType": "calc", - "valType": "enumerated", - "values": [ - "start", - "middle", - "end" - ] - }, - "xsrc": { - "description": "Sets the source reference on Chart Studio Cloud for x .", - "editType": "none", - "valType": "string" - }, - "y": { - "description": "Sets the y coordinates.", - "editType": "calc+clearAxisTypes", - "valType": "data_array" - }, - "y0": { - "description": "Alternate to `y`. Builds a linear space of y coordinates. Use with `dy` where `y0` is the starting coordinate and `dy` the step.", - "dflt": 0, - "editType": "calc+clearAxisTypes", - "valType": "any" - }, - "yaxis": { - "description": "Sets a reference between this trace's y coordinates and a 2D cartesian y axis. If *y* (the default value), the y coordinates refer to `layout.yaxis`. If *y2*, the y coordinates refer to `layout.yaxis2`, and so on.", - "dflt": "y", - "editType": "calc+clearAxisTypes", - "valType": "subplotid" - }, - "ycalendar": { - "description": "Sets the calendar system to use with `y` date data.", - "dflt": "gregorian", - "editType": "calc", - "valType": "enumerated", - "values": [ - "chinese", - "coptic", - "discworld", - "ethiopian", - "gregorian", - "hebrew", - "islamic", - "jalali", - "julian", - "mayan", - "nanakshahi", - "nepali", - "persian", - "taiwan", - "thai", - "ummalqura" - ] - }, - "yhoverformat": { - "description": "Sets the hover text formatting rulefor `y` using d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format. We add two items to d3's date formatter: *%h* for half of the year as a decimal number as well as *%{n}f* for fractional seconds with n digits. For example, *2016-10-13 09:15:23.456* with tickformat *%H~%M~%S.%2f* would display *09~15~23.46*By default the values are formatted using `yaxis.hoverformat`.", - "dflt": "", - "editType": "calc", - "valType": "string" - }, - "yperiod": { - "description": "Only relevant when the axis `type` is *date*. Sets the period positioning in milliseconds or *M* on the y axis. Special values in the form of *M* could be used to declare the number of months. In this case `n` must be a positive integer.", - "dflt": 0, - "editType": "calc", - "valType": "any" - }, - "yperiod0": { - "description": "Only relevant when the axis `type` is *date*. Sets the base for period positioning in milliseconds or date string on the y0 axis. When `y0period` is round number of weeks, the `y0period0` by default would be on a Sunday i.e. 2000-01-02, otherwise it would be at 2000-01-01.", - "editType": "calc", - "valType": "any" - }, - "yperiodalignment": { - "description": "Only relevant when the axis `type` is *date*. Sets the alignment of data points on the y axis.", - "dflt": "middle", - "editType": "calc", - "valType": "enumerated", - "values": [ - "start", - "middle", - "end" - ] - }, - "ysrc": { - "description": "Sets the source reference on Chart Studio Cloud for y .", - "editType": "none", - "valType": "string" } }, "categories": [ + "mapbox", "gl", - "regl", - "cartesian", "symbols", - "errorBarsOK", "showLegend", "scatter-like" ], "meta": { - "description": "The data visualized as scatter point or lines is set in `x` and `y` using the WebGL plotting engine. Bubble charts are achieved by setting `marker.size` and/or `marker.color` to a numerical arrays.", - "hrName": "scatter_gl" + "description": "The data visualized as scatter point, lines or marker symbols on a Mapbox GL geographic map is provided by longitude/latitude pairs in `lon` and `lat`.", + "hrName": "scatter_mapbox" }, - "type": "scattergl" + "type": "scattermapbox" }, - "scattermapbox": { + "scatterpolar": { "animatable": false, "attributes": { - "below": { - "description": "Determines if this scattermapbox trace's layers are to be inserted before the layer with the specified ID. By default, scattermapbox layers are inserted above all the base layers. To place the scattermapbox layers above every other layer, set `below` to *''*.", - "editType": "calc", - "valType": "string" + "cliponaxis": { + "description": "Determines whether or not markers and text nodes are clipped about the subplot axes. To show markers and text nodes above axis lines and tick labels, make sure to set `xaxis.layer` and `yaxis.layer` to *below traces*.", + "dflt": false, + "editType": "plot", + "valType": "boolean" }, "connectgaps": { "description": "Determines whether or not gaps (i.e. {nan} or missing values) in the provided data arrays are connected.", @@ -51013,34 +52869,46 @@ "editType": "none", "valType": "string" }, + "dr": { + "description": "Sets the r coordinate step.", + "dflt": 1, + "editType": "calc", + "valType": "number" + }, + "dtheta": { + "description": "Sets the theta coordinate step. By default, the `dtheta` step equals the subplot's period divided by the length of the `r` coordinates.", + "editType": "calc", + "valType": "number" + }, "fill": { - "description": "Sets the area to fill with a solid color. Use with `fillcolor` if not *none*. *toself* connects the endpoints of the trace (or each segment of the trace if it has gaps) into a closed shape.", + "description": "Sets the area to fill with a solid color. Use with `fillcolor` if not *none*. scatterpolar has a subset of the options available to scatter. *toself* connects the endpoints of the trace (or each segment of the trace if it has gaps) into a closed shape. *tonext* fills the space between two traces if one completely encloses the other (eg consecutive contour lines), and behaves like *toself* if there is no trace before it. *tonext* should not be used if one trace does not enclose the other.", "dflt": "none", "editType": "calc", "valType": "enumerated", "values": [ "none", - "toself" + "toself", + "tonext" ] }, "fillcolor": { "description": "Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available.", - "editType": "calc", + "editType": "style", "valType": "color" }, "hoverinfo": { "arrayOk": true, "description": "Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed upon hovering. But, if `none` is set, click and hover events are still fired.", "dflt": "all", - "editType": "calc", + "editType": "none", "extras": [ "all", "none", "skip" ], "flags": [ - "lon", - "lat", + "r", + "theta", "text", "name" ], @@ -51146,11 +53014,20 @@ }, "role": "object" }, + "hoveron": { + "description": "Do the hover effects highlight individual points (markers or line points) or do they highlight filled regions? If the fill is *toself* or *tonext* and there are no markers or text, then the default is *fills*, otherwise it is *points*.", + "editType": "style", + "flags": [ + "points", + "fills" + ], + "valType": "flaglist" + }, "hovertemplate": { "arrayOk": true, "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\" as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, *xother* will be added to those with different x positions from the first point. An underscore before or after *(x|y)other* will add a space on that side, only when this field is shown. Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", "dflt": "", - "editType": "calc", + "editType": "none", "valType": "string" }, "hovertemplatesrc": { @@ -51160,9 +53037,9 @@ }, "hovertext": { "arrayOk": true, - "description": "Sets hover text elements associated with each (lon,lat) pair If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (lon,lat) coordinates. To be seen, trace `hoverinfo` must contain a *text* flag.", + "description": "Sets hover text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. To be seen, trace `hoverinfo` must contain a *text* flag.", "dflt": "", - "editType": "calc", + "editType": "style", "valType": "string" }, "hovertextsrc": { @@ -51180,16 +53057,6 @@ "editType": "none", "valType": "string" }, - "lat": { - "description": "Sets the latitude coordinates (in degrees North).", - "editType": "calc", - "valType": "data_array" - }, - "latsrc": { - "description": "Sets the source reference on Chart Studio Cloud for lat .", - "editType": "none", - "valType": "string" - }, "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.", "dflt": "", @@ -51236,48 +53103,52 @@ "line": { "color": { "description": "Sets the line color.", - "editType": "calc", + "editType": "style", "valType": "color" }, + "dash": { + "description": "Sets the dash style of lines. Set to a dash type string (*solid*, *dot*, *dash*, *longdash*, *dashdot*, or *longdashdot*) or a dash length list in px (eg *5px,10px,2px,2px*).", + "dflt": "solid", + "editType": "style", + "valType": "string", + "values": [ + "solid", + "dot", + "dash", + "longdash", + "dashdot", + "longdashdot" + ] + }, "editType": "calc", "role": "object", + "shape": { + "description": "Determines the line shape. With *spline* the lines are drawn using spline interpolation. The other available values correspond to step-wise line shapes.", + "dflt": "linear", + "editType": "plot", + "valType": "enumerated", + "values": [ + "linear", + "spline" + ] + }, + "smoothing": { + "description": "Has an effect only if `shape` is set to *spline* Sets the amount of smoothing. *0* corresponds to no smoothing (equivalent to a *linear* shape).", + "dflt": 1, + "editType": "plot", + "max": 1.3, + "min": 0, + "valType": "number" + }, "width": { "description": "Sets the line width (in px).", "dflt": 2, - "editType": "calc", + "editType": "style", "min": 0, "valType": "number" } }, - "lon": { - "description": "Sets the longitude coordinates (in degrees East).", - "editType": "calc", - "valType": "data_array" - }, - "lonsrc": { - "description": "Sets the source reference on Chart Studio Cloud for lon .", - "editType": "none", - "valType": "string" - }, "marker": { - "allowoverlap": { - "description": "Flag to draw all symbols, even if they overlap.", - "dflt": false, - "editType": "calc", - "valType": "boolean" - }, - "angle": { - "arrayOk": true, - "description": "Sets the marker orientation from true North, in degrees clockwise. When using the *auto* default, no rotation would be applied in perspective views which is different from using a zero angle.", - "dflt": "auto", - "editType": "calc", - "valType": "number" - }, - "anglesrc": { - "description": "Sets the source reference on Chart Studio Cloud for angle .", - "editType": "none", - "valType": "string" - }, "autocolorscale": { "description": "Determines whether the colorscale is a default palette (`autocolorscale: true`) or the palette determined by `marker.colorscale`. Has an effect only if in `marker.color`is set to a numerical array. In case `colorscale` is unspecified or `autocolorscale` is true, the default palette will be chosen according to whether numbers in the `color` array are all positive, all negative or mixed.", "dflt": true, @@ -51295,7 +53166,7 @@ "cmax": { "description": "Sets the upper bound of the color domain. Has an effect only if in `marker.color`is set to a numerical array. Value should have the same units as in `marker.color` and if set, `marker.cmin` must be set as well.", "dflt": null, - "editType": "calc", + "editType": "plot", "impliedEdits": { "cauto": false }, @@ -51311,7 +53182,7 @@ "cmin": { "description": "Sets the lower bound of the color domain. Has an effect only if in `marker.color`is set to a numerical array. Value should have the same units as in `marker.color` and if set, `marker.cmax` must be set as well.", "dflt": null, - "editType": "calc", + "editType": "plot", "impliedEdits": { "cauto": false }, @@ -51320,7 +53191,7 @@ "color": { "arrayOk": true, "description": "Sets themarkercolor. It accepts either a specific color or an array of numbers that are mapped to the colorscale relative to the max and min values of the array or relative to `marker.cmin` and `marker.cmax` if set.", - "editType": "calc", + "editType": "style", "valType": "color" }, "coloraxis": { @@ -51334,25 +53205,25 @@ "_deprecated": { "title": { "description": "Deprecated in favor of color bar's `title.text`. Note that value of color bar's `title` is no longer a simple *string* but a set of sub-attributes.", - "editType": "calc", + "editType": "colorbars", "valType": "string" }, "titlefont": { "color": { - "editType": "calc", + "editType": "colorbars", "valType": "color" }, "description": "Deprecated in favor of color bar's `title.font`.", - "editType": "calc", + "editType": "colorbars", "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", + "editType": "colorbars", "noBlank": true, "strict": true, "valType": "string" }, "size": { - "editType": "calc", + "editType": "colorbars", "min": 1, "valType": "number" } @@ -51360,7 +53231,7 @@ "titleside": { "description": "Deprecated in favor of color bar's `title.side`.", "dflt": "top", - "editType": "calc", + "editType": "colorbars", "valType": "enumerated", "values": [ "right", @@ -51372,35 +53243,35 @@ "bgcolor": { "description": "Sets the color of padded area.", "dflt": "rgba(0,0,0,0)", - "editType": "calc", + "editType": "colorbars", "valType": "color" }, "bordercolor": { "description": "Sets the axis line color.", "dflt": "#444", - "editType": "calc", + "editType": "colorbars", "valType": "color" }, "borderwidth": { "description": "Sets the width (in px) or the border enclosing this color bar.", "dflt": 0, - "editType": "calc", + "editType": "colorbars", "min": 0, "valType": "number" }, "dtick": { "description": "Sets the step in-between ticks on this axis. Use with `tick0`. Must be a positive number, or special strings available to *log* and *date* axes. If the axis `type` is *log*, then ticks are set every 10^(n*dtick) where n is the tick number. For example, to set a tick mark at 1, 10, 100, 1000, ... set dtick to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to log_10(5), or 0.69897000433. *log* has several special values; *L*, where `f` is a positive number, gives ticks linearly spaced in value (but not position). For example `tick0` = 0.1, `dtick` = *L0.5* will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus small digits between, use *D1* (all digits) or *D2* (only 2 and 5). `tick0` is ignored for *D1* and *D2*. If the axis `type` is *date*, then you must convert the time to milliseconds. For example, to set the interval between ticks to one day, set `dtick` to 86400000.0. *date* also has special values *M* gives ticks spaced by a number of months. `n` must be a positive integer. To set ticks on the 15th of every third month, set `tick0` to *2000-01-15* and `dtick` to *M3*. To set ticks every 4 years, set `dtick` to *M48*", - "editType": "calc", + "editType": "colorbars", "impliedEdits": { "tickmode": "linear" }, "valType": "any" }, - "editType": "calc", + "editType": "colorbars", "exponentformat": { "description": "Determines a formatting rule for the tick exponents. For example, consider the number 1,000,000,000. If *none*, it appears as 1,000,000,000. If *e*, 1e+9. If *E*, 1E+9. If *power*, 1x10^9 (with 9 in a super script). If *SI*, 1G. If *B*, 1B.", "dflt": "B", - "editType": "calc", + "editType": "colorbars", "valType": "enumerated", "values": [ "none", @@ -51414,14 +53285,14 @@ "len": { "description": "Sets the length of the color bar This measure excludes the padding of both ends. That is, the color bar length is this length minus the padding on both ends.", "dflt": 1, - "editType": "calc", + "editType": "colorbars", "min": 0, "valType": "number" }, "lenmode": { "description": "Determines whether this color bar's length (i.e. the measure in the color variation direction) is set in units of plot *fraction* or in *pixels. Use `len` to set the value.", "dflt": "fraction", - "editType": "calc", + "editType": "colorbars", "valType": "enumerated", "values": [ "fraction", @@ -51431,27 +53302,27 @@ "minexponent": { "description": "Hide SI prefix for 10^n if |n| is below this number. This only has an effect when `tickformat` is *SI* or *B*.", "dflt": 3, - "editType": "calc", + "editType": "colorbars", "min": 0, "valType": "number" }, "nticks": { "description": "Specifies the maximum number of ticks for the particular axis. The actual number of ticks will be chosen automatically to be less than or equal to `nticks`. Has an effect only if `tickmode` is set to *auto*.", "dflt": 0, - "editType": "calc", + "editType": "colorbars", "min": 0, "valType": "integer" }, "outlinecolor": { "description": "Sets the axis line color.", "dflt": "#444", - "editType": "calc", + "editType": "colorbars", "valType": "color" }, "outlinewidth": { "description": "Sets the width (in px) of the axis line.", "dflt": 1, - "editType": "calc", + "editType": "colorbars", "min": 0, "valType": "number" }, @@ -51459,13 +53330,13 @@ "separatethousands": { "description": "If \"true\", even 4-digit integers are separated", "dflt": false, - "editType": "calc", + "editType": "colorbars", "valType": "boolean" }, "showexponent": { "description": "If *all*, all exponents are shown besides their significands. If *first*, only the exponent of the first tick is shown. If *last*, only the exponent of the last tick is shown. If *none*, no exponents appear.", "dflt": "all", - "editType": "calc", + "editType": "colorbars", "valType": "enumerated", "values": [ "all", @@ -51477,13 +53348,13 @@ "showticklabels": { "description": "Determines whether or not the tick labels are drawn.", "dflt": true, - "editType": "calc", + "editType": "colorbars", "valType": "boolean" }, "showtickprefix": { "description": "If *all*, all tick labels are displayed with a prefix. If *first*, only the first tick is displayed with a prefix. If *last*, only the last tick is displayed with a suffix. If *none*, tick prefixes are hidden.", "dflt": "all", - "editType": "calc", + "editType": "colorbars", "valType": "enumerated", "values": [ "all", @@ -51495,7 +53366,7 @@ "showticksuffix": { "description": "Same as `showtickprefix` but for tick suffixes.", "dflt": "all", - "editType": "calc", + "editType": "colorbars", "valType": "enumerated", "values": [ "all", @@ -51507,14 +53378,14 @@ "thickness": { "description": "Sets the thickness of the color bar This measure excludes the size of the padding, ticks and labels.", "dflt": 30, - "editType": "calc", + "editType": "colorbars", "min": 0, "valType": "number" }, "thicknessmode": { "description": "Determines whether this color bar's thickness (i.e. the measure in the constant color direction) is set in units of plot *fraction* or in *pixels*. Use `thickness` to set the value.", "dflt": "pixels", - "editType": "calc", + "editType": "colorbars", "valType": "enumerated", "values": [ "fraction", @@ -51523,7 +53394,7 @@ }, "tick0": { "description": "Sets the placement of the first tick on this axis. Use with `dtick`. If the axis `type` is *log*, then you must take the log of your starting tick (e.g. to set the starting tick to 100, set the `tick0` to 2) except when `dtick`=*L* (see `dtick` for more info). If the axis `type` is *date*, it should be a date string, like date data. If the axis `type` is *category*, it should be a number, using the scale where each category is assigned a serial number from zero in the order it appears.", - "editType": "calc", + "editType": "colorbars", "impliedEdits": { "tickmode": "linear" }, @@ -51532,32 +53403,32 @@ "tickangle": { "description": "Sets the angle of the tick labels with respect to the horizontal. For example, a `tickangle` of -90 draws the tick labels vertically.", "dflt": "auto", - "editType": "calc", + "editType": "colorbars", "valType": "angle" }, "tickcolor": { "description": "Sets the tick color.", "dflt": "#444", - "editType": "calc", + "editType": "colorbars", "valType": "color" }, "tickfont": { "color": { - "editType": "calc", + "editType": "colorbars", "valType": "color" }, "description": "Sets the color bar's tick label font", - "editType": "calc", + "editType": "colorbars", "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", + "editType": "colorbars", "noBlank": true, "strict": true, "valType": "string" }, "role": "object", "size": { - "editType": "calc", + "editType": "colorbars", "min": 1, "valType": "number" } @@ -51565,7 +53436,7 @@ "tickformat": { "description": "Sets the tick label formatting rule using d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format. We add two items to d3's date formatter: *%h* for half of the year as a decimal number as well as *%{n}f* for fractional seconds with n digits. For example, *2016-10-13 09:15:23.456* with tickformat *%H~%M~%S.%2f* would display *09~15~23.46*", "dflt": "", - "editType": "calc", + "editType": "colorbars", "valType": "string" }, "tickformatstops": { @@ -51573,41 +53444,41 @@ "tickformatstop": { "dtickrange": { "description": "range [*min*, *max*], where *min*, *max* - dtick values which describe some zoom level, it is possible to omit *min* or *max* value by passing *null*", - "editType": "calc", + "editType": "colorbars", "items": [ { - "editType": "calc", + "editType": "colorbars", "valType": "any" }, { - "editType": "calc", + "editType": "colorbars", "valType": "any" } ], "valType": "info_array" }, - "editType": "calc", + "editType": "colorbars", "enabled": { "description": "Determines whether or not this stop is used. If `false`, this stop is ignored even within its `dtickrange`.", "dflt": true, - "editType": "calc", + "editType": "colorbars", "valType": "boolean" }, "name": { "description": "When used in a template, named items are created in the output figure in addition to any items the figure already has in this array. You can modify these items in the output figure by making your own item with `templateitemname` matching this `name` alongside your modifications (including `visible: false` or `enabled: false` to hide it). Has no effect outside of a template.", - "editType": "calc", + "editType": "colorbars", "valType": "string" }, "role": "object", "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", + "editType": "colorbars", "valType": "string" }, "value": { "description": "string - dtickformat for described zoom level, the same as *tickformat*", "dflt": "", - "editType": "calc", + "editType": "colorbars", "valType": "string" } } @@ -51616,7 +53487,7 @@ }, "ticklabeloverflow": { "description": "Determines how we handle tick labels that would overflow either the graph div or the domain of the axis. The default value for inside tick labels is *hide past domain*. In other cases the default is *hide past div*.", - "editType": "calc", + "editType": "colorbars", "valType": "enumerated", "values": [ "allow", @@ -51627,7 +53498,7 @@ "ticklabelposition": { "description": "Determines where tick labels are drawn.", "dflt": "outside", - "editType": "calc", + "editType": "colorbars", "valType": "enumerated", "values": [ "outside", @@ -51641,13 +53512,13 @@ "ticklen": { "description": "Sets the tick length (in px).", "dflt": 5, - "editType": "calc", + "editType": "colorbars", "min": 0, "valType": "number" }, "tickmode": { "description": "Sets the tick mode for this axis. If *auto*, the number of ticks is set via `nticks`. If *linear*, the placement of the ticks is determined by a starting position `tick0` and a tick step `dtick` (*linear* is the default value if `tick0` and `dtick` are provided). If *array*, the placement of the ticks is set via `tickvals` and the tick text is `ticktext`. (*array* is the default value if `tickvals` is provided).", - "editType": "calc", + "editType": "colorbars", "impliedEdits": {}, "valType": "enumerated", "values": [ @@ -51659,13 +53530,13 @@ "tickprefix": { "description": "Sets a tick label prefix.", "dflt": "", - "editType": "calc", + "editType": "colorbars", "valType": "string" }, "ticks": { "description": "Determines whether ticks are drawn or not. If **, this axis' ticks are not drawn. If *outside* (*inside*), this axis' are drawn outside (inside) the axis lines.", "dflt": "", - "editType": "calc", + "editType": "colorbars", "valType": "enumerated", "values": [ "outside", @@ -51676,12 +53547,12 @@ "ticksuffix": { "description": "Sets a tick label suffix.", "dflt": "", - "editType": "calc", + "editType": "colorbars", "valType": "string" }, "ticktext": { "description": "Sets the text displayed at the ticks position via `tickvals`. Only has an effect if `tickmode` is set to *array*. Used with `tickvals`.", - "editType": "calc", + "editType": "colorbars", "valType": "data_array" }, "ticktextsrc": { @@ -51691,7 +53562,7 @@ }, "tickvals": { "description": "Sets the values at which ticks on this axis appear. Only has an effect if `tickmode` is set to *array*. Used with `ticktext`.", - "editType": "calc", + "editType": "colorbars", "valType": "data_array" }, "tickvalssrc": { @@ -51702,29 +53573,29 @@ "tickwidth": { "description": "Sets the tick width (in px).", "dflt": 1, - "editType": "calc", + "editType": "colorbars", "min": 0, "valType": "number" }, "title": { - "editType": "calc", + "editType": "colorbars", "font": { "color": { - "editType": "calc", + "editType": "colorbars", "valType": "color" }, "description": "Sets this color bar's title font. Note that the title's font used to be set by the now deprecated `titlefont` attribute.", - "editType": "calc", + "editType": "colorbars", "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", + "editType": "colorbars", "noBlank": true, "strict": true, "valType": "string" }, "role": "object", "size": { - "editType": "calc", + "editType": "colorbars", "min": 1, "valType": "number" } @@ -51733,7 +53604,7 @@ "side": { "description": "Determines the location of color bar's title with respect to the color bar. Note that the title's location used to be set by the now deprecated `titleside` attribute.", "dflt": "top", - "editType": "calc", + "editType": "colorbars", "valType": "enumerated", "values": [ "right", @@ -51743,14 +53614,14 @@ }, "text": { "description": "Sets the title of the color bar. Note that before the existence of `title.text`, the title's contents used to be defined as the `title` attribute itself. This behavior has been deprecated.", - "editType": "calc", + "editType": "colorbars", "valType": "string" } }, "x": { "description": "Sets the x position of the color bar (in plot fraction).", "dflt": 1.02, - "editType": "calc", + "editType": "colorbars", "max": 3, "min": -2, "valType": "number" @@ -51758,7 +53629,7 @@ "xanchor": { "description": "Sets this color bar's horizontal position anchor. This anchor binds the `x` position to the *left*, *center* or *right* of the color bar.", "dflt": "left", - "editType": "calc", + "editType": "colorbars", "valType": "enumerated", "values": [ "left", @@ -51769,14 +53640,14 @@ "xpad": { "description": "Sets the amount of padding (in px) along the x direction.", "dflt": 10, - "editType": "calc", + "editType": "colorbars", "min": 0, "valType": "number" }, "y": { "description": "Sets the y position of the color bar (in plot fraction).", "dflt": 0.5, - "editType": "calc", + "editType": "colorbars", "max": 3, "min": -2, "valType": "number" @@ -51784,7 +53655,7 @@ "yanchor": { "description": "Sets this color bar's vertical position anchor This anchor binds the `y` position to the *top*, *middle* or *bottom* of the color bar.", "dflt": "middle", - "editType": "calc", + "editType": "colorbars", "valType": "enumerated", "values": [ "top", @@ -51795,7 +53666,7 @@ "ypad": { "description": "Sets the amount of padding (in px) along the y direction.", "dflt": 10, - "editType": "calc", + "editType": "colorbars", "min": 0, "valType": "number" } @@ -51815,10 +53686,138 @@ "valType": "string" }, "editType": "calc", + "gradient": { + "color": { + "arrayOk": true, + "description": "Sets the final color of the gradient fill: the center color for radial, the right for horizontal, or the bottom for vertical.", + "editType": "calc", + "valType": "color" + }, + "colorsrc": { + "description": "Sets the source reference on Chart Studio Cloud for color .", + "editType": "none", + "valType": "string" + }, + "editType": "calc", + "role": "object", + "type": { + "arrayOk": true, + "description": "Sets the type of gradient used to fill the markers", + "dflt": "none", + "editType": "calc", + "valType": "enumerated", + "values": [ + "radial", + "horizontal", + "vertical", + "none" + ] + }, + "typesrc": { + "description": "Sets the source reference on Chart Studio Cloud for type .", + "editType": "none", + "valType": "string" + } + }, + "line": { + "autocolorscale": { + "description": "Determines whether the colorscale is a default palette (`autocolorscale: true`) or the palette determined by `marker.line.colorscale`. Has an effect only if in `marker.line.color`is set to a numerical array. In case `colorscale` is unspecified or `autocolorscale` is true, the default palette will be chosen according to whether numbers in the `color` array are all positive, all negative or mixed.", + "dflt": true, + "editType": "calc", + "impliedEdits": {}, + "valType": "boolean" + }, + "cauto": { + "description": "Determines whether or not the color domain is computed with respect to the input data (here in `marker.line.color`) or the bounds set in `marker.line.cmin` and `marker.line.cmax` Has an effect only if in `marker.line.color`is set to a numerical array. Defaults to `false` when `marker.line.cmin` and `marker.line.cmax` are set by the user.", + "dflt": true, + "editType": "calc", + "impliedEdits": {}, + "valType": "boolean" + }, + "cmax": { + "description": "Sets the upper bound of the color domain. Has an effect only if in `marker.line.color`is set to a numerical array. Value should have the same units as in `marker.line.color` and if set, `marker.line.cmin` must be set as well.", + "dflt": null, + "editType": "plot", + "impliedEdits": { + "cauto": false + }, + "valType": "number" + }, + "cmid": { + "description": "Sets the mid-point of the color domain by scaling `marker.line.cmin` and/or `marker.line.cmax` to be equidistant to this point. Has an effect only if in `marker.line.color`is set to a numerical array. Value should have the same units as in `marker.line.color`. Has no effect when `marker.line.cauto` is `false`.", + "dflt": null, + "editType": "calc", + "impliedEdits": {}, + "valType": "number" + }, + "cmin": { + "description": "Sets the lower bound of the color domain. Has an effect only if in `marker.line.color`is set to a numerical array. Value should have the same units as in `marker.line.color` and if set, `marker.line.cmax` must be set as well.", + "dflt": null, + "editType": "plot", + "impliedEdits": { + "cauto": false + }, + "valType": "number" + }, + "color": { + "arrayOk": true, + "description": "Sets themarker.linecolor. It accepts either a specific color or an array of numbers that are mapped to the colorscale relative to the max and min values of the array or relative to `marker.line.cmin` and `marker.line.cmax` if set.", + "editType": "style", + "valType": "color" + }, + "coloraxis": { + "description": "Sets a reference to a shared color axis. References to these shared color axes are *coloraxis*, *coloraxis2*, *coloraxis3*, etc. Settings for these shared color axes are set in the layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. Note that multiple color scales can be linked to the same color axis.", + "dflt": null, + "editType": "calc", + "regex": "/^coloraxis([2-9]|[1-9][0-9]+)?$/", + "valType": "subplotid" + }, + "colorscale": { + "description": "Sets the colorscale. Has an effect only if in `marker.line.color`is set to a numerical array. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the bounds of the colorscale in color space, use`marker.line.cmin` and `marker.line.cmax`. Alternatively, `colorscale` may be a palette name string of the following list: Blackbody,Bluered,Blues,Cividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd.", + "dflt": null, + "editType": "calc", + "impliedEdits": { + "autocolorscale": false + }, + "valType": "colorscale" + }, + "colorsrc": { + "description": "Sets the source reference on Chart Studio Cloud for color .", + "editType": "none", + "valType": "string" + }, + "editType": "calc", + "reversescale": { + "description": "Reverses the color mapping if true. Has an effect only if in `marker.line.color`is set to a numerical array. If true, `marker.line.cmin` will correspond to the last color in the array and `marker.line.cmax` will correspond to the first color.", + "dflt": false, + "editType": "plot", + "valType": "boolean" + }, + "role": "object", + "width": { + "arrayOk": true, + "description": "Sets the width (in px) of the lines bounding the marker points.", + "editType": "style", + "min": 0, + "valType": "number" + }, + "widthsrc": { + "description": "Sets the source reference on Chart Studio Cloud for width .", + "editType": "none", + "valType": "string" + } + }, + "maxdisplayed": { + "description": "Sets a maximum number of points to be drawn on the graph. *0* corresponds to no limit.", + "dflt": 0, + "editType": "plot", + "min": 0, + "valType": "number" + }, "opacity": { "arrayOk": true, "description": "Sets the marker opacity.", - "editType": "calc", + "editType": "style", "max": 1, "min": 0, "valType": "number" @@ -51831,7 +53830,7 @@ "reversescale": { "description": "Reverses the color mapping if true. Has an effect only if in `marker.color`is set to a numerical array. If true, `marker.cmin` will correspond to the last color in the array and `marker.cmax` will correspond to the first color.", "dflt": false, - "editType": "calc", + "editType": "plot", "valType": "boolean" }, "role": "object", @@ -51866,24 +53865,500 @@ "area" ] }, - "sizeref": { - "description": "Has an effect only if `marker.size` is set to a numerical array. Sets the scale factor used to determine the rendered size of marker points. Use with `sizemin` and `sizemode`.", - "dflt": 1, - "editType": "calc", - "valType": "number" - }, - "sizesrc": { - "description": "Sets the source reference on Chart Studio Cloud for size .", - "editType": "none", - "valType": "string" - }, - "symbol": { - "arrayOk": true, - "description": "Sets the marker symbol. Full list: https://www.mapbox.com/maki-icons/ Note that the array `marker.color` and `marker.size` are only available for *circle* symbols.", - "dflt": "circle", - "editType": "calc", - "valType": "string" - }, + "sizeref": { + "description": "Has an effect only if `marker.size` is set to a numerical array. Sets the scale factor used to determine the rendered size of marker points. Use with `sizemin` and `sizemode`.", + "dflt": 1, + "editType": "calc", + "valType": "number" + }, + "sizesrc": { + "description": "Sets the source reference on Chart Studio Cloud for size .", + "editType": "none", + "valType": "string" + }, + "symbol": { + "arrayOk": true, + "description": "Sets the marker symbol type. Adding 100 is equivalent to appending *-open* to a symbol name. Adding 200 is equivalent to appending *-dot* to a symbol name. Adding 300 is equivalent to appending *-open-dot* or *dot-open* to a symbol name.", + "dflt": "circle", + "editType": "style", + "valType": "enumerated", + "values": [ + 0, + "0", + "circle", + 100, + "100", + "circle-open", + 200, + "200", + "circle-dot", + 300, + "300", + "circle-open-dot", + 1, + "1", + "square", + 101, + "101", + "square-open", + 201, + "201", + "square-dot", + 301, + "301", + "square-open-dot", + 2, + "2", + "diamond", + 102, + "102", + "diamond-open", + 202, + "202", + "diamond-dot", + 302, + "302", + "diamond-open-dot", + 3, + "3", + "cross", + 103, + "103", + "cross-open", + 203, + "203", + "cross-dot", + 303, + "303", + "cross-open-dot", + 4, + "4", + "x", + 104, + "104", + "x-open", + 204, + "204", + "x-dot", + 304, + "304", + "x-open-dot", + 5, + "5", + "triangle-up", + 105, + "105", + "triangle-up-open", + 205, + "205", + "triangle-up-dot", + 305, + "305", + "triangle-up-open-dot", + 6, + "6", + "triangle-down", + 106, + "106", + "triangle-down-open", + 206, + "206", + "triangle-down-dot", + 306, + "306", + "triangle-down-open-dot", + 7, + "7", + "triangle-left", + 107, + "107", + "triangle-left-open", + 207, + "207", + "triangle-left-dot", + 307, + "307", + "triangle-left-open-dot", + 8, + "8", + "triangle-right", + 108, + "108", + "triangle-right-open", + 208, + "208", + "triangle-right-dot", + 308, + "308", + "triangle-right-open-dot", + 9, + "9", + "triangle-ne", + 109, + "109", + "triangle-ne-open", + 209, + "209", + "triangle-ne-dot", + 309, + "309", + "triangle-ne-open-dot", + 10, + "10", + "triangle-se", + 110, + "110", + "triangle-se-open", + 210, + "210", + "triangle-se-dot", + 310, + "310", + "triangle-se-open-dot", + 11, + "11", + "triangle-sw", + 111, + "111", + "triangle-sw-open", + 211, + "211", + "triangle-sw-dot", + 311, + "311", + "triangle-sw-open-dot", + 12, + "12", + "triangle-nw", + 112, + "112", + "triangle-nw-open", + 212, + "212", + "triangle-nw-dot", + 312, + "312", + "triangle-nw-open-dot", + 13, + "13", + "pentagon", + 113, + "113", + "pentagon-open", + 213, + "213", + "pentagon-dot", + 313, + "313", + "pentagon-open-dot", + 14, + "14", + "hexagon", + 114, + "114", + "hexagon-open", + 214, + "214", + "hexagon-dot", + 314, + "314", + "hexagon-open-dot", + 15, + "15", + "hexagon2", + 115, + "115", + "hexagon2-open", + 215, + "215", + "hexagon2-dot", + 315, + "315", + "hexagon2-open-dot", + 16, + "16", + "octagon", + 116, + "116", + "octagon-open", + 216, + "216", + "octagon-dot", + 316, + "316", + "octagon-open-dot", + 17, + "17", + "star", + 117, + "117", + "star-open", + 217, + "217", + "star-dot", + 317, + "317", + "star-open-dot", + 18, + "18", + "hexagram", + 118, + "118", + "hexagram-open", + 218, + "218", + "hexagram-dot", + 318, + "318", + "hexagram-open-dot", + 19, + "19", + "star-triangle-up", + 119, + "119", + "star-triangle-up-open", + 219, + "219", + "star-triangle-up-dot", + 319, + "319", + "star-triangle-up-open-dot", + 20, + "20", + "star-triangle-down", + 120, + "120", + "star-triangle-down-open", + 220, + "220", + "star-triangle-down-dot", + 320, + "320", + "star-triangle-down-open-dot", + 21, + "21", + "star-square", + 121, + "121", + "star-square-open", + 221, + "221", + "star-square-dot", + 321, + "321", + "star-square-open-dot", + 22, + "22", + "star-diamond", + 122, + "122", + "star-diamond-open", + 222, + "222", + "star-diamond-dot", + 322, + "322", + "star-diamond-open-dot", + 23, + "23", + "diamond-tall", + 123, + "123", + "diamond-tall-open", + 223, + "223", + "diamond-tall-dot", + 323, + "323", + "diamond-tall-open-dot", + 24, + "24", + "diamond-wide", + 124, + "124", + "diamond-wide-open", + 224, + "224", + "diamond-wide-dot", + 324, + "324", + "diamond-wide-open-dot", + 25, + "25", + "hourglass", + 125, + "125", + "hourglass-open", + 26, + "26", + "bowtie", + 126, + "126", + "bowtie-open", + 27, + "27", + "circle-cross", + 127, + "127", + "circle-cross-open", + 28, + "28", + "circle-x", + 128, + "128", + "circle-x-open", + 29, + "29", + "square-cross", + 129, + "129", + "square-cross-open", + 30, + "30", + "square-x", + 130, + "130", + "square-x-open", + 31, + "31", + "diamond-cross", + 131, + "131", + "diamond-cross-open", + 32, + "32", + "diamond-x", + 132, + "132", + "diamond-x-open", + 33, + "33", + "cross-thin", + 133, + "133", + "cross-thin-open", + 34, + "34", + "x-thin", + 134, + "134", + "x-thin-open", + 35, + "35", + "asterisk", + 135, + "135", + "asterisk-open", + 36, + "36", + "hash", + 136, + "136", + "hash-open", + 236, + "236", + "hash-dot", + 336, + "336", + "hash-open-dot", + 37, + "37", + "y-up", + 137, + "137", + "y-up-open", + 38, + "38", + "y-down", + 138, + "138", + "y-down-open", + 39, + "39", + "y-left", + 139, + "139", + "y-left-open", + 40, + "40", + "y-right", + 140, + "140", + "y-right-open", + 41, + "41", + "line-ew", + 141, + "141", + "line-ew-open", + 42, + "42", + "line-ns", + 142, + "142", + "line-ns-open", + 43, + "43", + "line-ne", + 143, + "143", + "line-ne-open", + 44, + "44", + "line-nw", + 144, + "144", + "line-nw-open", + 45, + "45", + "arrow-up", + 145, + "145", + "arrow-up-open", + 46, + "46", + "arrow-down", + 146, + "146", + "arrow-down-open", + 47, + "47", + "arrow-left", + 147, + "147", + "arrow-left-open", + 48, + "48", + "arrow-right", + 148, + "148", + "arrow-right-open", + 49, + "49", + "arrow-bar-up", + 149, + "149", + "arrow-bar-up-open", + 50, + "50", + "arrow-bar-down", + 150, + "150", + "arrow-bar-down-open", + 51, + "51", + "arrow-bar-left", + 151, + "151", + "arrow-bar-left-open", + 52, + "52", + "arrow-bar-right", + 152, + "152", + "arrow-bar-right-open" + ] + }, "symbolsrc": { "description": "Sets the source reference on Chart Studio Cloud for symbol .", "editType": "none", @@ -51902,8 +54377,7 @@ "valType": "string" }, "mode": { - "description": "Determines the drawing mode for this scatter trace. If the provided `mode` includes *text* then the `text` elements appear at the coordinates. Otherwise, the `text` elements appear on hover.", - "dflt": "markers", + "description": "Determines the drawing mode for this scatter trace. If the provided `mode` includes *text* then the `text` elements appear at the coordinates. Otherwise, the `text` elements appear on hover. If there are less than 20 points and the trace is not stacked then the default is *lines+markers*. Otherwise, *lines*.", "editType": "calc", "extras": [ "none" @@ -51928,18 +54402,34 @@ "min": 0, "valType": "number" }, + "r": { + "description": "Sets the radial coordinates", + "editType": "calc+clearAxisTypes", + "valType": "data_array" + }, + "r0": { + "description": "Alternate to `r`. Builds a linear space of r coordinates. Use with `dr` where `r0` is the starting coordinate and `dr` the step.", + "dflt": 0, + "editType": "calc+clearAxisTypes", + "valType": "any" + }, + "rsrc": { + "description": "Sets the source reference on Chart Studio Cloud for r .", + "editType": "none", + "valType": "string" + }, "selected": { - "editType": "calc", + "editType": "style", "marker": { "color": { "description": "Sets the marker color of selected points.", - "editType": "calc", + "editType": "style", "valType": "color" }, - "editType": "calc", + "editType": "style", "opacity": { "description": "Sets the marker opacity of selected points.", - "editType": "calc", + "editType": "style", "max": 1, "min": 0, "valType": "number" @@ -51947,12 +54437,21 @@ "role": "object", "size": { "description": "Sets the marker size of selected points.", - "editType": "calc", + "editType": "style", "min": 0, "valType": "number" } }, - "role": "object" + "role": "object", + "textfont": { + "color": { + "description": "Sets the text font color of selected points.", + "editType": "style", + "valType": "color" + }, + "editType": "style", + "role": "object" + } }, "selectedpoints": { "description": "Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the `unselected` are turned on for all points, whereas, any other non-array values means no selection all where the `selected` and `unselected` styles have no effect.", @@ -51985,42 +54484,59 @@ } }, "subplot": { - "description": "Sets a reference between this trace's data coordinates and a mapbox subplot. If *mapbox* (the default value), the data refer to `layout.mapbox`. If *mapbox2*, the data refer to `layout.mapbox2`, and so on.", - "dflt": "mapbox", + "description": "Sets a reference between this trace's data coordinates and a polar subplot. If *polar* (the default value), the data refer to `layout.polar`. If *polar2*, the data refer to `layout.polar2`, and so on.", + "dflt": "polar", "editType": "calc", "valType": "subplotid" }, "text": { "arrayOk": true, - "description": "Sets text elements associated with each (lon,lat) pair If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (lon,lat) coordinates. If trace `hoverinfo` contains a *text* flag and *hovertext* is not set, these elements will be seen in the hover labels.", + "description": "Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates. If trace `hoverinfo` contains a *text* flag and *hovertext* is not set, these elements will be seen in the hover labels.", "dflt": "", "editType": "calc", "valType": "string" }, "textfont": { "color": { - "editType": "calc", + "arrayOk": true, + "editType": "style", "valType": "color" }, - "description": "Sets the icon text font (color=mapbox.layer.paint.text-color, size=mapbox.layer.layout.text-size). Has an effect only when `type` is set to *symbol*.", + "colorsrc": { + "description": "Sets the source reference on Chart Studio Cloud for color .", + "editType": "none", + "valType": "string" + }, + "description": "Sets the text font.", "editType": "calc", "family": { + "arrayOk": true, "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*.", - "dflt": "Open Sans Regular, Arial Unicode MS Regular", "editType": "calc", "noBlank": true, "strict": true, "valType": "string" }, + "familysrc": { + "description": "Sets the source reference on Chart Studio Cloud for family .", + "editType": "none", + "valType": "string" + }, "role": "object", "size": { + "arrayOk": true, "editType": "calc", "min": 1, "valType": "number" + }, + "sizesrc": { + "description": "Sets the source reference on Chart Studio Cloud for size .", + "editType": "none", + "valType": "string" } }, "textposition": { - "arrayOk": false, + "arrayOk": true, "description": "Sets the positions of the `text` elements with respects to the (x,y) coordinates.", "dflt": "middle center", "editType": "calc", @@ -52037,6 +54553,11 @@ "bottom right" ] }, + "textpositionsrc": { + "description": "Sets the source reference on Chart Studio Cloud for textposition .", + "editType": "none", + "valType": "string" + }, "textsrc": { "description": "Sets the source reference on Chart Studio Cloud for text .", "editType": "none", @@ -52044,9 +54565,9 @@ }, "texttemplate": { "arrayOk": true, - "description": "Template string used for rendering the information text that appear on points. Note that this will override `textinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format for details on the date formatting syntax. Every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. variables `lat`, `lon` and `text`.", + "description": "Template string used for rendering the information text that appear on points. Note that this will override `textinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format for details on the date formatting syntax. Every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. variables `r`, `theta` and `text`.", "dflt": "", - "editType": "calc", + "editType": "plot", "valType": "string" }, "texttemplatesrc": { @@ -52054,6 +54575,33 @@ "editType": "none", "valType": "string" }, + "theta": { + "description": "Sets the angular coordinates", + "editType": "calc+clearAxisTypes", + "valType": "data_array" + }, + "theta0": { + "description": "Alternate to `theta`. Builds a linear space of theta coordinates. Use with `dtheta` where `theta0` is the starting coordinate and `dtheta` the step.", + "dflt": 0, + "editType": "calc+clearAxisTypes", + "valType": "any" + }, + "thetasrc": { + "description": "Sets the source reference on Chart Studio Cloud for theta .", + "editType": "none", + "valType": "string" + }, + "thetaunit": { + "description": "Sets the unit of input *theta* values. Has an effect only when on *linear* angular axes.", + "dflt": "degrees", + "editType": "calc+clearAxisTypes", + "valType": "enumerated", + "values": [ + "radians", + "degrees", + "gradians" + ] + }, "transforms": { "items": { "transform": { @@ -52064,7 +54612,7 @@ }, "role": "object" }, - "type": "scattermapbox", + "type": "scatterpolar", "uid": { "description": "Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.", "editType": "plot", @@ -52076,17 +54624,17 @@ "valType": "any" }, "unselected": { - "editType": "calc", + "editType": "style", "marker": { "color": { "description": "Sets the marker color of unselected points, applied only when a selection exists.", - "editType": "calc", + "editType": "style", "valType": "color" }, - "editType": "calc", + "editType": "style", "opacity": { "description": "Sets the marker opacity of unselected points, applied only when a selection exists.", - "editType": "calc", + "editType": "style", "max": 1, "min": 0, "valType": "number" @@ -52094,12 +54642,21 @@ "role": "object", "size": { "description": "Sets the marker size of unselected points, applied only when a selection exists.", - "editType": "calc", + "editType": "style", "min": 0, "valType": "number" } }, - "role": "object" + "role": "object", + "textfont": { + "color": { + "description": "Sets the text font color of unselected points, applied only when a selection exists.", + "editType": "style", + "valType": "color" + }, + "editType": "style", + "role": "object" + } }, "visible": { "description": "Determines whether or not this trace is visible. If *legendonly*, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).", @@ -52114,27 +54671,20 @@ } }, "categories": [ - "mapbox", - "gl", + "polar", "symbols", "showLegend", "scatter-like" ], "meta": { - "description": "The data visualized as scatter point, lines or marker symbols on a Mapbox GL geographic map is provided by longitude/latitude pairs in `lon` and `lat`.", - "hrName": "scatter_mapbox" + "description": "The scatterpolar trace type encompasses line charts, scatter charts, text charts, and bubble charts in polar coordinates. The data visualized as scatter point or lines is set in `r` (radial) and `theta` (angular) coordinates Text (appearing either on the chart or on hover only) is via `text`. Bubble charts are achieved by setting `marker.size` and/or `marker.color` to numerical arrays.", + "hrName": "scatter_polar" }, - "type": "scattermapbox" + "type": "scatterpolar" }, - "scatterpolar": { + "scatterpolargl": { "animatable": false, "attributes": { - "cliponaxis": { - "description": "Determines whether or not markers and text nodes are clipped about the subplot axes. To show markers and text nodes above axis lines and tick labels, make sure to set `xaxis.layer` and `yaxis.layer` to *below traces*.", - "dflt": false, - "editType": "plot", - "valType": "boolean" - }, "connectgaps": { "description": "Determines whether or not gaps (i.e. {nan} or missing values) in the provided data arrays are connected.", "dflt": false, @@ -52163,19 +54713,23 @@ "valType": "number" }, "fill": { - "description": "Sets the area to fill with a solid color. Use with `fillcolor` if not *none*. scatterpolar has a subset of the options available to scatter. *toself* connects the endpoints of the trace (or each segment of the trace if it has gaps) into a closed shape. *tonext* fills the space between two traces if one completely encloses the other (eg consecutive contour lines), and behaves like *toself* if there is no trace before it. *tonext* should not be used if one trace does not enclose the other.", + "description": "Sets the area to fill with a solid color. Defaults to *none* unless this trace is stacked, then it gets *tonexty* (*tonextx*) if `orientation` is *v* (*h*) Use with `fillcolor` if not *none*. *tozerox* and *tozeroy* fill to x=0 and y=0 respectively. *tonextx* and *tonexty* fill between the endpoints of this trace and the endpoints of the trace before it, connecting those endpoints with straight lines (to make a stacked area graph); if there is no trace before it, they behave like *tozerox* and *tozeroy*. *toself* connects the endpoints of the trace (or each segment of the trace if it has gaps) into a closed shape. *tonext* fills the space between two traces if one completely encloses the other (eg consecutive contour lines), and behaves like *toself* if there is no trace before it. *tonext* should not be used if one trace does not enclose the other. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order.", "dflt": "none", "editType": "calc", "valType": "enumerated", "values": [ "none", + "tozeroy", + "tozerox", + "tonexty", + "tonextx", "toself", "tonext" ] }, "fillcolor": { "description": "Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available.", - "editType": "style", + "editType": "calc", "valType": "color" }, "hoverinfo": { @@ -52296,15 +54850,6 @@ }, "role": "object" }, - "hoveron": { - "description": "Do the hover effects highlight individual points (markers or line points) or do they highlight filled regions? If the fill is *toself* or *tonext* and there are no markers or text, then the default is *fills*, otherwise it is *points*.", - "editType": "style", - "flags": [ - "points", - "fills" - ], - "valType": "flaglist" - }, "hovertemplate": { "arrayOk": true, "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\" as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, *xother* will be added to those with different x positions from the first point. An underscore before or after *(x|y)other* will add a space on that side, only when this field is shown. Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", @@ -52385,47 +54930,42 @@ "line": { "color": { "description": "Sets the line color.", - "editType": "style", + "editType": "calc", "valType": "color" }, "dash": { - "description": "Sets the dash style of lines. Set to a dash type string (*solid*, *dot*, *dash*, *longdash*, *dashdot*, or *longdashdot*) or a dash length list in px (eg *5px,10px,2px,2px*).", + "description": "Sets the style of the lines.", "dflt": "solid", - "editType": "style", - "valType": "string", + "editType": "calc", + "valType": "enumerated", "values": [ - "solid", - "dot", "dash", - "longdash", "dashdot", - "longdashdot" + "dot", + "longdash", + "longdashdot", + "solid" ] }, "editType": "calc", "role": "object", "shape": { - "description": "Determines the line shape. With *spline* the lines are drawn using spline interpolation. The other available values correspond to step-wise line shapes.", + "description": "Determines the line shape. The values correspond to step-wise line shapes.", "dflt": "linear", - "editType": "plot", + "editType": "calc", "valType": "enumerated", "values": [ "linear", - "spline" + "hv", + "vh", + "hvh", + "vhv" ] }, - "smoothing": { - "description": "Has an effect only if `shape` is set to *spline* Sets the amount of smoothing. *0* corresponds to no smoothing (equivalent to a *linear* shape).", - "dflt": 1, - "editType": "plot", - "max": 1.3, - "min": 0, - "valType": "number" - }, "width": { "description": "Sets the line width (in px).", "dflt": 2, - "editType": "style", + "editType": "calc", "min": 0, "valType": "number" } @@ -52448,7 +54988,7 @@ "cmax": { "description": "Sets the upper bound of the color domain. Has an effect only if in `marker.color`is set to a numerical array. Value should have the same units as in `marker.color` and if set, `marker.cmin` must be set as well.", "dflt": null, - "editType": "plot", + "editType": "calc", "impliedEdits": { "cauto": false }, @@ -52464,7 +55004,7 @@ "cmin": { "description": "Sets the lower bound of the color domain. Has an effect only if in `marker.color`is set to a numerical array. Value should have the same units as in `marker.color` and if set, `marker.cmax` must be set as well.", "dflt": null, - "editType": "plot", + "editType": "calc", "impliedEdits": { "cauto": false }, @@ -52473,7 +55013,7 @@ "color": { "arrayOk": true, "description": "Sets themarkercolor. It accepts either a specific color or an array of numbers that are mapped to the colorscale relative to the max and min values of the array or relative to `marker.cmin` and `marker.cmax` if set.", - "editType": "style", + "editType": "calc", "valType": "color" }, "coloraxis": { @@ -52487,25 +55027,25 @@ "_deprecated": { "title": { "description": "Deprecated in favor of color bar's `title.text`. Note that value of color bar's `title` is no longer a simple *string* but a set of sub-attributes.", - "editType": "colorbars", + "editType": "calc", "valType": "string" }, "titlefont": { "color": { - "editType": "colorbars", + "editType": "calc", "valType": "color" }, "description": "Deprecated in favor of color bar's `title.font`.", - "editType": "colorbars", + "editType": "calc", "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": "colorbars", + "editType": "calc", "noBlank": true, "strict": true, "valType": "string" }, "size": { - "editType": "colorbars", + "editType": "calc", "min": 1, "valType": "number" } @@ -52513,7 +55053,7 @@ "titleside": { "description": "Deprecated in favor of color bar's `title.side`.", "dflt": "top", - "editType": "colorbars", + "editType": "calc", "valType": "enumerated", "values": [ "right", @@ -52525,35 +55065,35 @@ "bgcolor": { "description": "Sets the color of padded area.", "dflt": "rgba(0,0,0,0)", - "editType": "colorbars", + "editType": "calc", "valType": "color" }, "bordercolor": { "description": "Sets the axis line color.", "dflt": "#444", - "editType": "colorbars", + "editType": "calc", "valType": "color" }, "borderwidth": { "description": "Sets the width (in px) or the border enclosing this color bar.", "dflt": 0, - "editType": "colorbars", + "editType": "calc", "min": 0, "valType": "number" }, "dtick": { "description": "Sets the step in-between ticks on this axis. Use with `tick0`. Must be a positive number, or special strings available to *log* and *date* axes. If the axis `type` is *log*, then ticks are set every 10^(n*dtick) where n is the tick number. For example, to set a tick mark at 1, 10, 100, 1000, ... set dtick to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to log_10(5), or 0.69897000433. *log* has several special values; *L*, where `f` is a positive number, gives ticks linearly spaced in value (but not position). For example `tick0` = 0.1, `dtick` = *L0.5* will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus small digits between, use *D1* (all digits) or *D2* (only 2 and 5). `tick0` is ignored for *D1* and *D2*. If the axis `type` is *date*, then you must convert the time to milliseconds. For example, to set the interval between ticks to one day, set `dtick` to 86400000.0. *date* also has special values *M* gives ticks spaced by a number of months. `n` must be a positive integer. To set ticks on the 15th of every third month, set `tick0` to *2000-01-15* and `dtick` to *M3*. To set ticks every 4 years, set `dtick` to *M48*", - "editType": "colorbars", + "editType": "calc", "impliedEdits": { "tickmode": "linear" }, "valType": "any" }, - "editType": "colorbars", + "editType": "calc", "exponentformat": { "description": "Determines a formatting rule for the tick exponents. For example, consider the number 1,000,000,000. If *none*, it appears as 1,000,000,000. If *e*, 1e+9. If *E*, 1E+9. If *power*, 1x10^9 (with 9 in a super script). If *SI*, 1G. If *B*, 1B.", "dflt": "B", - "editType": "colorbars", + "editType": "calc", "valType": "enumerated", "values": [ "none", @@ -52567,14 +55107,14 @@ "len": { "description": "Sets the length of the color bar This measure excludes the padding of both ends. That is, the color bar length is this length minus the padding on both ends.", "dflt": 1, - "editType": "colorbars", + "editType": "calc", "min": 0, "valType": "number" }, "lenmode": { "description": "Determines whether this color bar's length (i.e. the measure in the color variation direction) is set in units of plot *fraction* or in *pixels. Use `len` to set the value.", "dflt": "fraction", - "editType": "colorbars", + "editType": "calc", "valType": "enumerated", "values": [ "fraction", @@ -52584,27 +55124,27 @@ "minexponent": { "description": "Hide SI prefix for 10^n if |n| is below this number. This only has an effect when `tickformat` is *SI* or *B*.", "dflt": 3, - "editType": "colorbars", + "editType": "calc", "min": 0, "valType": "number" }, "nticks": { "description": "Specifies the maximum number of ticks for the particular axis. The actual number of ticks will be chosen automatically to be less than or equal to `nticks`. Has an effect only if `tickmode` is set to *auto*.", "dflt": 0, - "editType": "colorbars", + "editType": "calc", "min": 0, "valType": "integer" }, "outlinecolor": { "description": "Sets the axis line color.", "dflt": "#444", - "editType": "colorbars", + "editType": "calc", "valType": "color" }, "outlinewidth": { "description": "Sets the width (in px) of the axis line.", "dflt": 1, - "editType": "colorbars", + "editType": "calc", "min": 0, "valType": "number" }, @@ -52612,13 +55152,13 @@ "separatethousands": { "description": "If \"true\", even 4-digit integers are separated", "dflt": false, - "editType": "colorbars", + "editType": "calc", "valType": "boolean" }, "showexponent": { "description": "If *all*, all exponents are shown besides their significands. If *first*, only the exponent of the first tick is shown. If *last*, only the exponent of the last tick is shown. If *none*, no exponents appear.", "dflt": "all", - "editType": "colorbars", + "editType": "calc", "valType": "enumerated", "values": [ "all", @@ -52630,13 +55170,13 @@ "showticklabels": { "description": "Determines whether or not the tick labels are drawn.", "dflt": true, - "editType": "colorbars", + "editType": "calc", "valType": "boolean" }, "showtickprefix": { "description": "If *all*, all tick labels are displayed with a prefix. If *first*, only the first tick is displayed with a prefix. If *last*, only the last tick is displayed with a suffix. If *none*, tick prefixes are hidden.", "dflt": "all", - "editType": "colorbars", + "editType": "calc", "valType": "enumerated", "values": [ "all", @@ -52648,7 +55188,7 @@ "showticksuffix": { "description": "Same as `showtickprefix` but for tick suffixes.", "dflt": "all", - "editType": "colorbars", + "editType": "calc", "valType": "enumerated", "values": [ "all", @@ -52660,14 +55200,14 @@ "thickness": { "description": "Sets the thickness of the color bar This measure excludes the size of the padding, ticks and labels.", "dflt": 30, - "editType": "colorbars", + "editType": "calc", "min": 0, "valType": "number" }, "thicknessmode": { "description": "Determines whether this color bar's thickness (i.e. the measure in the constant color direction) is set in units of plot *fraction* or in *pixels*. Use `thickness` to set the value.", "dflt": "pixels", - "editType": "colorbars", + "editType": "calc", "valType": "enumerated", "values": [ "fraction", @@ -52676,7 +55216,7 @@ }, "tick0": { "description": "Sets the placement of the first tick on this axis. Use with `dtick`. If the axis `type` is *log*, then you must take the log of your starting tick (e.g. to set the starting tick to 100, set the `tick0` to 2) except when `dtick`=*L* (see `dtick` for more info). If the axis `type` is *date*, it should be a date string, like date data. If the axis `type` is *category*, it should be a number, using the scale where each category is assigned a serial number from zero in the order it appears.", - "editType": "colorbars", + "editType": "calc", "impliedEdits": { "tickmode": "linear" }, @@ -52685,32 +55225,32 @@ "tickangle": { "description": "Sets the angle of the tick labels with respect to the horizontal. For example, a `tickangle` of -90 draws the tick labels vertically.", "dflt": "auto", - "editType": "colorbars", + "editType": "calc", "valType": "angle" }, "tickcolor": { "description": "Sets the tick color.", "dflt": "#444", - "editType": "colorbars", + "editType": "calc", "valType": "color" }, "tickfont": { "color": { - "editType": "colorbars", + "editType": "calc", "valType": "color" }, "description": "Sets the color bar's tick label font", - "editType": "colorbars", + "editType": "calc", "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": "colorbars", + "editType": "calc", "noBlank": true, "strict": true, "valType": "string" }, "role": "object", "size": { - "editType": "colorbars", + "editType": "calc", "min": 1, "valType": "number" } @@ -52718,7 +55258,7 @@ "tickformat": { "description": "Sets the tick label formatting rule using d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format. We add two items to d3's date formatter: *%h* for half of the year as a decimal number as well as *%{n}f* for fractional seconds with n digits. For example, *2016-10-13 09:15:23.456* with tickformat *%H~%M~%S.%2f* would display *09~15~23.46*", "dflt": "", - "editType": "colorbars", + "editType": "calc", "valType": "string" }, "tickformatstops": { @@ -52726,41 +55266,41 @@ "tickformatstop": { "dtickrange": { "description": "range [*min*, *max*], where *min*, *max* - dtick values which describe some zoom level, it is possible to omit *min* or *max* value by passing *null*", - "editType": "colorbars", + "editType": "calc", "items": [ { - "editType": "colorbars", + "editType": "calc", "valType": "any" }, { - "editType": "colorbars", + "editType": "calc", "valType": "any" } ], "valType": "info_array" }, - "editType": "colorbars", + "editType": "calc", "enabled": { "description": "Determines whether or not this stop is used. If `false`, this stop is ignored even within its `dtickrange`.", "dflt": true, - "editType": "colorbars", + "editType": "calc", "valType": "boolean" }, "name": { "description": "When used in a template, named items are created in the output figure in addition to any items the figure already has in this array. You can modify these items in the output figure by making your own item with `templateitemname` matching this `name` alongside your modifications (including `visible: false` or `enabled: false` to hide it). Has no effect outside of a template.", - "editType": "colorbars", + "editType": "calc", "valType": "string" }, "role": "object", "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": "colorbars", + "editType": "calc", "valType": "string" }, "value": { "description": "string - dtickformat for described zoom level, the same as *tickformat*", "dflt": "", - "editType": "colorbars", + "editType": "calc", "valType": "string" } } @@ -52769,7 +55309,7 @@ }, "ticklabeloverflow": { "description": "Determines how we handle tick labels that would overflow either the graph div or the domain of the axis. The default value for inside tick labels is *hide past domain*. In other cases the default is *hide past div*.", - "editType": "colorbars", + "editType": "calc", "valType": "enumerated", "values": [ "allow", @@ -52780,7 +55320,7 @@ "ticklabelposition": { "description": "Determines where tick labels are drawn.", "dflt": "outside", - "editType": "colorbars", + "editType": "calc", "valType": "enumerated", "values": [ "outside", @@ -52794,13 +55334,13 @@ "ticklen": { "description": "Sets the tick length (in px).", "dflt": 5, - "editType": "colorbars", + "editType": "calc", "min": 0, "valType": "number" }, "tickmode": { "description": "Sets the tick mode for this axis. If *auto*, the number of ticks is set via `nticks`. If *linear*, the placement of the ticks is determined by a starting position `tick0` and a tick step `dtick` (*linear* is the default value if `tick0` and `dtick` are provided). If *array*, the placement of the ticks is set via `tickvals` and the tick text is `ticktext`. (*array* is the default value if `tickvals` is provided).", - "editType": "colorbars", + "editType": "calc", "impliedEdits": {}, "valType": "enumerated", "values": [ @@ -52812,13 +55352,13 @@ "tickprefix": { "description": "Sets a tick label prefix.", "dflt": "", - "editType": "colorbars", + "editType": "calc", "valType": "string" }, "ticks": { "description": "Determines whether ticks are drawn or not. If **, this axis' ticks are not drawn. If *outside* (*inside*), this axis' are drawn outside (inside) the axis lines.", "dflt": "", - "editType": "colorbars", + "editType": "calc", "valType": "enumerated", "values": [ "outside", @@ -52829,12 +55369,12 @@ "ticksuffix": { "description": "Sets a tick label suffix.", "dflt": "", - "editType": "colorbars", + "editType": "calc", "valType": "string" }, "ticktext": { "description": "Sets the text displayed at the ticks position via `tickvals`. Only has an effect if `tickmode` is set to *array*. Used with `tickvals`.", - "editType": "colorbars", + "editType": "calc", "valType": "data_array" }, "ticktextsrc": { @@ -52844,7 +55384,7 @@ }, "tickvals": { "description": "Sets the values at which ticks on this axis appear. Only has an effect if `tickmode` is set to *array*. Used with `ticktext`.", - "editType": "colorbars", + "editType": "calc", "valType": "data_array" }, "tickvalssrc": { @@ -52855,29 +55395,29 @@ "tickwidth": { "description": "Sets the tick width (in px).", "dflt": 1, - "editType": "colorbars", + "editType": "calc", "min": 0, "valType": "number" }, "title": { - "editType": "colorbars", + "editType": "calc", "font": { "color": { - "editType": "colorbars", + "editType": "calc", "valType": "color" }, "description": "Sets this color bar's title font. Note that the title's font used to be set by the now deprecated `titlefont` attribute.", - "editType": "colorbars", + "editType": "calc", "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": "colorbars", + "editType": "calc", "noBlank": true, "strict": true, "valType": "string" }, "role": "object", "size": { - "editType": "colorbars", + "editType": "calc", "min": 1, "valType": "number" } @@ -52886,7 +55426,7 @@ "side": { "description": "Determines the location of color bar's title with respect to the color bar. Note that the title's location used to be set by the now deprecated `titleside` attribute.", "dflt": "top", - "editType": "colorbars", + "editType": "calc", "valType": "enumerated", "values": [ "right", @@ -52896,14 +55436,14 @@ }, "text": { "description": "Sets the title of the color bar. Note that before the existence of `title.text`, the title's contents used to be defined as the `title` attribute itself. This behavior has been deprecated.", - "editType": "colorbars", + "editType": "calc", "valType": "string" } }, "x": { "description": "Sets the x position of the color bar (in plot fraction).", "dflt": 1.02, - "editType": "colorbars", + "editType": "calc", "max": 3, "min": -2, "valType": "number" @@ -52911,7 +55451,7 @@ "xanchor": { "description": "Sets this color bar's horizontal position anchor. This anchor binds the `x` position to the *left*, *center* or *right* of the color bar.", "dflt": "left", - "editType": "colorbars", + "editType": "calc", "valType": "enumerated", "values": [ "left", @@ -52922,14 +55462,14 @@ "xpad": { "description": "Sets the amount of padding (in px) along the x direction.", "dflt": 10, - "editType": "colorbars", + "editType": "calc", "min": 0, "valType": "number" }, "y": { "description": "Sets the y position of the color bar (in plot fraction).", "dflt": 0.5, - "editType": "colorbars", + "editType": "calc", "max": 3, "min": -2, "valType": "number" @@ -52937,7 +55477,7 @@ "yanchor": { "description": "Sets this color bar's vertical position anchor This anchor binds the `y` position to the *top*, *middle* or *bottom* of the color bar.", "dflt": "middle", - "editType": "colorbars", + "editType": "calc", "valType": "enumerated", "values": [ "top", @@ -52948,7 +55488,7 @@ "ypad": { "description": "Sets the amount of padding (in px) along the y direction.", "dflt": 10, - "editType": "colorbars", + "editType": "calc", "min": 0, "valType": "number" } @@ -52968,39 +55508,6 @@ "valType": "string" }, "editType": "calc", - "gradient": { - "color": { - "arrayOk": true, - "description": "Sets the final color of the gradient fill: the center color for radial, the right for horizontal, or the bottom for vertical.", - "editType": "calc", - "valType": "color" - }, - "colorsrc": { - "description": "Sets the source reference on Chart Studio Cloud for color .", - "editType": "none", - "valType": "string" - }, - "editType": "calc", - "role": "object", - "type": { - "arrayOk": true, - "description": "Sets the type of gradient used to fill the markers", - "dflt": "none", - "editType": "calc", - "valType": "enumerated", - "values": [ - "radial", - "horizontal", - "vertical", - "none" - ] - }, - "typesrc": { - "description": "Sets the source reference on Chart Studio Cloud for type .", - "editType": "none", - "valType": "string" - } - }, "line": { "autocolorscale": { "description": "Determines whether the colorscale is a default palette (`autocolorscale: true`) or the palette determined by `marker.line.colorscale`. Has an effect only if in `marker.line.color`is set to a numerical array. In case `colorscale` is unspecified or `autocolorscale` is true, the default palette will be chosen according to whether numbers in the `color` array are all positive, all negative or mixed.", @@ -53019,7 +55526,7 @@ "cmax": { "description": "Sets the upper bound of the color domain. Has an effect only if in `marker.line.color`is set to a numerical array. Value should have the same units as in `marker.line.color` and if set, `marker.line.cmin` must be set as well.", "dflt": null, - "editType": "plot", + "editType": "calc", "impliedEdits": { "cauto": false }, @@ -53035,7 +55542,7 @@ "cmin": { "description": "Sets the lower bound of the color domain. Has an effect only if in `marker.line.color`is set to a numerical array. Value should have the same units as in `marker.line.color` and if set, `marker.line.cmax` must be set as well.", "dflt": null, - "editType": "plot", + "editType": "calc", "impliedEdits": { "cauto": false }, @@ -53044,7 +55551,7 @@ "color": { "arrayOk": true, "description": "Sets themarker.linecolor. It accepts either a specific color or an array of numbers that are mapped to the colorscale relative to the max and min values of the array or relative to `marker.line.cmin` and `marker.line.cmax` if set.", - "editType": "style", + "editType": "calc", "valType": "color" }, "coloraxis": { @@ -53072,14 +55579,14 @@ "reversescale": { "description": "Reverses the color mapping if true. Has an effect only if in `marker.line.color`is set to a numerical array. If true, `marker.line.cmin` will correspond to the last color in the array and `marker.line.cmax` will correspond to the first color.", "dflt": false, - "editType": "plot", + "editType": "calc", "valType": "boolean" }, "role": "object", "width": { "arrayOk": true, "description": "Sets the width (in px) of the lines bounding the marker points.", - "editType": "style", + "editType": "calc", "min": 0, "valType": "number" }, @@ -53089,17 +55596,10 @@ "valType": "string" } }, - "maxdisplayed": { - "description": "Sets a maximum number of points to be drawn on the graph. *0* corresponds to no limit.", - "dflt": 0, - "editType": "plot", - "min": 0, - "valType": "number" - }, "opacity": { "arrayOk": true, "description": "Sets the marker opacity.", - "editType": "style", + "editType": "calc", "max": 1, "min": 0, "valType": "number" @@ -53112,7 +55612,7 @@ "reversescale": { "description": "Reverses the color mapping if true. Has an effect only if in `marker.color`is set to a numerical array. If true, `marker.cmin` will correspond to the last color in the array and `marker.cmax` will correspond to the first color.", "dflt": false, - "editType": "plot", + "editType": "calc", "valType": "boolean" }, "role": "object", @@ -53162,7 +55662,7 @@ "arrayOk": true, "description": "Sets the marker symbol type. Adding 100 is equivalent to appending *-open* to a symbol name. Adding 200 is equivalent to appending *-dot* to a symbol name. Adding 300 is equivalent to appending *-open-dot* or *dot-open* to a symbol name.", "dflt": "circle", - "editType": "style", + "editType": "calc", "valType": "enumerated", "values": [ 0, @@ -53781,7 +56281,7 @@ "textfont": { "color": { "arrayOk": true, - "editType": "style", + "editType": "calc", "valType": "color" }, "colorsrc": { @@ -53894,7 +56394,7 @@ }, "role": "object" }, - "type": "scatterpolar", + "type": "scatterpolargl", "uid": { "description": "Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.", "editType": "plot", @@ -53953,20 +56453,28 @@ } }, "categories": [ + "gl", + "regl", "polar", "symbols", "showLegend", "scatter-like" ], "meta": { - "description": "The scatterpolar trace type encompasses line charts, scatter charts, text charts, and bubble charts in polar coordinates. The data visualized as scatter point or lines is set in `r` (radial) and `theta` (angular) coordinates Text (appearing either on the chart or on hover only) is via `text`. Bubble charts are achieved by setting `marker.size` and/or `marker.color` to numerical arrays.", - "hrName": "scatter_polar" + "description": "The scatterpolargl trace type encompasses line charts, scatter charts, and bubble charts in polar coordinates using the WebGL plotting engine. The data visualized as scatter point or lines is set in `r` (radial) and `theta` (angular) coordinates Bubble charts are achieved by setting `marker.size` and/or `marker.color` to numerical arrays.", + "hrName": "scatter_polar_gl" }, - "type": "scatterpolar" + "type": "scatterpolargl" }, - "scatterpolargl": { + "scattersmith": { "animatable": false, "attributes": { + "cliponaxis": { + "description": "Determines whether or not markers and text nodes are clipped about the subplot axes. To show markers and text nodes above axis lines and tick labels, make sure to set `xaxis.layer` and `yaxis.layer` to *below traces*.", + "dflt": false, + "editType": "plot", + "valType": "boolean" + }, "connectgaps": { "description": "Determines whether or not gaps (i.e. {nan} or missing values) in the provided data arrays are connected.", "dflt": false, @@ -53983,35 +56491,20 @@ "editType": "none", "valType": "string" }, - "dr": { - "description": "Sets the r coordinate step.", - "dflt": 1, - "editType": "calc", - "valType": "number" - }, - "dtheta": { - "description": "Sets the theta coordinate step. By default, the `dtheta` step equals the subplot's period divided by the length of the `r` coordinates.", - "editType": "calc", - "valType": "number" - }, "fill": { - "description": "Sets the area to fill with a solid color. Defaults to *none* unless this trace is stacked, then it gets *tonexty* (*tonextx*) if `orientation` is *v* (*h*) Use with `fillcolor` if not *none*. *tozerox* and *tozeroy* fill to x=0 and y=0 respectively. *tonextx* and *tonexty* fill between the endpoints of this trace and the endpoints of the trace before it, connecting those endpoints with straight lines (to make a stacked area graph); if there is no trace before it, they behave like *tozerox* and *tozeroy*. *toself* connects the endpoints of the trace (or each segment of the trace if it has gaps) into a closed shape. *tonext* fills the space between two traces if one completely encloses the other (eg consecutive contour lines), and behaves like *toself* if there is no trace before it. *tonext* should not be used if one trace does not enclose the other. Traces in a `stackgroup` will only fill to (or be filled to) other traces in the same group. With multiple `stackgroup`s or some traces stacked and some not, if fill-linked traces are not already consecutive, the later ones will be pushed down in the drawing order.", + "description": "Sets the area to fill with a solid color. Use with `fillcolor` if not *none*. scattersmith has a subset of the options available to scatter. *toself* connects the endpoints of the trace (or each segment of the trace if it has gaps) into a closed shape. *tonext* fills the space between two traces if one completely encloses the other (eg consecutive contour lines), and behaves like *toself* if there is no trace before it. *tonext* should not be used if one trace does not enclose the other.", "dflt": "none", "editType": "calc", "valType": "enumerated", "values": [ "none", - "tozeroy", - "tozerox", - "tonexty", - "tonextx", "toself", "tonext" ] }, "fillcolor": { "description": "Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available.", - "editType": "calc", + "editType": "style", "valType": "color" }, "hoverinfo": { @@ -54025,8 +56518,9 @@ "skip" ], "flags": [ - "r", - "theta", + "x", + "y", + "z", "text", "name" ], @@ -54132,6 +56626,15 @@ }, "role": "object" }, + "hoveron": { + "description": "Do the hover effects highlight individual points (markers or line points) or do they highlight filled regions? If the fill is *toself* or *tonext* and there are no markers or text, then the default is *fills*, otherwise it is *points*.", + "editType": "style", + "flags": [ + "points", + "fills" + ], + "valType": "flaglist" + }, "hovertemplate": { "arrayOk": true, "description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\" as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, *xother* will be added to those with different x positions from the first point. An underscore before or after *(x|y)other* will add a space on that side, only when this field is shown. Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. Anything contained in tag `` is displayed in the secondary box, for example \"{fullData.name}\". To hide the secondary box completely, use an empty tag ``.", @@ -54166,6 +56669,16 @@ "editType": "none", "valType": "string" }, + "im": { + "description": "Sets the imaginary coordinates", + "editType": "calc+clearAxisTypes", + "valType": "data_array" + }, + "imsrc": { + "description": "Sets the source reference on Chart Studio Cloud for im .", + "editType": "none", + "valType": "string" + }, "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.", "dflt": "", @@ -54212,42 +56725,47 @@ "line": { "color": { "description": "Sets the line color.", - "editType": "calc", + "editType": "style", "valType": "color" }, "dash": { - "description": "Sets the style of the lines.", + "description": "Sets the dash style of lines. Set to a dash type string (*solid*, *dot*, *dash*, *longdash*, *dashdot*, or *longdashdot*) or a dash length list in px (eg *5px,10px,2px,2px*).", "dflt": "solid", - "editType": "calc", - "valType": "enumerated", + "editType": "style", + "valType": "string", "values": [ - "dash", - "dashdot", + "solid", "dot", + "dash", "longdash", - "longdashdot", - "solid" + "dashdot", + "longdashdot" ] }, "editType": "calc", "role": "object", "shape": { - "description": "Determines the line shape. The values correspond to step-wise line shapes.", + "description": "Determines the line shape. With *spline* the lines are drawn using spline interpolation. The other available values correspond to step-wise line shapes.", "dflt": "linear", - "editType": "calc", + "editType": "plot", "valType": "enumerated", "values": [ "linear", - "hv", - "vh", - "hvh", - "vhv" + "spline" ] }, + "smoothing": { + "description": "Has an effect only if `shape` is set to *spline* Sets the amount of smoothing. *0* corresponds to no smoothing (equivalent to a *linear* shape).", + "dflt": 1, + "editType": "plot", + "max": 1.3, + "min": 0, + "valType": "number" + }, "width": { "description": "Sets the line width (in px).", "dflt": 2, - "editType": "calc", + "editType": "style", "min": 0, "valType": "number" } @@ -54270,7 +56788,7 @@ "cmax": { "description": "Sets the upper bound of the color domain. Has an effect only if in `marker.color`is set to a numerical array. Value should have the same units as in `marker.color` and if set, `marker.cmin` must be set as well.", "dflt": null, - "editType": "calc", + "editType": "plot", "impliedEdits": { "cauto": false }, @@ -54286,7 +56804,7 @@ "cmin": { "description": "Sets the lower bound of the color domain. Has an effect only if in `marker.color`is set to a numerical array. Value should have the same units as in `marker.color` and if set, `marker.cmax` must be set as well.", "dflt": null, - "editType": "calc", + "editType": "plot", "impliedEdits": { "cauto": false }, @@ -54295,7 +56813,7 @@ "color": { "arrayOk": true, "description": "Sets themarkercolor. It accepts either a specific color or an array of numbers that are mapped to the colorscale relative to the max and min values of the array or relative to `marker.cmin` and `marker.cmax` if set.", - "editType": "calc", + "editType": "style", "valType": "color" }, "coloraxis": { @@ -54309,25 +56827,25 @@ "_deprecated": { "title": { "description": "Deprecated in favor of color bar's `title.text`. Note that value of color bar's `title` is no longer a simple *string* but a set of sub-attributes.", - "editType": "calc", + "editType": "colorbars", "valType": "string" }, "titlefont": { "color": { - "editType": "calc", + "editType": "colorbars", "valType": "color" }, "description": "Deprecated in favor of color bar's `title.font`.", - "editType": "calc", + "editType": "colorbars", "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", + "editType": "colorbars", "noBlank": true, "strict": true, "valType": "string" }, "size": { - "editType": "calc", + "editType": "colorbars", "min": 1, "valType": "number" } @@ -54335,7 +56853,7 @@ "titleside": { "description": "Deprecated in favor of color bar's `title.side`.", "dflt": "top", - "editType": "calc", + "editType": "colorbars", "valType": "enumerated", "values": [ "right", @@ -54347,35 +56865,35 @@ "bgcolor": { "description": "Sets the color of padded area.", "dflt": "rgba(0,0,0,0)", - "editType": "calc", + "editType": "colorbars", "valType": "color" }, "bordercolor": { "description": "Sets the axis line color.", "dflt": "#444", - "editType": "calc", + "editType": "colorbars", "valType": "color" }, "borderwidth": { "description": "Sets the width (in px) or the border enclosing this color bar.", "dflt": 0, - "editType": "calc", + "editType": "colorbars", "min": 0, "valType": "number" }, "dtick": { "description": "Sets the step in-between ticks on this axis. Use with `tick0`. Must be a positive number, or special strings available to *log* and *date* axes. If the axis `type` is *log*, then ticks are set every 10^(n*dtick) where n is the tick number. For example, to set a tick mark at 1, 10, 100, 1000, ... set dtick to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to log_10(5), or 0.69897000433. *log* has several special values; *L*, where `f` is a positive number, gives ticks linearly spaced in value (but not position). For example `tick0` = 0.1, `dtick` = *L0.5* will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus small digits between, use *D1* (all digits) or *D2* (only 2 and 5). `tick0` is ignored for *D1* and *D2*. If the axis `type` is *date*, then you must convert the time to milliseconds. For example, to set the interval between ticks to one day, set `dtick` to 86400000.0. *date* also has special values *M* gives ticks spaced by a number of months. `n` must be a positive integer. To set ticks on the 15th of every third month, set `tick0` to *2000-01-15* and `dtick` to *M3*. To set ticks every 4 years, set `dtick` to *M48*", - "editType": "calc", + "editType": "colorbars", "impliedEdits": { "tickmode": "linear" }, "valType": "any" }, - "editType": "calc", + "editType": "colorbars", "exponentformat": { "description": "Determines a formatting rule for the tick exponents. For example, consider the number 1,000,000,000. If *none*, it appears as 1,000,000,000. If *e*, 1e+9. If *E*, 1E+9. If *power*, 1x10^9 (with 9 in a super script). If *SI*, 1G. If *B*, 1B.", "dflt": "B", - "editType": "calc", + "editType": "colorbars", "valType": "enumerated", "values": [ "none", @@ -54389,14 +56907,14 @@ "len": { "description": "Sets the length of the color bar This measure excludes the padding of both ends. That is, the color bar length is this length minus the padding on both ends.", "dflt": 1, - "editType": "calc", + "editType": "colorbars", "min": 0, "valType": "number" }, "lenmode": { "description": "Determines whether this color bar's length (i.e. the measure in the color variation direction) is set in units of plot *fraction* or in *pixels. Use `len` to set the value.", "dflt": "fraction", - "editType": "calc", + "editType": "colorbars", "valType": "enumerated", "values": [ "fraction", @@ -54406,27 +56924,27 @@ "minexponent": { "description": "Hide SI prefix for 10^n if |n| is below this number. This only has an effect when `tickformat` is *SI* or *B*.", "dflt": 3, - "editType": "calc", + "editType": "colorbars", "min": 0, "valType": "number" }, "nticks": { "description": "Specifies the maximum number of ticks for the particular axis. The actual number of ticks will be chosen automatically to be less than or equal to `nticks`. Has an effect only if `tickmode` is set to *auto*.", "dflt": 0, - "editType": "calc", + "editType": "colorbars", "min": 0, "valType": "integer" }, "outlinecolor": { "description": "Sets the axis line color.", "dflt": "#444", - "editType": "calc", + "editType": "colorbars", "valType": "color" }, "outlinewidth": { "description": "Sets the width (in px) of the axis line.", "dflt": 1, - "editType": "calc", + "editType": "colorbars", "min": 0, "valType": "number" }, @@ -54434,13 +56952,13 @@ "separatethousands": { "description": "If \"true\", even 4-digit integers are separated", "dflt": false, - "editType": "calc", + "editType": "colorbars", "valType": "boolean" }, "showexponent": { "description": "If *all*, all exponents are shown besides their significands. If *first*, only the exponent of the first tick is shown. If *last*, only the exponent of the last tick is shown. If *none*, no exponents appear.", "dflt": "all", - "editType": "calc", + "editType": "colorbars", "valType": "enumerated", "values": [ "all", @@ -54452,13 +56970,13 @@ "showticklabels": { "description": "Determines whether or not the tick labels are drawn.", "dflt": true, - "editType": "calc", + "editType": "colorbars", "valType": "boolean" }, "showtickprefix": { "description": "If *all*, all tick labels are displayed with a prefix. If *first*, only the first tick is displayed with a prefix. If *last*, only the last tick is displayed with a suffix. If *none*, tick prefixes are hidden.", "dflt": "all", - "editType": "calc", + "editType": "colorbars", "valType": "enumerated", "values": [ "all", @@ -54470,7 +56988,7 @@ "showticksuffix": { "description": "Same as `showtickprefix` but for tick suffixes.", "dflt": "all", - "editType": "calc", + "editType": "colorbars", "valType": "enumerated", "values": [ "all", @@ -54482,14 +57000,14 @@ "thickness": { "description": "Sets the thickness of the color bar This measure excludes the size of the padding, ticks and labels.", "dflt": 30, - "editType": "calc", + "editType": "colorbars", "min": 0, "valType": "number" }, "thicknessmode": { "description": "Determines whether this color bar's thickness (i.e. the measure in the constant color direction) is set in units of plot *fraction* or in *pixels*. Use `thickness` to set the value.", "dflt": "pixels", - "editType": "calc", + "editType": "colorbars", "valType": "enumerated", "values": [ "fraction", @@ -54498,7 +57016,7 @@ }, "tick0": { "description": "Sets the placement of the first tick on this axis. Use with `dtick`. If the axis `type` is *log*, then you must take the log of your starting tick (e.g. to set the starting tick to 100, set the `tick0` to 2) except when `dtick`=*L* (see `dtick` for more info). If the axis `type` is *date*, it should be a date string, like date data. If the axis `type` is *category*, it should be a number, using the scale where each category is assigned a serial number from zero in the order it appears.", - "editType": "calc", + "editType": "colorbars", "impliedEdits": { "tickmode": "linear" }, @@ -54507,32 +57025,32 @@ "tickangle": { "description": "Sets the angle of the tick labels with respect to the horizontal. For example, a `tickangle` of -90 draws the tick labels vertically.", "dflt": "auto", - "editType": "calc", + "editType": "colorbars", "valType": "angle" }, "tickcolor": { "description": "Sets the tick color.", "dflt": "#444", - "editType": "calc", + "editType": "colorbars", "valType": "color" }, "tickfont": { "color": { - "editType": "calc", + "editType": "colorbars", "valType": "color" }, "description": "Sets the color bar's tick label font", - "editType": "calc", + "editType": "colorbars", "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", + "editType": "colorbars", "noBlank": true, "strict": true, "valType": "string" }, "role": "object", "size": { - "editType": "calc", + "editType": "colorbars", "min": 1, "valType": "number" } @@ -54540,7 +57058,7 @@ "tickformat": { "description": "Sets the tick label formatting rule using d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format. We add two items to d3's date formatter: *%h* for half of the year as a decimal number as well as *%{n}f* for fractional seconds with n digits. For example, *2016-10-13 09:15:23.456* with tickformat *%H~%M~%S.%2f* would display *09~15~23.46*", "dflt": "", - "editType": "calc", + "editType": "colorbars", "valType": "string" }, "tickformatstops": { @@ -54548,41 +57066,41 @@ "tickformatstop": { "dtickrange": { "description": "range [*min*, *max*], where *min*, *max* - dtick values which describe some zoom level, it is possible to omit *min* or *max* value by passing *null*", - "editType": "calc", + "editType": "colorbars", "items": [ { - "editType": "calc", + "editType": "colorbars", "valType": "any" }, { - "editType": "calc", + "editType": "colorbars", "valType": "any" } ], "valType": "info_array" }, - "editType": "calc", + "editType": "colorbars", "enabled": { "description": "Determines whether or not this stop is used. If `false`, this stop is ignored even within its `dtickrange`.", "dflt": true, - "editType": "calc", + "editType": "colorbars", "valType": "boolean" }, "name": { "description": "When used in a template, named items are created in the output figure in addition to any items the figure already has in this array. You can modify these items in the output figure by making your own item with `templateitemname` matching this `name` alongside your modifications (including `visible: false` or `enabled: false` to hide it). Has no effect outside of a template.", - "editType": "calc", + "editType": "colorbars", "valType": "string" }, "role": "object", "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", + "editType": "colorbars", "valType": "string" }, "value": { "description": "string - dtickformat for described zoom level, the same as *tickformat*", "dflt": "", - "editType": "calc", + "editType": "colorbars", "valType": "string" } } @@ -54591,7 +57109,7 @@ }, "ticklabeloverflow": { "description": "Determines how we handle tick labels that would overflow either the graph div or the domain of the axis. The default value for inside tick labels is *hide past domain*. In other cases the default is *hide past div*.", - "editType": "calc", + "editType": "colorbars", "valType": "enumerated", "values": [ "allow", @@ -54602,7 +57120,7 @@ "ticklabelposition": { "description": "Determines where tick labels are drawn.", "dflt": "outside", - "editType": "calc", + "editType": "colorbars", "valType": "enumerated", "values": [ "outside", @@ -54616,13 +57134,13 @@ "ticklen": { "description": "Sets the tick length (in px).", "dflt": 5, - "editType": "calc", + "editType": "colorbars", "min": 0, "valType": "number" }, "tickmode": { "description": "Sets the tick mode for this axis. If *auto*, the number of ticks is set via `nticks`. If *linear*, the placement of the ticks is determined by a starting position `tick0` and a tick step `dtick` (*linear* is the default value if `tick0` and `dtick` are provided). If *array*, the placement of the ticks is set via `tickvals` and the tick text is `ticktext`. (*array* is the default value if `tickvals` is provided).", - "editType": "calc", + "editType": "colorbars", "impliedEdits": {}, "valType": "enumerated", "values": [ @@ -54634,13 +57152,13 @@ "tickprefix": { "description": "Sets a tick label prefix.", "dflt": "", - "editType": "calc", + "editType": "colorbars", "valType": "string" }, "ticks": { "description": "Determines whether ticks are drawn or not. If **, this axis' ticks are not drawn. If *outside* (*inside*), this axis' are drawn outside (inside) the axis lines.", "dflt": "", - "editType": "calc", + "editType": "colorbars", "valType": "enumerated", "values": [ "outside", @@ -54651,12 +57169,12 @@ "ticksuffix": { "description": "Sets a tick label suffix.", "dflt": "", - "editType": "calc", + "editType": "colorbars", "valType": "string" }, "ticktext": { "description": "Sets the text displayed at the ticks position via `tickvals`. Only has an effect if `tickmode` is set to *array*. Used with `tickvals`.", - "editType": "calc", + "editType": "colorbars", "valType": "data_array" }, "ticktextsrc": { @@ -54666,7 +57184,7 @@ }, "tickvals": { "description": "Sets the values at which ticks on this axis appear. Only has an effect if `tickmode` is set to *array*. Used with `ticktext`.", - "editType": "calc", + "editType": "colorbars", "valType": "data_array" }, "tickvalssrc": { @@ -54677,29 +57195,29 @@ "tickwidth": { "description": "Sets the tick width (in px).", "dflt": 1, - "editType": "calc", + "editType": "colorbars", "min": 0, "valType": "number" }, "title": { - "editType": "calc", + "editType": "colorbars", "font": { "color": { - "editType": "calc", + "editType": "colorbars", "valType": "color" }, "description": "Sets this color bar's title font. Note that the title's font used to be set by the now deprecated `titlefont` attribute.", - "editType": "calc", + "editType": "colorbars", "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", + "editType": "colorbars", "noBlank": true, "strict": true, "valType": "string" }, "role": "object", "size": { - "editType": "calc", + "editType": "colorbars", "min": 1, "valType": "number" } @@ -54708,7 +57226,7 @@ "side": { "description": "Determines the location of color bar's title with respect to the color bar. Note that the title's location used to be set by the now deprecated `titleside` attribute.", "dflt": "top", - "editType": "calc", + "editType": "colorbars", "valType": "enumerated", "values": [ "right", @@ -54718,14 +57236,14 @@ }, "text": { "description": "Sets the title of the color bar. Note that before the existence of `title.text`, the title's contents used to be defined as the `title` attribute itself. This behavior has been deprecated.", - "editType": "calc", + "editType": "colorbars", "valType": "string" } }, "x": { "description": "Sets the x position of the color bar (in plot fraction).", "dflt": 1.02, - "editType": "calc", + "editType": "colorbars", "max": 3, "min": -2, "valType": "number" @@ -54733,7 +57251,7 @@ "xanchor": { "description": "Sets this color bar's horizontal position anchor. This anchor binds the `x` position to the *left*, *center* or *right* of the color bar.", "dflt": "left", - "editType": "calc", + "editType": "colorbars", "valType": "enumerated", "values": [ "left", @@ -54744,14 +57262,14 @@ "xpad": { "description": "Sets the amount of padding (in px) along the x direction.", "dflt": 10, - "editType": "calc", + "editType": "colorbars", "min": 0, "valType": "number" }, "y": { "description": "Sets the y position of the color bar (in plot fraction).", "dflt": 0.5, - "editType": "calc", + "editType": "colorbars", "max": 3, "min": -2, "valType": "number" @@ -54759,7 +57277,7 @@ "yanchor": { "description": "Sets this color bar's vertical position anchor This anchor binds the `y` position to the *top*, *middle* or *bottom* of the color bar.", "dflt": "middle", - "editType": "calc", + "editType": "colorbars", "valType": "enumerated", "values": [ "top", @@ -54770,7 +57288,7 @@ "ypad": { "description": "Sets the amount of padding (in px) along the y direction.", "dflt": 10, - "editType": "calc", + "editType": "colorbars", "min": 0, "valType": "number" } @@ -54790,6 +57308,39 @@ "valType": "string" }, "editType": "calc", + "gradient": { + "color": { + "arrayOk": true, + "description": "Sets the final color of the gradient fill: the center color for radial, the right for horizontal, or the bottom for vertical.", + "editType": "calc", + "valType": "color" + }, + "colorsrc": { + "description": "Sets the source reference on Chart Studio Cloud for color .", + "editType": "none", + "valType": "string" + }, + "editType": "calc", + "role": "object", + "type": { + "arrayOk": true, + "description": "Sets the type of gradient used to fill the markers", + "dflt": "none", + "editType": "calc", + "valType": "enumerated", + "values": [ + "radial", + "horizontal", + "vertical", + "none" + ] + }, + "typesrc": { + "description": "Sets the source reference on Chart Studio Cloud for type .", + "editType": "none", + "valType": "string" + } + }, "line": { "autocolorscale": { "description": "Determines whether the colorscale is a default palette (`autocolorscale: true`) or the palette determined by `marker.line.colorscale`. Has an effect only if in `marker.line.color`is set to a numerical array. In case `colorscale` is unspecified or `autocolorscale` is true, the default palette will be chosen according to whether numbers in the `color` array are all positive, all negative or mixed.", @@ -54808,7 +57359,7 @@ "cmax": { "description": "Sets the upper bound of the color domain. Has an effect only if in `marker.line.color`is set to a numerical array. Value should have the same units as in `marker.line.color` and if set, `marker.line.cmin` must be set as well.", "dflt": null, - "editType": "calc", + "editType": "plot", "impliedEdits": { "cauto": false }, @@ -54824,7 +57375,7 @@ "cmin": { "description": "Sets the lower bound of the color domain. Has an effect only if in `marker.line.color`is set to a numerical array. Value should have the same units as in `marker.line.color` and if set, `marker.line.cmax` must be set as well.", "dflt": null, - "editType": "calc", + "editType": "plot", "impliedEdits": { "cauto": false }, @@ -54833,7 +57384,7 @@ "color": { "arrayOk": true, "description": "Sets themarker.linecolor. It accepts either a specific color or an array of numbers that are mapped to the colorscale relative to the max and min values of the array or relative to `marker.line.cmin` and `marker.line.cmax` if set.", - "editType": "calc", + "editType": "style", "valType": "color" }, "coloraxis": { @@ -54861,14 +57412,14 @@ "reversescale": { "description": "Reverses the color mapping if true. Has an effect only if in `marker.line.color`is set to a numerical array. If true, `marker.line.cmin` will correspond to the last color in the array and `marker.line.cmax` will correspond to the first color.", "dflt": false, - "editType": "calc", + "editType": "plot", "valType": "boolean" }, "role": "object", "width": { "arrayOk": true, "description": "Sets the width (in px) of the lines bounding the marker points.", - "editType": "calc", + "editType": "style", "min": 0, "valType": "number" }, @@ -54878,10 +57429,17 @@ "valType": "string" } }, + "maxdisplayed": { + "description": "Sets a maximum number of points to be drawn on the graph. *0* corresponds to no limit.", + "dflt": 0, + "editType": "plot", + "min": 0, + "valType": "number" + }, "opacity": { "arrayOk": true, "description": "Sets the marker opacity.", - "editType": "calc", + "editType": "style", "max": 1, "min": 0, "valType": "number" @@ -54894,7 +57452,7 @@ "reversescale": { "description": "Reverses the color mapping if true. Has an effect only if in `marker.color`is set to a numerical array. If true, `marker.cmin` will correspond to the last color in the array and `marker.cmax` will correspond to the first color.", "dflt": false, - "editType": "calc", + "editType": "plot", "valType": "boolean" }, "role": "object", @@ -54944,7 +57502,7 @@ "arrayOk": true, "description": "Sets the marker symbol type. Adding 100 is equivalent to appending *-open* to a symbol name. Adding 200 is equivalent to appending *-dot* to a symbol name. Adding 300 is equivalent to appending *-open-dot* or *dot-open* to a symbol name.", "dflt": "circle", - "editType": "calc", + "editType": "style", "valType": "enumerated", "values": [ 0, @@ -55466,19 +58024,13 @@ "min": 0, "valType": "number" }, - "r": { - "description": "Sets the radial coordinates", + "re": { + "description": "Sets the real coordinates", "editType": "calc+clearAxisTypes", "valType": "data_array" }, - "r0": { - "description": "Alternate to `r`. Builds a linear space of r coordinates. Use with `dr` where `r0` is the starting coordinate and `dr` the step.", - "dflt": 0, - "editType": "calc+clearAxisTypes", - "valType": "any" - }, - "rsrc": { - "description": "Sets the source reference on Chart Studio Cloud for r .", + "resrc": { + "description": "Sets the source reference on Chart Studio Cloud for re .", "editType": "none", "valType": "string" }, @@ -55548,8 +58100,8 @@ } }, "subplot": { - "description": "Sets a reference between this trace's data coordinates and a polar subplot. If *polar* (the default value), the data refer to `layout.polar`. If *polar2*, the data refer to `layout.polar2`, and so on.", - "dflt": "polar", + "description": "Sets a reference between this trace's data coordinates and a smith subplot. If *smith* (the default value), the data refer to `layout.smith`. If *smith2*, the data refer to `layout.smith2`, and so on.", + "dflt": "smith", "editType": "calc", "valType": "subplotid" }, @@ -55563,7 +58115,7 @@ "textfont": { "color": { "arrayOk": true, - "editType": "calc", + "editType": "style", "valType": "color" }, "colorsrc": { @@ -55629,7 +58181,7 @@ }, "texttemplate": { "arrayOk": true, - "description": "Template string used for rendering the information text that appear on points. Note that this will override `textinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format for details on the date formatting syntax. Every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. variables `r`, `theta` and `text`.", + "description": "Template string used for rendering the information text that appear on points. Note that this will override `textinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\". Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format for details on the date formatting syntax. Every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. variables `re`, `im` and `text`.", "dflt": "", "editType": "plot", "valType": "string" @@ -55639,33 +58191,6 @@ "editType": "none", "valType": "string" }, - "theta": { - "description": "Sets the angular coordinates", - "editType": "calc+clearAxisTypes", - "valType": "data_array" - }, - "theta0": { - "description": "Alternate to `theta`. Builds a linear space of theta coordinates. Use with `dtheta` where `theta0` is the starting coordinate and `dtheta` the step.", - "dflt": 0, - "editType": "calc+clearAxisTypes", - "valType": "any" - }, - "thetasrc": { - "description": "Sets the source reference on Chart Studio Cloud for theta .", - "editType": "none", - "valType": "string" - }, - "thetaunit": { - "description": "Sets the unit of input *theta* values. Has an effect only when on *linear* angular axes.", - "dflt": "degrees", - "editType": "calc+clearAxisTypes", - "valType": "enumerated", - "values": [ - "radians", - "degrees", - "gradians" - ] - }, "transforms": { "items": { "transform": { @@ -55676,7 +58201,7 @@ }, "role": "object" }, - "type": "scatterpolargl", + "type": "scattersmith", "uid": { "description": "Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.", "editType": "plot", @@ -55735,18 +58260,15 @@ } }, "categories": [ - "gl", - "regl", - "polar", "symbols", "showLegend", "scatter-like" ], "meta": { - "description": "The scatterpolargl trace type encompasses line charts, scatter charts, and bubble charts in polar coordinates using the WebGL plotting engine. The data visualized as scatter point or lines is set in `r` (radial) and `theta` (angular) coordinates Bubble charts are achieved by setting `marker.size` and/or `marker.color` to numerical arrays.", - "hrName": "scatter_polar_gl" + "description": "The scattersmith trace type encompasses line charts, scatter charts, text charts, and bubble charts in smith chart coordinates. The data visualized as scatter point or lines is set in `re` (real) and `im` (imaginary) coordinates Text (appearing either on the chart or on hover only) is via `text`. Bubble charts are achieved by setting `marker.size` and/or `marker.color` to numerical arrays.", + "hrName": "scatter_smith" }, - "type": "scatterpolargl" + "type": "scattersmith" }, "scatterternary": { "animatable": false,