Skip to content

Commit d3940c6

Browse files
committed
Merge remote-tracking branch 'origin/master' into cam/7334/switch-geodata-providers
2 parents e385014 + e2fd2bb commit d3940c6

33 files changed

+845
-542
lines changed

.github/workflows/test.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
3+
4+
name: No CI Test
5+
6+
on: push
7+
8+
jobs:
9+
build:
10+
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
node-version: [18.x]
16+
17+
steps:
18+
- uses: browser-actions/setup-chrome@v1
19+
- uses: actions/checkout@v4
20+
- name: Use Node.js ${{ matrix.node-version }}
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: ${{ matrix.node-version }}
24+
cache: 'npm'
25+
- run: chrome --version
26+
- run: ls
27+
- run: npm run pretest
28+
- run: npm ci
29+
- run: npm run cibuild
30+
- name: Run headless test
31+
uses: coactions/setup-xvfb@v1
32+
with:
33+
run: ./tasks/noci_test.sh jasmine

devtools/regl_codegen/devtools.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,5 +158,3 @@ function handleOnLoad() {
158158
window.close();
159159
});
160160
}
161-
162-
module.exports = Tabs;

devtools/test_dashboard/devtools.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,4 +268,3 @@ function handleOnLoad() {
268268
plotFromHash();
269269
}
270270

271-
module.exports = Tabs;

draftlogs/7280_add.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Add `pattern.path` attribute as an alternative to the preset `pattern.shape` values, so you can use any SVG path string as a pattern fill. [[#7280](https://github.com/plotly/plotly.js/pull/7280)]

draftlogs/7407_fix.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Move css-loader and other dependencies into devDependencies section [[#7407](https://github.com/plotly/plotly.js/pull/7407)]

draftlogs/7420_add.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- Add support for ticklabelposition "inside"/"outside" for category axes with `tickson` set to "boundaries" [[#7420](https://github.com/plotly/plotly.js/pull/7420)],
2+
with thanks to @my-tien for the contribution!

package-lock.json

Lines changed: 198 additions & 71 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
@@ -86,15 +86,13 @@
8686
"color-parse": "2.0.0",
8787
"color-rgba": "3.0.0",
8888
"country-regex": "^1.1.0",
89-
"css-loader": "^7.1.2",
9089
"d3-force": "^1.2.1",
9190
"d3-format": "^1.4.5",
9291
"d3-geo-projection": "^2.9.0",
9392
"d3-hierarchy": "^1.1.9",
9493
"d3-interpolate": "^3.0.1",
9594
"d3-time": "^1.1.0",
9695
"d3-time-format": "^2.2.3",
97-
"esbuild-style-plugin": "^1.6.3",
9896
"fast-isnumeric": "^1.1.4",
9997
"gl-mat4": "^1.2.0",
10098
"gl-text": "^1.4.0",
@@ -115,7 +113,6 @@
115113
"regl-scatter2d": "^3.3.1",
116114
"regl-splom": "^1.0.14",
117115
"strongly-connected-components": "^1.0.1",
118-
"style-loader": "^4.0.0",
119116
"superscript-text": "^1.0.0",
120117
"svg-path-sdf": "^1.1.3",
121118
"tinycolor2": "^1.4.2",
@@ -138,13 +135,15 @@
138135
"canvas": "^3.1.0",
139136
"check-node-version": "^4.2.1",
140137
"chttps": "^1.0.6",
138+
"css-loader": "^7.1.2",
141139
"d3-geo": "^3.1.1",
142140
"deep-equal": "^2.2.3",
143141
"ecstatic": "^4.1.4",
144142
"esbuild": "^0.25.5",
145143
"esbuild-plugin-browserify-adapter": "^0.1.4",
146144
"esbuild-plugin-environment": "^0.4.0",
147145
"esbuild-plugin-glsl": "^1.2.2",
146+
"esbuild-style-plugin": "^1.6.3",
148147
"extra-iterable": "^2.5.22",
149148
"falafel": "^2.2.5",
150149
"fs-extra": "^10.1.0",
@@ -180,6 +179,7 @@
180179
"run-series": "^1.1.9",
181180
"sass": "^1.78.0",
182181
"stream-browserify": "^3.0.0",
182+
"style-loader": "^4.0.0",
183183
"through2": "^4.0.2",
184184
"topojson": "^1.6.27",
185185
"transform-loader": "^0.2.4",

src/components/drawing/attributes.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,16 @@ exports.pattern = {
2828
'By default, no pattern is used for filling the area.',
2929
].join(' ')
3030
},
31+
path: {
32+
valType: 'string',
33+
arrayOk: true,
34+
editType: 'style',
35+
description: [
36+
'Sets a custom path for pattern fill.',
37+
'Use with no `shape` or `solidity`, provide an SVG path string for',
38+
'the regions of the square from (0,0) to (`size`,`size`) to color.'
39+
].join(' ')
40+
},
3141
fillmode: {
3242
valType: 'enumerated',
3343
values: ['replace', 'overlay'],

src/components/drawing/index.js

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -218,13 +218,14 @@ drawing.dashStyle = function(dash, lineWidth) {
218218
function setFillStyle(sel, trace, gd, forLegend) {
219219
var markerPattern = trace.fillpattern;
220220
var fillgradient = trace.fillgradient;
221-
var patternShape = markerPattern && drawing.getPatternAttr(markerPattern.shape, 0, '');
221+
var pAttr = drawing.getPatternAttr;
222+
var patternShape = markerPattern && (pAttr(markerPattern.shape, 0, '') || pAttr(markerPattern.path, 0, ''));
222223
if(patternShape) {
223-
var patternBGColor = drawing.getPatternAttr(markerPattern.bgcolor, 0, null);
224-
var patternFGColor = drawing.getPatternAttr(markerPattern.fgcolor, 0, null);
224+
var patternBGColor = pAttr(markerPattern.bgcolor, 0, null);
225+
var patternFGColor = pAttr(markerPattern.fgcolor, 0, null);
225226
var patternFGOpacity = markerPattern.fgopacity;
226-
var patternSize = drawing.getPatternAttr(markerPattern.size, 0, 8);
227-
var patternSolidity = drawing.getPatternAttr(markerPattern.solidity, 0, 0.3);
227+
var patternSize = pAttr(markerPattern.size, 0, 8);
228+
var patternSolidity = pAttr(markerPattern.solidity, 0, 0.3);
228229
var patternID = trace.uid;
229230
drawing.pattern(sel, 'point', gd, patternID,
230231
patternShape, patternSize, patternSolidity,
@@ -662,6 +663,16 @@ drawing.pattern = function(sel, calledBy, gd, patternID, shape, size, solidity,
662663
fill: fgRGB
663664
};
664665
break;
666+
default:
667+
width = size;
668+
height = size;
669+
patternTag = 'path';
670+
patternAttrs = {
671+
d: shape,
672+
opacity: opacity,
673+
fill: fgRGB
674+
};
675+
break;
665676
}
666677

667678
var str = [
@@ -869,7 +880,10 @@ drawing.singlePointStyle = function(d, sel, trace, fns, gd, pt) {
869880
}
870881

871882
var markerPattern = marker.pattern;
872-
var patternShape = markerPattern && drawing.getPatternAttr(markerPattern.shape, d.i, '');
883+
var pAttr = drawing.getPatternAttr;
884+
var patternShape = markerPattern && (
885+
pAttr(markerPattern.shape, d.i, '') || pAttr(markerPattern.path, d.i, '')
886+
);
873887

874888
if(gradientType && gradientType !== 'none') {
875889
var gradientColor = d.mgc;
@@ -888,14 +902,15 @@ drawing.singlePointStyle = function(d, sel, trace, fns, gd, pt) {
888902
fgcolor = pt.color;
889903
perPointPattern = true;
890904
}
891-
var patternFGColor = drawing.getPatternAttr(fgcolor, d.i, (pt && pt.color) || null);
905+
var patternFGColor = pAttr(fgcolor, d.i, (pt && pt.color) || null);
892906

893-
var patternBGColor = drawing.getPatternAttr(markerPattern.bgcolor, d.i, null);
907+
var patternBGColor = pAttr(markerPattern.bgcolor, d.i, null);
894908
var patternFGOpacity = markerPattern.fgopacity;
895-
var patternSize = drawing.getPatternAttr(markerPattern.size, d.i, 8);
896-
var patternSolidity = drawing.getPatternAttr(markerPattern.solidity, d.i, 0.3);
909+
var patternSize = pAttr(markerPattern.size, d.i, 8);
910+
var patternSolidity = pAttr(markerPattern.solidity, d.i, 0.3);
897911
perPointPattern = perPointPattern || d.mcc ||
898912
Lib.isArrayOrTypedArray(markerPattern.shape) ||
913+
Lib.isArrayOrTypedArray(markerPattern.path) ||
899914
Lib.isArrayOrTypedArray(markerPattern.bgcolor) ||
900915
Lib.isArrayOrTypedArray(markerPattern.fgcolor) ||
901916
Lib.isArrayOrTypedArray(markerPattern.size) ||

0 commit comments

Comments
 (0)