Skip to content

Commit 3e25576

Browse files
committed
Merge remote-tracking branch 'origin/master' into improve-box-violin-hoverlabels
2 parents 98d841e + 1ec75d5 commit 3e25576

19 files changed

+247
-46
lines changed

.circleci/config.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,9 @@ jobs:
293293
command: .circleci/env_image.sh
294294
- run:
295295
name: Install poppler-utils to have pdftops for exporting eps
296-
command: sudo apt-get install poppler-utils
296+
command: |
297+
sudo apt-get update --allow-releaseinfo-change
298+
sudo apt-get install poppler-utils
297299
- run:
298300
name: Create svg, jpg, jpeg, webp, pdf and eps files
299301
command: python3 test/image/make_exports.py

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,14 @@ While non-minified source files may contain characters outside UTF-8, it is reco
8787

8888
> Please note that as of v2 the "plotly-latest" outputs (e.g. https://cdn.plot.ly/plotly-latest.min.js) will no longer be updated on the CDN, and will stay at the last v1 patch v1.58.5. Therefore, to use the CDN with plotly.js v2 and higher, you must specify an exact plotly.js version.
8989
90-
To support MathJax, you could load either version two or version three of MathJax files, for example:
90+
### MathJax
91+
You could load either version two or version three of MathJax files, for example:
9192
```html
9293
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS-MML_SVG.js"></script>
9394
```
9495

9596
```html
96-
<script src="https://cdn.jsdelivr.net/npm/[email protected].0/es5/tex-svg.js"></script>
97+
<script src="https://cdn.jsdelivr.net/npm/[email protected].2/es5/tex-svg.js"></script>
9798
```
9899

99100
> When using MathJax version 3, it is also possible to use `chtml` output on the other parts of the page in addition to `svg` output for the plotly graph.

draftlogs/6216_add.md

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

package-lock.json

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

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@
133133
"deep-equal": "^2.0.5",
134134
"derequire": "^2.1.1",
135135
"ecstatic": "^4.1.4",
136-
"eslint": "^8.15.0",
136+
"eslint": "^8.17.0",
137137
"extra-iterable": "^2.5.22",
138138
"falafel": "^2.2.5",
139139
"fs-extra": "^10.1.0",
@@ -156,7 +156,7 @@
156156
"lodash": "^4.17.21",
157157
"madge": "^5.0.1",
158158
"mathjax-v2": "npm:[email protected]",
159-
"mathjax-v3": "npm:mathjax@^3.2.1",
159+
"mathjax-v3": "npm:mathjax@^3.2.2",
160160
"minify-stream": "^2.1.0",
161161
"npm-link-check": "^4.0.0",
162162
"open": "^8.4.0",
@@ -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.1",
169+
"sass": "^1.52.3",
170170
"through2": "^4.0.2",
171171
"true-case-path": "^2.2.1",
172172
"watchify": "^4.0.0"

src/components/shapes/attributes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ module.exports = templatedArray('shape', {
103103

104104
yref: extendFlat({}, annAttrs.yref, {
105105
description: [
106-
'Sets the annotation\'s y coordinate axis.',
106+
'Sets the shape\'s y coordinate axis.',
107107
axisPlaceableObjs.axisRefDescription('y', 'bottom', 'top')
108108
].join(' ')
109109
}),

src/traces/parcoords/attributes.js

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,5 +133,33 @@ module.exports = {
133133
autoColorDflt: false,
134134
editTypeOverride: 'calc'
135135
})
136-
)
136+
),
137+
138+
unselected: {
139+
line: {
140+
color: {
141+
valType: 'color',
142+
dflt: '#777',
143+
editType: 'plot',
144+
description: [
145+
'Sets the base color of unselected lines.',
146+
'in connection with `unselected.line.opacity`.'
147+
].join(' ')
148+
},
149+
opacity: {
150+
valType: 'number',
151+
min: 0,
152+
max: 1,
153+
dflt: 'auto',
154+
editType: 'plot',
155+
description: [
156+
'Sets the opacity of unselected lines.',
157+
'The default *auto* decreases the opacity smoothly as the number of lines increases.',
158+
'Use *1* to achieve exact `unselected.line.color`.'
159+
].join(' ')
160+
},
161+
editType: 'plot'
162+
},
163+
editType: 'plot'
164+
}
137165
};

src/traces/parcoords/constants.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ module.exports = {
1111
layers: ['contextLineLayer', 'focusLineLayer', 'pickLineLayer'],
1212
axisTitleOffset: 28,
1313
axisExtentOffset: 10,
14-
deselectedLineColor: '#777',
1514
bar: {
1615
width: 4, // Visible width of the filter bar
1716
captureWidth: 10, // Mouse-sensitive width for interaction (Fitts law)

src/traces/parcoords/defaults.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,4 +107,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
107107

108108
coerce('labelangle');
109109
coerce('labelside');
110+
111+
coerce('unselected.line.color');
112+
coerce('unselected.line.opacity');
110113
};

src/traces/parcoords/lines.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ function makeItem(
183183
var layoutWidth = model.layoutWidth * plotGlPixelRatio;
184184

185185
var deselectedLinesColor = model.deselectedLines.color;
186+
var deselectedLinesOpacity = model.deselectedLines.opacity;
186187

187188
var itemModel = Lib.extendFlat({
188189
key: crossfilterDimensionIndex,
@@ -206,8 +207,8 @@ function makeItem(
206207
deselectedLinesColor[0] / 255,
207208
deselectedLinesColor[1] / 255,
208209
deselectedLinesColor[2] / 255,
209-
deselectedLinesColor[3] < 1 ?
210-
deselectedLinesColor[3] :
210+
deselectedLinesOpacity !== 'auto' ?
211+
deselectedLinesColor[3] * deselectedLinesOpacity :
211212
Math.max(1 / 255, Math.pow(1 / model.lines.color.length, 1 / 3))
212213
],
213214

src/traces/parcoords/parcoords.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,10 @@ function model(layout, d, i) {
149149
var trace = cd0.trace;
150150
var lineColor = helpers.convertTypedArray(cd0.lineColor);
151151
var line = trace.line;
152-
var deselectedLines = {color: rgba(c.deselectedLineColor)};
152+
var deselectedLines = {
153+
color: rgba(trace.unselected.line.color),
154+
opacity: trace.unselected.line.opacity
155+
};
153156
var cOpts = Colorscale.extractOpts(line);
154157
var cscale = cOpts.reversescale ? Colorscale.flipScale(cd0.cscale) : cd0.cscale;
155158
var domain = trace.domain;
Loading
Loading
Loading

test/image/mocks/gl2d_parcoords_256_colors.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
"data": [
33
{
44
"type": "parcoords",
5+
"unselected": {
6+
"line": {
7+
"color": "blue"
8+
}
9+
},
510
"line": {
611
"colorscale": [
712
[

test/image/mocks/gl2d_parcoords_constraints.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"layout": {
3+
"paper_bgcolor": "lightgray",
34
"width": 1000,
45
"height": 400
56
},
@@ -24,6 +25,13 @@
2425
]
2526
},
2627

28+
"unselected": {
29+
"line": {
30+
"opacity": 1,
31+
"color": "white"
32+
}
33+
},
34+
2735
"dimensions": [
2836
{
2937
"label": "±1.1",

test/image/mocks/gl2d_parcoords_dark_background.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@
2020
"color": [-41, -1317, -164, -1856, -79, -931, -191, -2983, -341, -3846, -278, -3019, -523, -2357, -985, -3447, -211, -2842, -458, -4388, -784, -2563, -935, -2253, -313, -3667, -1479, -1030, -632, -623, -1945, -1324, -1221, -878, -947, -1615, -697, -575, -482, -905, -869, -433, -484, -349, -667, -248, -1135, -888, -1019, -223, -2067, -729, -579, -659, -334, -340, -554, -455, -377, -375, -453, -834, -934, -334, -369, -290, -354, -497, -490, -329, -729, -1794, -151, -1162, -3935, -1013, -509, -825, -997, -320, -680, -422, -785, -542, -563, -489, -1283, -680, -78, -450, -514, -449, -548, -661, -641, -503, -570, -257, -394, -450]
2121
},
2222

23+
"unselected": {
24+
"line": {
25+
"opacity": 0.5
26+
}
27+
},
28+
2329
"dimensions": [
2430
{
2531
"constraintrange": [100000, 150000],

0 commit comments

Comments
 (0)