Skip to content

Commit 15c129c

Browse files
committed
Merge branch 'master' into test-PR7314-on-master
2 parents 98b66a8 + f8c7b5d commit 15c129c

File tree

352 files changed

+1424062
-1567859
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

352 files changed

+1424062
-1567859
lines changed

Diff for: .circleci/config.yml

+1-7
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ jobs:
7575
environment:
7676
# Alaska time (arbitrary timezone to test date logic)
7777
TZ: "America/Anchorage"
78-
parallelism: 12
78+
parallelism: 4
7979
working_directory: ~/plotly.js
8080
steps:
8181
- run: sudo apt-get update
@@ -464,12 +464,6 @@ jobs:
464464
- run:
465465
name: Test plot-schema.json diff - If failed, after (npm start) you could run (npm run schema && git add test/plot-schema.json && git commit -m "update plot-schema diff")
466466
command: diff --unified --color dist/plot-schema.json test/plot-schema.json
467-
- run:
468-
name: Test plotly.min.js import using amdefine
469-
command: npm run test-amdefine
470-
- run:
471-
name: Test plotly.min.js import using requirejs
472-
command: npm run test-requirejs
473467

474468
test-stackgl-bundle:
475469
docker:

Diff for: .gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ build/*
55
!build/README.md
66

77
dist/*.LICENSE.txt
8+
dist/*.css
89

910
npm-debug.log*
1011
*.sublime*

Diff for: CHANGELOG.md

+70
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,76 @@ To see all merged commits on the master branch that will be part of the next plo
99

1010
where X.Y.Z is the semver of most recent plotly.js release.
1111

12+
## [3.0.0-rc.1] -- 2024-11-27
13+
14+
### Removed
15+
- Drop support for passing a string to the `title` attribute, and drop support for deprecated attributes `titlefont`, `titleposition`, `titleside`, and `titleoffset` (use `title.text`, `title.font`, `title.side`, `title.offset` instead)[[#7212](https://github.com/plotly/plotly.js/pull/7212)]
16+
- Drop deprecated pointcloud and heatmapgl traces and gl2d subplots [[#7213](https://github.com/plotly/plotly.js/pull/7213)]
17+
Drop support for deprecated `bardir` attribute (use `orientation` instead) [[#7214](https://github.com/plotly/plotly.js/pull/7214)]
18+
- Drop support for deprecated `annotation.ref` attribute (use `annotation.xref` and `annotation.yref` instead) [[#7215](https://github.com/plotly/plotly.js/pull/7215)]
19+
- Drop support for deprecated error bar `opacity` attribute (use alpha channel of error bar `color` attribute instead) [[#7214](https://github.com/plotly/plotly.js/pull/7216)]
20+
- Drop support for deprecated attribute `gl3d.cameraposition` (use `gl3d.camera` instead) [[#7217](https://github.com/plotly/plotly.js/pull/7217)]
21+
- Drop deprecated `plot3dPixelRatio` from config [[#7231](https://github.com/plotly/plotly.js/pull/7231)]
22+
- Drop deprecated `zauto`, `zmin` and `zmax` from the surface trace [[#7234](https://github.com/plotly/plotly.js/pull/7234)]
23+
- Drop deprecated `autotick` attributes from cartesian axes [[#7236](https://github.com/plotly/plotly.js/pull/7236)]
24+
- Drop `transforms` from the API [[#7240](https://github.com/plotly/plotly.js/pull/7240), [#7254](https://github.com/plotly/plotly.js/pull/7254)]
25+
- Drop jQuery events support [[#7224](https://github.com/plotly/plotly.js/pull/7224)]
26+
- Drop the AMD support from the bundle header [[#7229](https://github.com/plotly/plotly.js/pull/7229)]
27+
28+
### Changed
29+
- Switch from webpack to esbuild for fast builds & testing as well as allowing modern JavaScript beyond es5 [[#6909](https://github.com/plotly/plotly.js/pull/6909)]
30+
- Make offsetgroup work with barmode "stacked" and "relative" for bar traces [[#7009](https://github.com/plotly/plotly.js/pull/7009)]
31+
- Node v18 required for development [[#7116](https://github.com/plotly/plotly.js/pull/7124)]
32+
- Cleanup remaining code that was there to support the Internet Explorer [[#7251](https://github.com/plotly/plotly.js/pull/7251)]
33+
- Deprecate mapbox traces and provide links to migration docs for plotly.js and plotly.py users [[#7260](https://github.com/plotly/plotly.js/pull/7260)]
34+
35+
### Fixed
36+
- Remove inline styles that break plots in strict CSP setups [[#7109](https://github.com/plotly/plotly.js/pull/7109)],
37+
with thanks to @martian111 for the contribution!
38+
- Allow null or broken selection objects without throwing an error [[#7164](https://github.com/plotly/plotly.js/pull/7164)]
39+
- Render scatterternary traces correctly if they have the `ids` attribute [[#7164](https://github.com/plotly/plotly.js/pull/7164)]
40+
- Do not convert url-sourced layout images to data URI unless we're in staticPlot mode, to improve interactivity when images are changed with zoom/pan [[#7199](https://github.com/plotly/plotly.js/pull/7199)]
41+
- Fix source map of the mablibre dependency [[#7204](https://github.com/plotly/plotly.js/pull/7204)]
42+
- Fix years in license [[#7205](https://github.com/plotly/plotly.js/pull/7205)]
43+
- Maintain layout images element identity based on coordinates,
44+
for smoother updates when you add or remove images early in the list. [[#7277](https://github.com/plotly/plotly.js/pull/7277)]
45+
- Fix handling of new domain values given in the Plotly.react function to
46+
prevent loss of new domain values. [[#7283](https://github.com/plotly/plotly.js/pull/7283)]
47+
48+
49+
## [3.0.0-rc.0] -- 2024-11-11
50+
51+
### Removed
52+
- Drop support for passing a string to the `title` attribute, and drop support for deprecated attributes `titlefont`, `titleposition`, `titleside`, and `titleoffset` (use `title.text`, `title.font`, `title.side`, `title.offset` instead)[[#7212](https://github.com/plotly/plotly.js/pull/7212)]
53+
- Drop deprecated pointcloud and heatmapgl traces and gl2d subplots [[#7213](https://github.com/plotly/plotly.js/pull/7213)]
54+
Drop support for deprecated `bardir` attribute (use `orientation` instead) [[#7214](https://github.com/plotly/plotly.js/pull/7214)]
55+
- Drop support for deprecated `annotation.ref` attribute (use `annotation.xref` and `annotation.yref` instead) [[#7215](https://github.com/plotly/plotly.js/pull/7215)]
56+
- Drop support for deprecated error bar `opacity` attribute (use alpha channel of error bar `color` attribute instead) [[#7214](https://github.com/plotly/plotly.js/pull/7216)]
57+
- Drop support for deprecated attribute `gl3d.cameraposition` (use `gl3d.camera` instead) [[#7217](https://github.com/plotly/plotly.js/pull/7217)]
58+
- Drop deprecated `plot3dPixelRatio` from config [[#7231](https://github.com/plotly/plotly.js/pull/7231)]
59+
- Drop deprecated `zauto`, `zmin` and `zmax` from the surface trace [[#7234](https://github.com/plotly/plotly.js/pull/7234)]
60+
- Drop deprecated `autotick` attributes from cartesian axes [[#7236](https://github.com/plotly/plotly.js/pull/7236)]
61+
- Drop `transforms` from the API [[#7240](https://github.com/plotly/plotly.js/pull/7240), [#7254](https://github.com/plotly/plotly.js/pull/7254)]
62+
- Drop jQuery events support [[#7224](https://github.com/plotly/plotly.js/pull/7224)]
63+
- Drop the AMD support from the bundle header [[#7229](https://github.com/plotly/plotly.js/pull/7229)]
64+
65+
### Changed
66+
- Switch from webpack to esbuild for fast builds & testing as well as allowing modern JavaScript beyond es5 [[#6909](https://github.com/plotly/plotly.js/pull/6909)]
67+
- Make offsetgroup work with barmode "stacked" and "relative" for bar traces [[#7009](https://github.com/plotly/plotly.js/pull/7009)]
68+
- Node v18 required for development [[#7116](https://github.com/plotly/plotly.js/pull/7124)]
69+
- Cleanup remaining code that was there to support the Internet Explorer [[#7251](https://github.com/plotly/plotly.js/pull/7251)]
70+
- Deprecate mapbox traces and provide links to migration docs for plotly.js and plotly.py users [[#7260](https://github.com/plotly/plotly.js/pull/7260)]
71+
72+
### Fixed
73+
- Remove inline styles that break plots in strict CSP setups [[#7109](https://github.com/plotly/plotly.js/pull/7109)],
74+
with thanks to @martian111 for the contribution!
75+
- Allow null or broken selection objects without throwing an error [[#7164](https://github.com/plotly/plotly.js/pull/7164)]
76+
- Render scatterternary traces correctly if they have the `ids` attribute [[#7164](https://github.com/plotly/plotly.js/pull/7164)]
77+
- Do not convert url-sourced layout images to data URI unless we're in staticPlot mode, to improve interactivity when images are changed with zoom/pan [[#7199](https://github.com/plotly/plotly.js/pull/7199)]
78+
- Fix source map of the mablibre dependency [[#7204](https://github.com/plotly/plotly.js/pull/7204)]
79+
- Fix years in license [[#7205](https://github.com/plotly/plotly.js/pull/7205)]
80+
81+
1282
## [2.35.2] -- 2024-09-10
1383

1484
### Fixed

Diff for: CITATION.cff

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
cff-version: 1.2.0
2+
message: "If you use this software, please cite it as below."
3+
authors:
4+
- family-names: "Johnson"
5+
given-names: "Alex"
6+
orcid: https://orcid.org/0000-0003-4623-4147
7+
- family-names: "Tétreault-Pinard"
8+
given-names: "Étienne"
9+
- family-names: "Samimi"
10+
given-names: "Mojtaba"
11+
title: "Open source Plotly charting library"
12+
version: 2.35.2
13+
doi: 10.5281/zenodo.13964707
14+
date-released: 2024-09-10
15+
url: "https://github.com/plotly/plotly.js"

Diff for: CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ This will produce the following plot, and say you want to simulate a selection p
340340

341341
The trace modules (found in [`src/traces`](https://github.com/plotly/plotly.js/tree/master/src/traces))
342342
are defined as plain objects with functions and constants attached to them in an index file
343-
(e.g. `src/traces/scatter/index.js`). The trace modules are "registered" undo the `Registry` object
343+
(e.g. `src/traces/scatter/index.js`). The trace modules are "registered" under the `Registry` object
344344
(found in [`src/registry.js`](https://github.com/plotly/plotly.js/blob/master/src/registry.js)) using
345345
`Plotly.register` (as done in the index files in `dist/`).
346346

Diff for: CUSTOM_BUNDLE.md

+4-15
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Custom bundle
2-
You can simply make custom bundles yourself, if none of the [distributed packages](https://github.com/plotly/plotly.js/blob/master/dist/README.md) meet your needs, or you want to make a more optimized bundle file with/without specific traces and transforms.
2+
You can simply make custom bundles yourself, if none of the [distributed packages](https://github.com/plotly/plotly.js/blob/master/dist/README.md) meet your needs, or you want to make a more optimized bundle file with/without specific traces.
33

44
Make sure you have the versions of node/npm that's recommended:
55
- plotly.js before 2.5: Node 12/npm 6
@@ -27,7 +27,7 @@ cd plotly.js
2727
npm i
2828
```
2929

30-
By default all traces and transforms are included in the bundle if you simply run:
30+
By default all traces are included in the bundle if you simply run:
3131
```sh
3232
npm run custom-bundle
3333
```
@@ -39,16 +39,6 @@ npm run custom-bundle -- --traces scatter,scattergl,scatter3d
3939
Please note that the `scatter` trace is currently included in all bundles and cannot be removed.
4040
[This behaviour may change in the future](https://github.com/plotly/plotly.js/pull/5535), so we recommend that you explicitly include `scatter` anyway if you need it in your bundle.
4141

42-
Use the `transforms` option to specify which should be included.
43-
```sh
44-
npm run custom-bundle -- --transforms sort,filter
45-
```
46-
47-
Or use `transforms none` to exclude them all.
48-
```sh
49-
npm run custom-bundle -- --transforms none
50-
```
51-
5242
Use the `strict` option to use strict trace types where possible.
5343
```sh
5444
npm run custom-bundle -- --traces scatter,scattergl --strict
@@ -66,15 +56,14 @@ npm run custom-bundle -- --unminified
6656
```
6757

6858
# Example illustrating use of different options together
69-
To create an unminified custom bundle named `myScatters` including `scatter`, `scattergl` and `scatter3d` traces without any transforms:
59+
To create an unminified custom bundle named `myScatters` including `scatter`, `scattergl` and `scatter3d` traces:
7060
```sh
7161
npm run custom-bundle -- \
7262
--unminified \
7363
--out myScatters \
7464
--traces scatter,scattergl,scatter3d \
75-
--transforms none
7665
```
7766
Or simply on one line:
7867
```sh
79-
npm run custom-bundle -- --unminified --out myScatters --traces scatter,scattergl,scatter3d --transforms none
68+
npm run custom-bundle -- --unminified --out myScatters --traces scatter,scattergl,scatter3d
8069
```

Diff for: LICENSE

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
The MIT License (MIT)
1+
MIT License
22

3-
Copyright (c) 2021 Plotly, Inc
3+
Copyright (c) 2016-2024 Plotly Technologies Inc.
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

Diff for: README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<a href="https://plotly.com/javascript/"><img src="https://images.plot.ly/logo/plotlyjs-logo@2x.png" height="70"></a>
22

33
[![npm version](https://badge.fury.io/js/plotly.js.svg)](https://badge.fury.io/js/plotly.js)
4-
[![circle ci](https://circleci.com/gh/plotly/plotly.js.png?&style=shield&circle-token=1f42a03b242bd969756fc3e53ede204af9b507c0)](https://circleci.com/gh/plotly/plotly.js)
4+
[![circle ci](https://circleci.com/gh/plotly/plotly.js.svg?style=shield)](https://circleci.com/gh/plotly/plotly.js)
55
[![MIT License](https://img.shields.io/badge/License-MIT-brightgreen.svg)](https://github.com/plotly/plotly.js/blob/master/LICENSE)
66

77
[Plotly.js](https://plotly.com/javascript) is a standalone Javascript data visualization library, and it also powers the Python and R modules named `plotly` in those respective ecosystems (referred to as [Plotly.py](https://plotly.com/python) and [Plotly.R](http://plotly.com/r)).
@@ -62,7 +62,7 @@ You may also consider using [`plotly.js-dist`](https://www.npmjs.com/package/plo
6262
6363
```html
6464
<head>
65-
<script src="https://cdn.plot.ly/plotly-2.35.2.min.js" charset="utf-8"></script>
65+
<script src="https://cdn.plot.ly/plotly-3.0.0-rc.1.min.js" charset="utf-8"></script>
6666
</head>
6767
<body>
6868
<div id="gd"></div>
@@ -79,7 +79,7 @@ You may also consider using [`plotly.js-dist`](https://www.npmjs.com/package/plo
7979
Alternatively you may consider using [native ES6 import](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules) in the script tag.
8080
```html
8181
<script type="module">
82-
import "https://cdn.plot.ly/plotly-2.35.2.min.js"
82+
import "https://cdn.plot.ly/plotly-3.0.0-rc.1.min.js"
8383
Plotly.newPlot("gd", [{ y: [1, 2, 3] }])
8484
</script>
8585
```
@@ -89,7 +89,7 @@ Fastly supports Plotly.js with free CDN service. Read more at <https://www.fastl
8989
### Un-minified versions are also available on CDN
9090
While non-minified source files may contain characters outside UTF-8, it is recommended that you specify the `charset` when loading those bundles.
9191
```html
92-
<script src="https://cdn.plot.ly/plotly-2.35.2.js" charset="utf-8"></script>
92+
<script src="https://cdn.plot.ly/plotly-3.0.0-rc.1.js" charset="utf-8"></script>
9393
```
9494

9595
> 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.

Diff for: build/plotcss.js

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ var rules = {
99
"X a:hover": "text-decoration:none;",
1010
"X .crisp": "shape-rendering:crispEdges;",
1111
"X .user-select-none": "-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;",
12-
"X svg": "overflow:hidden;",
1312
"X svg a": "fill:#447adb;",
1413
"X svg a:hover": "fill:#3c6dc5;",
1514
"X .main-svg": "position:absolute;top:0;left:0;pointer-events:none;",

Diff for: devtools/regl_codegen/server.js renamed to devtools/regl_codegen/server.mjs

+23-67
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
var fs = require('fs');
2-
var path = require('path');
3-
var http = require('http');
4-
var ecstatic = require('ecstatic');
5-
var open = require('open');
6-
var webpack = require('webpack');
7-
var minimist = require('minimist');
8-
9-
var constants = require('../../tasks/util/constants');
10-
var config = require('../../webpack.config.js');
11-
config.optimization = { minimize: false };
1+
import fs from 'fs';
2+
import path from 'path';
3+
import http from 'http';
4+
import ecstatic from 'ecstatic';
5+
import open from 'open';
6+
import minimist from 'minimist';
7+
8+
import constants from '../../tasks/util/constants.js';
9+
import { build } from 'esbuild';
10+
import config from '../../esbuild-config.js';
1211

1312
var args = minimist(process.argv.slice(2), {});
1413
var PORT = args.port || 3000;
@@ -21,6 +20,8 @@ var reglTraceList = [
2120
'splom'
2221
];
2322

23+
24+
2425
// Create server
2526
var _static = ecstatic({
2627
root: constants.pathToRoot,
@@ -57,55 +58,25 @@ var server = http.createServer(function(req, res) {
5758
}
5859
});
5960

60-
61-
// Start the server up!
62-
server.listen(PORT);
63-
64-
// open up browser window
65-
open('http://localhost:' + PORT + '/devtools/regl_codegen/index' + (strict ? '-strict' : '') + '.html');
66-
6761
// Build and bundle all the things!
68-
getMockFiles()
62+
await getMockFiles()
6963
.then(readFiles)
7064
.then(createMocksList)
7165
.then(saveMockListToFile)
7266
.then(saveReglTracesToFile.bind(null, reglTraceList));
7367

74-
// Devtools config
75-
var devtoolsConfig = {};
76-
77-
var devtoolsPath = path.join(constants.pathToRoot, 'devtools/regl_codegen');
78-
devtoolsConfig.entry = path.join(devtoolsPath, 'devtools.js');
79-
80-
devtoolsConfig.output = {
81-
path: config.output.path,
82-
filename: 'regl_codegen-bundle.js',
83-
library: {
84-
name: 'Tabs',
85-
type: 'umd'
86-
}
87-
};
88-
89-
devtoolsConfig.target = config.target;
90-
devtoolsConfig.plugins = config.plugins;
91-
devtoolsConfig.optimization = config.optimization;
92-
devtoolsConfig.mode = 'production';
93-
94-
var compiler;
95-
96-
compiler = webpack(devtoolsConfig);
97-
compiler.run(function(devtoolsErr, devtoolsStats) {
98-
if(devtoolsErr) {
99-
console.log('err:', devtoolsErr);
100-
} else if(devtoolsStats.errors && devtoolsStats.errors.length) {
101-
console.log('stats.errors:', devtoolsStats.errors);
102-
} else {
103-
console.log('success:', devtoolsConfig.output.path + '/' + devtoolsConfig.output.filename);
68+
// Start the server up!
69+
server.listen(PORT);
10470

105-
purgeGeneratedCode(reglTraceList);
106-
}
107-
});
71+
// open up browser window
72+
open('http://localhost:' + PORT + '/devtools/regl_codegen/index' + (strict ? '-strict' : '') + '.html');
10873

74+
var devtoolsPath = path.join(constants.pathToRoot, 'devtools/regl_codegen');
75+
config.entryPoints = [path.join(devtoolsPath, 'devtools.js')];
76+
config.outfile = './build/regl_codegen-bundle.js';
77+
config.sourcemap = false;
78+
config.minify = false;
79+
await build(config);
10980

11081
function getMockFiles() {
11182
return new Promise(function(resolve, reject) {
@@ -240,18 +211,3 @@ function handleCodegen(data) {
240211
var precompiled = header + imports + exports;
241212
fs.writeFileSync(pathToReglPrecompiledSrc, precompiled);
242213
}
243-
244-
245-
function purgeGeneratedCode(traces) {
246-
var pathToReglCodegenSrc = constants.pathToReglCodegenSrc;
247-
248-
var files = fs.readdirSync(pathToReglCodegenSrc);
249-
files.forEach(function(file) {
250-
fs.unlinkSync(path.join(pathToReglCodegenSrc, file));
251-
});
252-
253-
traces.forEach(function(trace) {
254-
var pathToReglPrecompiledSrc = path.join(constants.pathToSrc, 'traces', trace, 'regl_precompiled.js');
255-
fs.writeFileSync(pathToReglPrecompiledSrc, 'module.exports = {};\n');
256-
});
257-
}

Diff for: devtools/test_dashboard/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<div id="snapshot"></div>
2323

2424
<script src="../../node_modules/mathjax-v2/MathJax.js?config=TeX-AMS-MML_SVG"></script>
25-
<script charset="utf-8" id="source" src="../../build/plotly.js" type="module"></script>
25+
<script charset="utf-8" id="source" src="../../build/plotly.js"></script>
2626
<script charset="utf-8" src="../../build/test_dashboard-bundle.js"></script>
2727
</body>
2828
</html>

0 commit comments

Comments
 (0)