diff --git a/draftlogs/6601_add.md b/draftlogs/6601_add.md index 9a3e90c2687..6a58a619fb1 100644 --- a/draftlogs/6601_add.md +++ b/draftlogs/6601_add.md @@ -1,2 +1,2 @@ -- add pattern to pie and funnelarea traces [[#6601](https://github.com/plotly/plotly.js/pull/6601), [#6619](https://github.com/plotly/plotly.js/pull/6619)], +- add pattern to pie, funnelarea, sunburst, icicle and treemap traces [[#6601](https://github.com/plotly/plotly.js/pull/6601), [#6619](https://github.com/plotly/plotly.js/pull/6619), [#6622](https://github.com/plotly/plotly.js/pull/6622), [#6626](https://github.com/plotly/plotly.js/pull/6626)], with thanks to @thierryVergult for the contribution! diff --git a/draftlogs/6622_add.md b/draftlogs/6622_add.md deleted file mode 100644 index b60684333f7..00000000000 --- a/draftlogs/6622_add.md +++ /dev/null @@ -1 +0,0 @@ -add pattern to sunburst trace type [[#6622](https://github.com/plotly/plotly.js/pull/6622)] \ No newline at end of file diff --git a/src/traces/funnelarea/defaults.js b/src/traces/funnelarea/defaults.js index a44975321aa..6ce2a86bab9 100644 --- a/src/traces/funnelarea/defaults.js +++ b/src/traces/funnelarea/defaults.js @@ -33,7 +33,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout } traceOut._length = len; - handleMarkerDefaults(traceIn, traceOut, layout, coerce, 'funnelarea'); + handleMarkerDefaults(traceIn, traceOut, layout, coerce); coerce('scalegroup'); diff --git a/src/traces/icicle/attributes.js b/src/traces/icicle/attributes.js index abb5f117d85..9fc1f239cf0 100644 --- a/src/traces/icicle/attributes.js +++ b/src/traces/icicle/attributes.js @@ -10,6 +10,7 @@ var sunburstAttrs = require('../sunburst/attributes'); var treemapAttrs = require('../treemap/attributes'); var constants = require('../treemap/constants'); var extendFlat = require('../../lib/extend').extendFlat; +var pattern = require('../../components/drawing/attributes').pattern; module.exports = { labels: sunburstAttrs.labels, @@ -61,6 +62,8 @@ module.exports = { line: sunburstAttrs.marker.line, + pattern: pattern, + editType: 'calc' }, colorScaleAttrs('marker', { diff --git a/src/traces/icicle/defaults.js b/src/traces/icicle/defaults.js index a549f1eac6e..f98322e661f 100644 --- a/src/traces/icicle/defaults.js +++ b/src/traces/icicle/defaults.js @@ -6,6 +6,7 @@ var Color = require('../../components/color'); var handleDomainDefaults = require('../../plots/domain').defaults; var handleText = require('../bar/defaults').handleText; var TEXTPAD = require('../bar/constants').TEXTPAD; +var handleMarkerDefaults = require('../pie/defaults').handleMarkerDefaults; var Colorscale = require('../../components/colorscale'); var hasColorscale = Colorscale.hasColorscale; @@ -59,10 +60,8 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout }); coerce('textposition'); - var lineWidth = coerce('marker.line.width'); - if(lineWidth) coerce('marker.line.color', layout.paper_bgcolor); + handleMarkerDefaults(traceIn, traceOut, layout, coerce); - coerce('marker.colors'); var withColorscale = traceOut._hasColorscale = ( hasColorscale(traceIn, 'marker', 'colors') || (traceIn.marker || {}).coloraxis // N.B. special logic to consider "values" colorscales diff --git a/src/traces/icicle/draw_descendants.js b/src/traces/icicle/draw_descendants.js index 2fba2e8f99d..75b4bba7453 100644 --- a/src/traces/icicle/draw_descendants.js +++ b/src/traces/icicle/draw_descendants.js @@ -163,7 +163,7 @@ module.exports = function drawDescendants(gd, cd, entry, slices, opts) { }) .call(helpers.setSliceCursor, gd, { isTransitioning: gd._transitioning }); - slicePath.call(styleOne, pt, trace, { + slicePath.call(styleOne, pt, trace, gd, { hovered: false }); diff --git a/src/traces/icicle/style.js b/src/traces/icicle/style.js index d4c429df953..dd5b6f2a89f 100644 --- a/src/traces/icicle/style.js +++ b/src/traces/icicle/style.js @@ -4,6 +4,7 @@ var d3 = require('@plotly/d3'); var Color = require('../../components/color'); var Lib = require('../../lib'); var resizeText = require('../bar/uniform_text').resizeText; +var fillOne = require('../sunburst/fill_one'); function style(gd) { var s = gd._fullLayout._iciclelayer.selectAll('.trace'); @@ -17,20 +18,20 @@ function style(gd) { gTrace.style('opacity', trace.opacity); gTrace.selectAll('path.surface').each(function(pt) { - d3.select(this).call(styleOne, pt, trace); + d3.select(this).call(styleOne, pt, trace, gd); }); }); } -function styleOne(s, pt, trace) { +function styleOne(s, pt, trace, gd) { var cdi = pt.data.data; var isLeaf = !pt.children; var ptNumber = cdi.i; var lineColor = Lib.castOption(trace, ptNumber, 'marker.line.color') || Color.defaultLine; var lineWidth = Lib.castOption(trace, ptNumber, 'marker.line.width') || 0; - s.style('stroke-width', lineWidth) - .call(Color.fill, cdi.color) + s.call(fillOne, pt, trace, gd) + .style('stroke-width', lineWidth) .call(Color.stroke, lineColor) .style('opacity', isLeaf ? trace.leaf.opacity : null); } diff --git a/src/traces/pie/defaults.js b/src/traces/pie/defaults.js index 495baee37af..98228a8a86e 100644 --- a/src/traces/pie/defaults.js +++ b/src/traces/pie/defaults.js @@ -36,9 +36,14 @@ function handleLabelsAndValues(labels, values) { }; } -function handleMarkerDefaults(traceIn, traceOut, layout, coerce, isFunnelarea) { +function handleMarkerDefaults(traceIn, traceOut, layout, coerce, isPie) { var lineWidth = coerce('marker.line.width'); - if(lineWidth) coerce('marker.line.color', isFunnelarea ? layout.paper_bgcolor : undefined); + if(lineWidth) { + coerce('marker.line.color', + isPie ? undefined : + layout.paper_bgcolor // case of funnelarea, sunburst, icicle, treemap + ); + } var markerColors = coerce('marker.colors'); coercePattern(coerce, 'marker.pattern', markerColors); @@ -73,7 +78,7 @@ function supplyDefaults(traceIn, traceOut, defaultColor, layout) { } traceOut._length = len; - handleMarkerDefaults(traceIn, traceOut, layout, coerce); + handleMarkerDefaults(traceIn, traceOut, layout, coerce, true); coerce('scalegroup'); // TODO: hole needs to be coerced to the same value within a scaleegroup diff --git a/src/traces/pie/fill_one.js b/src/traces/pie/fill_one.js new file mode 100644 index 00000000000..8b2b664f19e --- /dev/null +++ b/src/traces/pie/fill_one.js @@ -0,0 +1,16 @@ +'use strict'; + +var Drawing = require('../../components/drawing'); + +module.exports = function fillOne(s, pt, trace, gd) { + // enforce the point color, when colors (with s) & the pattern shape are missing. + // 'abuse' the color attribute, used in the Drawing component for bar trace type. + var marker = trace.marker; + if(marker.pattern) { + if(!marker.colors || !marker.pattern.shape) marker.color = pt.color; + } else { + marker.color = pt.color; + } + + Drawing.pointStyle(s, trace, gd, pt); +}; diff --git a/src/traces/pie/style_one.js b/src/traces/pie/style_one.js index 139046ccc1e..03f19a95cae 100644 --- a/src/traces/pie/style_one.js +++ b/src/traces/pie/style_one.js @@ -2,7 +2,7 @@ var Color = require('../../components/color'); var castOption = require('./helpers').castOption; -var Drawing = require('../../components/drawing'); +var fillOne = require('./fill_one'); module.exports = function styleOne(s, pt, trace, gd) { var line = trace.marker.line; @@ -18,8 +18,7 @@ module.exports = function styleOne(s, pt, trace, gd) { marker.color = pt.color; } - Drawing.pointStyle(s, trace, gd, pt); - - s.style('stroke-width', lineWidth) + s.call(fillOne, pt, trace, gd) + .style('stroke-width', lineWidth) .call(Color.stroke, lineColor); }; diff --git a/src/traces/sunburst/defaults.js b/src/traces/sunburst/defaults.js index 330aba75a54..82b43f2c95a 100644 --- a/src/traces/sunburst/defaults.js +++ b/src/traces/sunburst/defaults.js @@ -33,7 +33,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout coerce('level'); coerce('maxdepth'); - handleMarkerDefaults(traceIn, traceOut, layout, coerce, 'sunburst'); + handleMarkerDefaults(traceIn, traceOut, layout, coerce); var withColorscale = traceOut._hasColorscale = ( hasColorscale(traceIn, 'marker', 'colors') || diff --git a/src/traces/sunburst/fill_one.js b/src/traces/sunburst/fill_one.js new file mode 100644 index 00000000000..70a18362770 --- /dev/null +++ b/src/traces/sunburst/fill_one.js @@ -0,0 +1,26 @@ +'use strict'; + +var Drawing = require('../../components/drawing'); +var Color = require('../../components/color'); + +module.exports = function fillOne(s, pt, trace, gd, fadedColor) { + var cdi = pt.data.data; + var ptNumber = cdi.i; + + var color = fadedColor || cdi.color; + + if(gd && ptNumber >= 0) { + pt.i = cdi.i; + + var marker = trace.marker; + if(marker.pattern) { + if(!marker.colors || !marker.pattern.shape) marker.color = color; + } else { + marker.color = color; + } + + Drawing.pointStyle(s, trace, gd, pt); + } else { + Color.fill(s, color); + } +}; diff --git a/src/traces/sunburst/fx.js b/src/traces/sunburst/fx.js index 931541b3929..78321364105 100644 --- a/src/traces/sunburst/fx.js +++ b/src/traces/sunburst/fx.js @@ -174,7 +174,7 @@ module.exports = function attachFxHandlers(sliceTop, entry, gd, cd, opts) { if(isTreemapOrIcicle) { var slice = sliceTop.select('path.surface'); - opts.styleOne(slice, pt, traceNow, { + opts.styleOne(slice, pt, traceNow, gd, { hovered: true }); } @@ -207,7 +207,7 @@ module.exports = function attachFxHandlers(sliceTop, entry, gd, cd, opts) { if(isTreemapOrIcicle) { var slice = sliceTop.select('path.surface'); - opts.styleOne(slice, pt, traceNow, { + opts.styleOne(slice, pt, traceNow, gd, { hovered: false }); } diff --git a/src/traces/sunburst/style.js b/src/traces/sunburst/style.js index 2e5d73fd67c..0b20741f9c7 100644 --- a/src/traces/sunburst/style.js +++ b/src/traces/sunburst/style.js @@ -4,7 +4,7 @@ var d3 = require('@plotly/d3'); var Color = require('../../components/color'); var Lib = require('../../lib'); var resizeText = require('../bar/uniform_text').resizeText; -var Drawing = require('../../components/drawing'); +var fillOne = require('./fill_one'); function style(gd) { var s = gd._fullLayout._sunburstlayer.selectAll('.trace'); @@ -30,22 +30,8 @@ function styleOne(s, pt, trace, gd) { var lineColor = Lib.castOption(trace, ptNumber, 'marker.line.color') || Color.defaultLine; var lineWidth = Lib.castOption(trace, ptNumber, 'marker.line.width') || 0; - if(gd && ptNumber >= 0) { - pt.i = cdi.i; - - var marker = trace.marker; - if(marker.pattern) { - if(!marker.colors || !marker.pattern.shape) marker.color = cdi.color; - } else { - marker.color = cdi.color; - } - - Drawing.pointStyle(s, trace, gd, pt); - } else { - Color.fill(s, cdi.color); - } - - s.style('stroke-width', lineWidth) + s.call(fillOne, pt, trace, gd) + .style('stroke-width', lineWidth) .call(Color.stroke, lineColor) .style('opacity', isLeaf ? trace.leaf.opacity : null); } diff --git a/src/traces/treemap/attributes.js b/src/traces/treemap/attributes.js index 47ac4e541aa..cc23edbb184 100644 --- a/src/traces/treemap/attributes.js +++ b/src/traces/treemap/attributes.js @@ -9,6 +9,7 @@ var pieAttrs = require('../pie/attributes'); var sunburstAttrs = require('../sunburst/attributes'); var constants = require('./constants'); var extendFlat = require('../../lib/extend').extendFlat; +var pattern = require('../../components/drawing/attributes').pattern; module.exports = { labels: sunburstAttrs.labels, @@ -123,6 +124,8 @@ module.exports = { colors: sunburstAttrs.marker.colors, + pattern: pattern, + depthfade: { valType: 'enumerated', values: [true, false, 'reversed'], diff --git a/src/traces/treemap/defaults.js b/src/traces/treemap/defaults.js index 6c428979514..a9943f6ca43 100644 --- a/src/traces/treemap/defaults.js +++ b/src/traces/treemap/defaults.js @@ -6,6 +6,7 @@ var Color = require('../../components/color'); var handleDomainDefaults = require('../../plots/domain').defaults; var handleText = require('../bar/defaults').handleText; var TEXTPAD = require('../bar/constants').TEXTPAD; +var handleMarkerDefaults = require('../pie/defaults').handleMarkerDefaults; var Colorscale = require('../../components/colorscale'); var hasColorscale = Colorscale.hasColorscale; @@ -64,10 +65,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout coerce('textposition'); var bottomText = traceOut.textposition.indexOf('bottom') !== -1; - var lineWidth = coerce('marker.line.width'); - if(lineWidth) coerce('marker.line.color', layout.paper_bgcolor); - - var colors = coerce('marker.colors'); + handleMarkerDefaults(traceIn, traceOut, layout, coerce); var withColorscale = traceOut._hasColorscale = ( hasColorscale(traceIn, 'marker', 'colors') || (traceIn.marker || {}).coloraxis // N.B. special logic to consider "values" colorscales @@ -75,7 +73,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout if(withColorscale) { colorscaleDefaults(traceIn, traceOut, layout, coerce, {prefix: 'marker.', cLetter: 'c'}); } else { - coerce('marker.depthfade', !(colors || []).length); + coerce('marker.depthfade', !(traceOut.marker.colors || []).length); } var headerSize = traceOut.textfont.size * 2; diff --git a/src/traces/treemap/draw_ancestors.js b/src/traces/treemap/draw_ancestors.js index 5e61278552f..40f796cfc3d 100644 --- a/src/traces/treemap/draw_ancestors.js +++ b/src/traces/treemap/draw_ancestors.js @@ -128,7 +128,7 @@ module.exports = function drawAncestors(gd, cd, entry, slices, opts) { isTransitioning: gd._transitioning }); - slicePath.call(styleOne, pt, trace, { + slicePath.call(styleOne, pt, trace, gd, { hovered: false }); diff --git a/src/traces/treemap/draw_descendants.js b/src/traces/treemap/draw_descendants.js index 03ce6ebb380..32c20344a62 100644 --- a/src/traces/treemap/draw_descendants.js +++ b/src/traces/treemap/draw_descendants.js @@ -161,7 +161,7 @@ module.exports = function drawDescendants(gd, cd, entry, slices, opts) { }) .call(helpers.setSliceCursor, gd, { isTransitioning: gd._transitioning }); - slicePath.call(styleOne, pt, trace, { + slicePath.call(styleOne, pt, trace, gd, { hovered: false }); diff --git a/src/traces/treemap/style.js b/src/traces/treemap/style.js index 86a18b083cc..0fd7ddb5b2e 100644 --- a/src/traces/treemap/style.js +++ b/src/traces/treemap/style.js @@ -5,6 +5,7 @@ var Color = require('../../components/color'); var Lib = require('../../lib'); var helpers = require('../sunburst/helpers'); var resizeText = require('../bar/uniform_text').resizeText; +var fillOne = require('../sunburst/fill_one'); function style(gd) { var s = gd._fullLayout._treemaplayer.selectAll('.trace'); @@ -18,14 +19,14 @@ function style(gd) { gTrace.style('opacity', trace.opacity); gTrace.selectAll('path.surface').each(function(pt) { - d3.select(this).call(styleOne, pt, trace, { + d3.select(this).call(styleOne, pt, trace, gd, { hovered: false }); }); }); } -function styleOne(s, pt, trace, opts) { +function styleOne(s, pt, trace, gd, opts) { var hovered = (opts || {}).hovered; var cdi = pt.data.data; var ptNumber = cdi.i; @@ -80,8 +81,8 @@ function styleOne(s, pt, trace, opts) { } } - s.style('stroke-width', lineWidth) - .call(Color.fill, fillColor) + s.call(fillOne, pt, trace, gd, fillColor) + .style('stroke-width', lineWidth) .call(Color.stroke, lineColor) .style('opacity', opacity); } diff --git a/test/image/baselines/zz-sunburst_pattern.png b/test/image/baselines/zz-sunburst_pattern.png index 82af2d8741b..61aada3e563 100644 Binary files a/test/image/baselines/zz-sunburst_pattern.png and b/test/image/baselines/zz-sunburst_pattern.png differ diff --git a/test/image/mocks/zz-sunburst_pattern.json b/test/image/mocks/zz-sunburst_pattern.json index 98bb77a3e4f..4ed744d0d8a 100644 --- a/test/image/mocks/zz-sunburst_pattern.json +++ b/test/image/mocks/zz-sunburst_pattern.json @@ -1,13 +1,21 @@ { "data": [ { - "type": "sunburst", - "textinfo": "label", + "type": "icicle", + "textinfo": "none", "labels": ["Cain", "Seth", "Enos", "Noam", "Abel", "Awan", "Enoch", "Azura"], "parents": ["Eve", "Eve", "Seth", "Seth", "Eve", "Eve", "Awan", "Eve" ], - "domain": {"x": [0, 0.5]}, + "level": "Enoch", + "domain": {"x": [0, 0.3]}, "marker": { - "colors": [ "orange", "steelblue", "steelblue", "steelblue", "green", "red", "red", "purple"] + "colors": [ "orange", "steelblue", "lightgrey", "lightgrey", "green", "red", "lightgrey", "purple"], + "pattern": { + "shape": ".", + "size": 4 + }, + "line": { + "color": "lightgrey" + } } }, { @@ -15,7 +23,24 @@ "textinfo": "none", "labels": ["Cain", "Seth", "Enos", "Noam", "Abel", "Awan", "Enoch", "Azura"], "parents": ["Eve", "Eve", "Seth", "Seth", "Eve", "Eve", "Awan", "Eve" ], - "domain": {"x": [0.5, 1]}, + "domain": {"x": [0.35, 0.65]}, + "marker": { + "colors": [ "orange", "steelblue", "lightgrey", "lightgrey", "green", "red", "lightgrey", "purple"], + "pattern": { + "shape": ".", + "size": 4 + }, + "line": { + "color": "lightgrey" + } + } + }, + { + "type": "treemap", + "textinfo": "none", + "labels": ["Cain", "Seth", "Enos", "Noam", "Abel", "Awan", "Enoch", "Azura"], + "parents": ["Eve", "Eve", "Seth", "Seth", "Eve", "Eve", "Awan", "Eve" ], + "domain": {"x": [0.7, 1]}, "marker": { "colors": [ "orange", "steelblue", "lightgrey", "lightgrey", "green", "red", "lightgrey", "purple"], "pattern": { @@ -29,7 +54,7 @@ } ], "layout": { - "title": { "text": "sunburst with pattern"}, + "title": { "text": "icicle, sunburst & treemap with pattern"}, "width": 800, "height": 400 } diff --git a/test/plot-schema.json b/test/plot-schema.json index 23ea31a4b1c..ab6817cf377 100644 --- a/test/plot-schema.json +++ b/test/plot-schema.json @@ -35009,6 +35009,99 @@ "valType": "string" } }, + "pattern": { + "bgcolor": { + "arrayOk": true, + "description": "When there is no colorscale sets the color of background pattern fill. Defaults to a `marker.color` background when `fillmode` is *overlay*. Otherwise, defaults to a transparent background.", + "editType": "style", + "valType": "color" + }, + "bgcolorsrc": { + "description": "Sets the source reference on Chart Studio Cloud for `bgcolor`.", + "editType": "none", + "valType": "string" + }, + "description": "Sets the pattern within the marker.", + "editType": "style", + "fgcolor": { + "arrayOk": true, + "description": "When there is no colorscale sets the color of foreground pattern fill. Defaults to a `marker.color` background when `fillmode` is *replace*. Otherwise, defaults to dark grey or white to increase contrast with the `bgcolor`.", + "editType": "style", + "valType": "color" + }, + "fgcolorsrc": { + "description": "Sets the source reference on Chart Studio Cloud for `fgcolor`.", + "editType": "none", + "valType": "string" + }, + "fgopacity": { + "description": "Sets the opacity of the foreground pattern fill. Defaults to a 0.5 when `fillmode` is *overlay*. Otherwise, defaults to 1.", + "editType": "style", + "max": 1, + "min": 0, + "valType": "number" + }, + "fillmode": { + "description": "Determines whether `marker.color` should be used as a default to `bgcolor` or a `fgcolor`.", + "dflt": "replace", + "editType": "style", + "valType": "enumerated", + "values": [ + "replace", + "overlay" + ] + }, + "role": "object", + "shape": { + "arrayOk": true, + "description": "Sets the shape of the pattern fill. By default, no pattern is used for filling the area.", + "dflt": "", + "editType": "style", + "valType": "enumerated", + "values": [ + "", + "/", + "\\", + "x", + "-", + "|", + "+", + "." + ] + }, + "shapesrc": { + "description": "Sets the source reference on Chart Studio Cloud for `shape`.", + "editType": "none", + "valType": "string" + }, + "size": { + "arrayOk": true, + "description": "Sets the size of unit squares of the pattern fill in pixels, which corresponds to the interval of repetition of the pattern.", + "dflt": 8, + "editType": "style", + "min": 0, + "valType": "number" + }, + "sizesrc": { + "description": "Sets the source reference on Chart Studio Cloud for `size`.", + "editType": "none", + "valType": "string" + }, + "solidity": { + "arrayOk": true, + "description": "Sets the solidity of the pattern fill. Solidity is roughly the fraction of the area filled by the pattern. Solidity of 0 shows only the background color without pattern and solidty of 1 shows only the foreground color without pattern.", + "dflt": 0.3, + "editType": "style", + "max": 1, + "min": 0, + "valType": "number" + }, + "soliditysrc": { + "description": "Sets the source reference on Chart Studio Cloud for `solidity`.", + "editType": "none", + "valType": "string" + } + }, "reversescale": { "description": "Reverses the color mapping if true. Has an effect only if colors 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, @@ -70926,6 +71019,99 @@ "valType": "number" } }, + "pattern": { + "bgcolor": { + "arrayOk": true, + "description": "When there is no colorscale sets the color of background pattern fill. Defaults to a `marker.color` background when `fillmode` is *overlay*. Otherwise, defaults to a transparent background.", + "editType": "style", + "valType": "color" + }, + "bgcolorsrc": { + "description": "Sets the source reference on Chart Studio Cloud for `bgcolor`.", + "editType": "none", + "valType": "string" + }, + "description": "Sets the pattern within the marker.", + "editType": "style", + "fgcolor": { + "arrayOk": true, + "description": "When there is no colorscale sets the color of foreground pattern fill. Defaults to a `marker.color` background when `fillmode` is *replace*. Otherwise, defaults to dark grey or white to increase contrast with the `bgcolor`.", + "editType": "style", + "valType": "color" + }, + "fgcolorsrc": { + "description": "Sets the source reference on Chart Studio Cloud for `fgcolor`.", + "editType": "none", + "valType": "string" + }, + "fgopacity": { + "description": "Sets the opacity of the foreground pattern fill. Defaults to a 0.5 when `fillmode` is *overlay*. Otherwise, defaults to 1.", + "editType": "style", + "max": 1, + "min": 0, + "valType": "number" + }, + "fillmode": { + "description": "Determines whether `marker.color` should be used as a default to `bgcolor` or a `fgcolor`.", + "dflt": "replace", + "editType": "style", + "valType": "enumerated", + "values": [ + "replace", + "overlay" + ] + }, + "role": "object", + "shape": { + "arrayOk": true, + "description": "Sets the shape of the pattern fill. By default, no pattern is used for filling the area.", + "dflt": "", + "editType": "style", + "valType": "enumerated", + "values": [ + "", + "/", + "\\", + "x", + "-", + "|", + "+", + "." + ] + }, + "shapesrc": { + "description": "Sets the source reference on Chart Studio Cloud for `shape`.", + "editType": "none", + "valType": "string" + }, + "size": { + "arrayOk": true, + "description": "Sets the size of unit squares of the pattern fill in pixels, which corresponds to the interval of repetition of the pattern.", + "dflt": 8, + "editType": "style", + "min": 0, + "valType": "number" + }, + "sizesrc": { + "description": "Sets the source reference on Chart Studio Cloud for `size`.", + "editType": "none", + "valType": "string" + }, + "solidity": { + "arrayOk": true, + "description": "Sets the solidity of the pattern fill. Solidity is roughly the fraction of the area filled by the pattern. Solidity of 0 shows only the background color without pattern and solidty of 1 shows only the foreground color without pattern.", + "dflt": 0.3, + "editType": "style", + "max": 1, + "min": 0, + "valType": "number" + }, + "soliditysrc": { + "description": "Sets the source reference on Chart Studio Cloud for `solidity`.", + "editType": "none", + "valType": "string" + } + }, "reversescale": { "description": "Reverses the color mapping if true. Has an effect only if colors 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,