Skip to content

Commit 2116a12

Browse files
committed
contours.font -> contours.labelfont
1 parent 539ca22 commit 2116a12

File tree

5 files changed

+6
-7
lines changed

5 files changed

+6
-7
lines changed

src/traces/contour/attributes.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,10 @@ module.exports = extendFlat({}, {
118118
'Determines whether to label the contour lines with their values.'
119119
].join(' ')
120120
},
121-
font: extendFlat({}, fontAttrs, {
121+
labelfont: extendFlat({}, fontAttrs, {
122122
description: [
123123
'Sets the font used for labeling the contour levels.',
124124
'The default color comes from the lines, if shown.',
125-
// TODO: same size as layout.font, or smaller? 80%?
126125
'The default family and size come from `layout.font`.'
127126
].join(' ')
128127
}),

src/traces/contour/plot.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ function makeLinesAndLabels(plotgroup, pathinfo, gd, cd0, contours, perimeter) {
370370

371371
var dummyText = Drawing.tester.append('text')
372372
.attr('data-notex', 1)
373-
.call(Drawing.font, contours.font);
373+
.call(Drawing.font, contours.labelfont);
374374

375375
var xLen = pathinfo[0].xaxis._length;
376376
var yLen = pathinfo[0].yaxis._length;
@@ -491,7 +491,7 @@ function makeLinesAndLabels(plotgroup, pathinfo, gd, cd0, contours, perimeter) {
491491
transform: 'rotate(' + (180 * d.theta / Math.PI) + ' ' + x + ' ' + y + ')'
492492
})
493493
.call(svgTextUtils.convertToTspans, gd)
494-
.call(Drawing.font, contours.font.family, contours.font.size);
494+
.call(Drawing.font, contours.labelfont.family, contours.labelfont.size);
495495
});
496496

497497
if(clipLinesForLabels) {

src/traces/contour/style.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ module.exports = function style(gd) {
4343
line.dash);
4444
});
4545

46-
var labelFontColor = (contours.font || {}).color;
46+
var labelFontColor = (contours.labelfont || {}).color;
4747
c.selectAll('g.contourlabels text').each(function(d) {
4848
Drawing.font(d3.select(this), {
4949
color: labelFontColor || (colorLines ? colorMap(d.level) : line.color)

src/traces/contour/style_defaults.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ module.exports = function handleStyleDefaults(traceIn, traceOut, coerce, layout,
3737
var showLabels = coerce('contours.showlabels');
3838
if(showLabels) {
3939
var globalFont = layout.font;
40-
Lib.coerceFont(coerce, 'contours.font', {
40+
Lib.coerceFont(coerce, 'contours.labelfont', {
4141
family: globalFont.family,
4242
size: globalFont.size,
4343
color: lineColor

src/traces/contourcarpet/attributes.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ module.exports = extendFlat({}, {
9494
},
9595
showlines: contourContourAttrs.showlines,
9696
showlabels: contourContourAttrs.showlabels,
97-
font: contourContourAttrs.font,
97+
labelfont: contourContourAttrs.font,
9898
labelformat: contourContourAttrs.labelformat,
9999
operation: {
100100
valType: 'enumerated',

0 commit comments

Comments
 (0)