Skip to content

Commit cfd1cc9

Browse files
committed
Merge branch 'master' into හෙළබස
2 parents adda5ea + 95b3bd1 commit cfd1cc9

27 files changed

+110
-51
lines changed

draftlogs/6216_add.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
- Add `unselected.line.color` and `unselected.line.opacity` options to `parcoords` trace [[#6216](https://github.com/plotly/plotly.js/pull/6216)]
1+
- Add `unselected.line.color` and `unselected.line.opacity` options to `parcoords` trace [[#6216](https://github.com/plotly/plotly.js/pull/6216), [#6236](https://github.com/plotly/plotly.js/pull/6236)]

draftlogs/6232_change.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Display Plotly's new logo in the modebar [[#6232](https://github.com/plotly/plotly.js/pull/6232)]

draftlogs/6246_add.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- Add `delta.prefix` and `delta.suffix` to Indicator trace [[#6246](https://github.com/plotly/plotly.js/pull/6246)],
2+
with thanks to @paulovieira for the contribution!

package-lock.json

Lines changed: 34 additions & 34 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,13 +127,13 @@
127127
"browserify": "^17.0.0",
128128
"browserify-transform-tools": "^1.7.0",
129129
"bubleify": "^2.0.0",
130-
"canvas": "^2.9.1",
130+
"canvas": "^2.9.3",
131131
"check-node-version": "^4.2.1",
132132
"chttps": "^1.0.6",
133133
"deep-equal": "^2.0.5",
134134
"derequire": "^2.1.1",
135135
"ecstatic": "^4.1.4",
136-
"eslint": "^8.17.0",
136+
"eslint": "^8.19.0",
137137
"extra-iterable": "^2.5.22",
138138
"falafel": "^2.2.5",
139139
"fs-extra": "^10.1.0",
@@ -143,7 +143,7 @@
143143
"into-stream": "^6.0.0",
144144
"jasmine-core": "^3.5.0",
145145
"jsdom": "^19.0.0",
146-
"karma": "^6.3.20",
146+
"karma": "^6.4.0",
147147
"karma-browserify": "^8.1.0",
148148
"karma-chrome-launcher": "^3.1.1",
149149
"karma-firefox-launcher": "^2.1.2",
@@ -166,7 +166,7 @@
166166
"read-last-lines": "^1.8.0",
167167
"run-series": "^1.1.9",
168168
"sane-topojson": "^4.0.0",
169-
"sass": "^1.52.3",
169+
"sass": "^1.53.0",
170170
"through2": "^4.0.2",
171171
"true-case-path": "^2.2.1",
172172
"watchify": "^4.0.0"

src/fonts/ploticon.js

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,33 @@ module.exports = {
165165
},
166166
'newplotlylogo': {
167167
'name': 'newplotlylogo',
168-
'svg': '<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 132 132\'><defs><style>.cls-1 {fill: #3f4f75;} .cls-2 {fill: #80cfbe;} .cls-3 {fill: #fff;}</style></defs><title>plotly-logomark</title><g id=\'symbol\'><rect class=\'cls-1\' width=\'132\' height=\'132\' rx=\'6\' ry=\'6\'/><circle class=\'cls-2\' cx=\'78\' cy=\'54\' r=\'6\'/><circle class=\'cls-2\' cx=\'102\' cy=\'30\' r=\'6\'/><circle class=\'cls-2\' cx=\'78\' cy=\'30\' r=\'6\'/><circle class=\'cls-2\' cx=\'54\' cy=\'30\' r=\'6\'/><circle class=\'cls-2\' cx=\'30\' cy=\'30\' r=\'6\'/><circle class=\'cls-2\' cx=\'30\' cy=\'54\' r=\'6\'/><path class=\'cls-3\' d=\'M30,72a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V78A6,6,0,0,0,30,72Z\'/><path class=\'cls-3\' d=\'M78,72a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V78A6,6,0,0,0,78,72Z\'/><path class=\'cls-3\' d=\'M54,48a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V54A6,6,0,0,0,54,48Z\'/><path class=\'cls-3\' d=\'M102,48a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V54A6,6,0,0,0,102,48Z\'/></g></svg>'
168+
'svg': [
169+
'<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 132 132\'>',
170+
'<defs>',
171+
' <style>',
172+
' .cls-0{fill:#000;}',
173+
' .cls-1{fill:#FFF;}',
174+
' .cls-2{fill:#F26;}',
175+
' .cls-3{fill:#D69;}',
176+
' .cls-4{fill:#BAC;}',
177+
' .cls-5{fill:#9EF;}',
178+
' </style>',
179+
'</defs>',
180+
' <title>plotly-logomark</title>',
181+
' <g id=\'symbol\'>',
182+
' <rect class=\'cls-0\' x=\'0\' y=\'0\' width=\'132\' height=\'132\' rx=\'18\' ry=\'18\'/>',
183+
' <circle class=\'cls-5\' cx=\'102\' cy=\'30\' r=\'6\'/>',
184+
' <circle class=\'cls-4\' cx=\'78\' cy=\'30\' r=\'6\'/>',
185+
' <circle class=\'cls-4\' cx=\'78\' cy=\'54\' r=\'6\'/>',
186+
' <circle class=\'cls-3\' cx=\'54\' cy=\'30\' r=\'6\'/>',
187+
' <circle class=\'cls-2\' cx=\'30\' cy=\'30\' r=\'6\'/>',
188+
' <circle class=\'cls-2\' cx=\'30\' cy=\'54\' r=\'6\'/>',
189+
' <path class=\'cls-1\' d=\'M30,72a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V78A6,6,0,0,0,30,72Z\'/>',
190+
' <path class=\'cls-1\' d=\'M78,72a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V78A6,6,0,0,0,78,72Z\'/>',
191+
' <path class=\'cls-1\' d=\'M54,48a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V54A6,6,0,0,0,54,48Z\'/>',
192+
' <path class=\'cls-1\' d=\'M102,48a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V54A6,6,0,0,0,102,48Z\'/>',
193+
' </g>',
194+
'</svg>'
195+
].join('')
169196
}
170197
};

src/traces/indicator/attributes.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,22 @@ module.exports = {
248248
'Set the font used to display the delta'
249249
].join(' ')
250250
}),
251+
prefix: {
252+
valType: 'string',
253+
dflt: '',
254+
editType: 'plot',
255+
description: [
256+
'Sets a prefix appearing before the delta.'
257+
].join(' ')
258+
},
259+
suffix: {
260+
valType: 'string',
261+
dflt: '',
262+
editType: 'plot',
263+
description: [
264+
'Sets a suffix appearing next to the delta.'
265+
].join(' ')
266+
},
251267
editType: 'calc'
252268
},
253269
gauge: {

src/traces/indicator/defaults.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ function supplyDefaults(traceIn, traceOut, defaultColor, layout) {
6363
coerce('delta.decreasing.symbol');
6464
coerce('delta.decreasing.color');
6565
coerce('delta.position');
66+
coerce('delta.prefix');
67+
coerce('delta.suffix');
6668
deltaFontSize = traceOut.delta.font.size;
6769
}
6870
traceOut._scaleNumbers = (!traceOut._hasNumber || auto[0]) && (!traceOut._hasDelta || auto[1]) || false;

src/traces/indicator/plot.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -571,15 +571,15 @@ function drawNumbers(gd, plotGroup, cd, opts) {
571571
bignumberAx.setScale();
572572
Axes.prepTicks(bignumberAx);
573573

574-
var fmt = function(v) { return Axes.tickText(bignumberAx, v).text;};
574+
var bignumberFmt = function(v) { return Axes.tickText(bignumberAx, v).text;};
575575
var bignumberSuffix = trace.number.suffix;
576576
var bignumberPrefix = trace.number.prefix;
577577

578578
var number = numbers.select('text.number');
579579

580580
function writeNumber() {
581581
var txt = typeof cd[0].y === 'number' ?
582-
bignumberPrefix + fmt(cd[0].y) + bignumberSuffix :
582+
bignumberPrefix + bignumberFmt(cd[0].y) + bignumberSuffix :
583583
'-';
584584
number.text(txt)
585585
.call(Drawing.font, trace.number.font)
@@ -598,7 +598,7 @@ function drawNumbers(gd, plotGroup, cd, opts) {
598598
var interpolator = interpolateNumber(cd[0].lastY, cd[0].y);
599599
trace._lastValue = cd[0].y;
600600

601-
var transitionFmt = transitionFormat(trace.number.valueformat, fmt, cd[0].lastY, cd[0].y);
601+
var transitionFmt = transitionFormat(trace.number.valueformat, bignumberFmt, cd[0].lastY, cd[0].y);
602602
return function(t) {
603603
that.text(bignumberPrefix + transitionFmt(interpolator(t)) + bignumberSuffix);
604604
};
@@ -607,7 +607,7 @@ function drawNumbers(gd, plotGroup, cd, opts) {
607607
writeNumber();
608608
}
609609

610-
bignumberbBox = measureText(bignumberPrefix + fmt(cd[0].y) + bignumberSuffix, trace.number.font, numbersAnchor, gd);
610+
bignumberbBox = measureText(bignumberPrefix + bignumberFmt(cd[0].y) + bignumberSuffix, trace.number.font, numbersAnchor, gd);
611611
return number;
612612
}
613613

@@ -617,13 +617,16 @@ function drawNumbers(gd, plotGroup, cd, opts) {
617617
Axes.prepTicks(deltaAx);
618618

619619
var deltaFmt = function(v) { return Axes.tickText(deltaAx, v).text;};
620+
var deltaSuffix = trace.delta.suffix;
621+
var deltaPrefix = trace.delta.prefix;
622+
620623
var deltaValue = function(d) {
621624
var value = trace.delta.relative ? d.relativeDelta : d.delta;
622625
return value;
623626
};
624627
var deltaFormatText = function(value, numberFmt) {
625628
if(value === 0 || typeof value !== 'number' || isNaN(value)) return '-';
626-
return (value > 0 ? trace.delta.increasing.symbol : trace.delta.decreasing.symbol) + numberFmt(value);
629+
return (value > 0 ? trace.delta.increasing.symbol : trace.delta.decreasing.symbol) + deltaPrefix + numberFmt(value) + deltaSuffix;
627630
};
628631
var deltaFill = function(d) {
629632
return d.delta >= 0 ? trace.delta.increasing.color : trace.delta.decreasing.color;

src/traces/parcoords/attributes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ module.exports = {
139139
line: {
140140
color: {
141141
valType: 'color',
142-
dflt: '#777',
142+
dflt: '#7f7f7f',
143143
editType: 'plot',
144144
description: [
145145
'Sets the base color of unselected lines.',

0 commit comments

Comments
 (0)