Skip to content

Commit 6e1560b

Browse files
committed
improve description of contour texttemplate and textfont
1 parent 304e214 commit 6e1560b

File tree

3 files changed

+18
-8
lines changed

3 files changed

+18
-8
lines changed

src/traces/contour/attributes.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,18 @@ module.exports = extendFlat({
4242
yhoverformat: axisHoverFormat('y'),
4343
zhoverformat: axisHoverFormat('z', 1),
4444
hovertemplate: heatmapAttrs.hovertemplate,
45-
texttemplate: heatmapAttrs.texttemplate,
46-
textfont: heatmapAttrs.textfont,
45+
texttemplate: extendFlat({}, heatmapAttrs.texttemplate, {
46+
description: [
47+
'For this trace it only has an effect if `coloring` is set to *heatmap*.',
48+
heatmapAttrs.texttemplate.description
49+
].join(' ')
50+
}),
51+
textfont: extendFlat({}, heatmapAttrs.textfont, {
52+
description: [
53+
'For this trace it only has an effect if `coloring` is set to *heatmap*.',
54+
heatmapAttrs.textfont.description
55+
].join(' ')
56+
}),
4757
hoverongaps: heatmapAttrs.hoverongaps,
4858
connectgaps: extendFlat({}, heatmapAttrs.connectgaps, {
4959
description: [

src/traces/histogram2dcontour/attributes.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ module.exports = extendFlat({
4343
yhoverformat: axisHoverFormat('y'),
4444
zhoverformat: axisHoverFormat('z', 1),
4545
hovertemplate: histogram2dAttrs.hovertemplate,
46-
texttemplate: histogram2dAttrs.texttemplate,
47-
textfont: histogram2dAttrs.textfont
46+
texttemplate: contourAttrs.texttemplate,
47+
textfont: contourAttrs.textfont
4848
},
4949
colorScaleAttrs('', {
5050
cLetter: 'z',

test/plot-schema.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21563,7 +21563,7 @@
2156321563
"editType": "style",
2156421564
"valType": "color"
2156521565
},
21566-
"description": "Sets the text font.",
21566+
"description": "For this trace it only has an effect if `coloring` is set to *heatmap*. Sets the text font.",
2156721567
"editType": "plot",
2156821568
"family": {
2156921569
"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*.",
@@ -21585,7 +21585,7 @@
2158521585
"valType": "string"
2158621586
},
2158721587
"texttemplate": {
21588-
"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 `x`, `y`, `z` and `text`.",
21588+
"description": "For this trace it only has an effect if `coloring` is set to *heatmap*. 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 `x`, `y`, `z` and `text`.",
2158921589
"dflt": "",
2159021590
"editType": "plot",
2159121591
"valType": "string"
@@ -31669,7 +31669,7 @@
3166931669
"editType": "style",
3167031670
"valType": "color"
3167131671
},
31672-
"description": "Sets the text font.",
31672+
"description": "For this trace it only has an effect if `coloring` is set to *heatmap*. Sets the text font.",
3167331673
"editType": "plot",
3167431674
"family": {
3167531675
"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*.",
@@ -31686,7 +31686,7 @@
3168631686
}
3168731687
},
3168831688
"texttemplate": {
31689-
"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. variable `z`",
31689+
"description": "For this trace it only has an effect if `coloring` is set to *heatmap*. 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 `x`, `y`, `z` and `text`.",
3169031690
"dflt": "",
3169131691
"editType": "plot",
3169231692
"valType": "string"

0 commit comments

Comments
 (0)