Skip to content

Commit d462ac6

Browse files
authored
Merge pull request #5357 from plotly/update-plotlyjs-v3.1.1
Update plotly.js to version 3.1.1
2 parents 6c58277 + ae5f7ae commit d462ac6

20 files changed

+609
-591
lines changed

.github/workflows/check-js-build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ jobs:
2929
cd js
3030
npm ci
3131
npm run build
32+
npm ls
3233
- name: Check JupyterLab build artifacts
3334
run: |
3435
# 1. Hash contents of all static files, sort by content hash

codegen/resources/plot-schema.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4008,7 +4008,7 @@
40084008
"valType": "string"
40094009
},
40104010
"type": {
4011-
"description": "Sets the layer type, that is the how the layer data set in `source` will be rendered With `sourcetype` set to *geojson*, the following values are allowed: *circle*, *line*, *fill* and *symbol*. but note that *line* and *fill* are not compatible with Point GeoJSON geometries. With `sourcetype` set to *vector*, the following values are allowed: *circle*, *line*, *fill* and *symbol*. With `sourcetype` set to *raster* or `*image*`, only the *raster* value is allowed.",
4011+
"description": "Sets the layer type, that is the how the layer data set in `source` will be rendered With `sourcetype` set to *geojson*, the following values are allowed: *circle*, *line*, *fill* and *symbol*. but note that *line* and *fill* are not compatible with Point GeoJSON geometries. With `sourcetype` set to *vector*, the following values are allowed: *circle*, *line*, *fill* and *symbol*. With `sourcetype` set to *raster* or *image*, only the *raster* value is allowed.",
40124012
"dflt": "circle",
40134013
"editType": "plot",
40144014
"valType": "enumerated",
@@ -4414,7 +4414,7 @@
44144414
"valType": "string"
44154415
},
44164416
"type": {
4417-
"description": "Sets the layer type, that is the how the layer data set in `source` will be rendered With `sourcetype` set to *geojson*, the following values are allowed: *circle*, *line*, *fill* and *symbol*. but note that *line* and *fill* are not compatible with Point GeoJSON geometries. With `sourcetype` set to *vector*, the following values are allowed: *circle*, *line*, *fill* and *symbol*. With `sourcetype` set to *raster* or `*image*`, only the *raster* value is allowed.",
4417+
"description": "Sets the layer type, that is the how the layer data set in `source` will be rendered With `sourcetype` set to *geojson*, the following values are allowed: *circle*, *line*, *fill* and *symbol*. but note that *line* and *fill* are not compatible with Point GeoJSON geometries. With `sourcetype` set to *vector*, the following values are allowed: *circle*, *line*, *fill* and *symbol*. With `sourcetype` set to *raster* or *image*, only the *raster* value is allowed.",
44184418
"dflt": "circle",
44194419
"editType": "plot",
44204420
"valType": "enumerated",
@@ -47932,7 +47932,7 @@
4793247932
"valType": "number"
4793347933
},
4793447934
"source": {
47935-
"description": "Specifies the data URI of the image to be visualized. The URI consists of \"data:image/[<media subtype>][;base64],<data>\"",
47935+
"description": "Specifies the data URI of the image to be visualized. The URI consists of \"data:image/[<media subtype\\\\>][;base64\\\\],<data\\\\>\"",
4793647936
"editType": "calc",
4793747937
"valType": "string"
4793847938
},
@@ -53288,7 +53288,7 @@
5328853288
]
5328953289
},
5329053290
"hovertemplate": {
53291-
"description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\" as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, *xother* will be added to those with different x positions from the first point. An underscore before or after *(x|y)other* will add a space on that side, only when this field is shown. Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. This value here applies when hovering over dimensions. Note that `*categorycount`, *colorcount* and *bandcolorcount* are only available when `hoveron` contains the *color* flagFinally, the template string has access to variables `count`, `probability`, `category`, `categorycount`, `colorcount` and `bandcolorcount`. Anything contained in tag `<extra>` is displayed in the secondary box, for example `<extra>%{fullData.name}</extra>`. To hide the secondary box completely, use an empty tag `<extra></extra>`.",
53291+
"description": "Template string used for rendering the information that appear on hover box. Note that this will override `hoverinfo`. Variables are inserted using %{variable}, for example \"y: %{y}\" as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, *xother* will be added to those with different x positions from the first point. An underscore before or after *(x|y)other* will add a space on that side, only when this field is shown. Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example \"Price: %{y:$.2f}\". https://github.com/d3/d3-format/tree/v1.4.5#d3-format for details on the formatting syntax. Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example \"Day: %{2019-01-01|%A}\". https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format for details on the date formatting syntax. The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. This value here applies when hovering over dimensions. Note that *categorycount*, *colorcount* and *bandcolorcount* are only available when `hoveron` contains the *color* flag. Finally, the template string has access to variables `count`, `probability`, `category`, `categorycount`, `colorcount` and `bandcolorcount`. Anything contained in tag `<extra>` is displayed in the secondary box, for example `<extra>%{fullData.name}</extra>`. To hide the secondary box completely, use an empty tag `<extra></extra>`.",
5329253292
"dflt": "",
5329353293
"editType": "plot",
5329453294
"valType": "string"

commands.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -296,8 +296,8 @@ def update_plotlyjs_dev(args, outdir):
296296
perform_codegen(outdir)
297297

298298

299-
def parse_args():
300-
"""Parse command-line arguments."""
299+
def make_parser():
300+
"""Make argument parser."""
301301

302302
parser = argparse.ArgumentParser()
303303
subparsers = parser.add_subparsers(dest="cmd", help="Available subcommands")
@@ -322,6 +322,11 @@ def parse_args():
322322

323323
subparsers.add_parser("updateplotlyjs", help="update plotly.js")
324324

325+
return parser
326+
327+
328+
def parse_args(parser: argparse.ArgumentParser):
329+
"""Parse command line arguments."""
325330
return parser.parse_args()
326331

327332

@@ -331,7 +336,8 @@ def main():
331336
project_root = os.path.dirname(os.path.realpath(__file__))
332337
outdir = os.path.join(project_root, "plotly")
333338

334-
args = parse_args()
339+
parser = make_parser()
340+
args = parse_args(parser)
335341

336342
if args.cmd == "codegen":
337343
perform_codegen(outdir, noformat=args.noformat)
@@ -350,6 +356,10 @@ def main():
350356
print(version)
351357
update_plotlyjs(version, outdir)
352358

359+
elif args.cmd is None:
360+
parser.print_help()
361+
sys.exit(1)
362+
353363
else:
354364
print(f"unknown command {args.cmd}", file=sys.stderr)
355365
sys.exit(1)

js/lib/mimeExtension.js

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

js/package-lock.json

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

js/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
},
2020
"dependencies": {
2121
"lodash-es": "^4.17.21",
22-
"plotly.js": "3.1.0",
22+
"plotly.js": "3.1.1",
2323
"@lumino/widgets": "~2.4.0"
2424
},
2525
"devDependencies": {

plotly/graph_objs/_figure.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9980,7 +9980,7 @@ def add_image(
99809980
source
99819981
Specifies the data URI of the image to be visualized.
99829982
The URI consists of "data:image/[<media
9983-
subtype>][;base64],<data>"
9983+
subtype\\>][;base64\\],<data\\>"
99849984
stream
99859985
:class:`plotly.graph_objects.image.Stream` instance or
99869986
dict with compatible properties
@@ -11853,9 +11853,9 @@ def add_parcats(
1185311853
data. Additionally, every attributes that can be
1185411854
specified per-point (the ones that are `arrayOk: true`)
1185511855
are available. This value here applies when hovering
11856-
over dimensions. Note that `*categorycount`,
11856+
over dimensions. Note that "categorycount",
1185711857
"colorcount" and "bandcolorcount" are only available
11858-
when `hoveron` contains the "color" flagFinally, the
11858+
when `hoveron` contains the "color" flag. Finally, the
1185911859
template string has access to variables `count`,
1186011860
`probability`, `category`, `categorycount`,
1186111861
`colorcount` and `bandcolorcount`. Anything contained

plotly/graph_objs/_figurewidget.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9982,7 +9982,7 @@ def add_image(
99829982
source
99839983
Specifies the data URI of the image to be visualized.
99849984
The URI consists of "data:image/[<media
9985-
subtype>][;base64],<data>"
9985+
subtype\\>][;base64\\],<data\\>"
99869986
stream
99879987
:class:`plotly.graph_objects.image.Stream` instance or
99889988
dict with compatible properties
@@ -11855,9 +11855,9 @@ def add_parcats(
1185511855
data. Additionally, every attributes that can be
1185611856
specified per-point (the ones that are `arrayOk: true`)
1185711857
are available. This value here applies when hovering
11858-
over dimensions. Note that `*categorycount`,
11858+
over dimensions. Note that "categorycount",
1185911859
"colorcount" and "bandcolorcount" are only available
11860-
when `hoveron` contains the "color" flagFinally, the
11860+
when `hoveron` contains the "color" flag. Finally, the
1186111861
template string has access to variables `count`,
1186211862
`probability`, `category`, `categorycount`,
1186311863
`colorcount` and `bandcolorcount`. Anything contained

plotly/graph_objs/_image.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,8 @@ def opacity(self, val):
521521
def source(self):
522522
"""
523523
Specifies the data URI of the image to be visualized. The URI
524-
consists of "data:image/[<media subtype>][;base64],<data>"
524+
consists of "data:image/[<media
525+
subtype\\>][;base64\\],<data\\>"
525526
526527
The 'source' property is a string and must be specified as:
527528
- A string
@@ -1021,7 +1022,7 @@ def _prop_descriptions(self):
10211022
source
10221023
Specifies the data URI of the image to be visualized.
10231024
The URI consists of "data:image/[<media
1024-
subtype>][;base64],<data>"
1025+
subtype\\>][;base64\\],<data\\>"
10251026
stream
10261027
:class:`plotly.graph_objects.image.Stream` instance or
10271028
dict with compatible properties
@@ -1294,7 +1295,7 @@ def __init__(
12941295
source
12951296
Specifies the data URI of the image to be visualized.
12961297
The URI consists of "data:image/[<media
1297-
subtype>][;base64],<data>"
1298+
subtype\\>][;base64\\],<data\\>"
12981299
stream
12991300
:class:`plotly.graph_objects.image.Stream` instance or
13001301
dict with compatible properties

plotly/graph_objs/_parcats.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -249,14 +249,14 @@ def hovertemplate(self):
249249
Additionally, every attributes that can be specified per-point
250250
(the ones that are `arrayOk: true`) are available. This value
251251
here applies when hovering over dimensions. Note that
252-
`*categorycount`, "colorcount" and "bandcolorcount" are only
253-
available when `hoveron` contains the "color" flagFinally, the
254-
template string has access to variables `count`, `probability`,
255-
`category`, `categorycount`, `colorcount` and `bandcolorcount`.
256-
Anything contained in tag `<extra>` is displayed in the
257-
secondary box, for example `<extra>%{fullData.name}</extra>`.
258-
To hide the secondary box completely, use an empty tag
259-
`<extra></extra>`.
252+
"categorycount", "colorcount" and "bandcolorcount" are only
253+
available when `hoveron` contains the "color" flag. Finally,
254+
the template string has access to variables `count`,
255+
`probability`, `category`, `categorycount`, `colorcount` and
256+
`bandcolorcount`. Anything contained in tag `<extra>` is
257+
displayed in the secondary box, for example
258+
`<extra>%{fullData.name}</extra>`. To hide the secondary box
259+
completely, use an empty tag `<extra></extra>`.
260260
261261
The 'hovertemplate' property is a string and must be specified as:
262262
- A string
@@ -619,9 +619,9 @@ def _prop_descriptions(self):
619619
data. Additionally, every attributes that can be
620620
specified per-point (the ones that are `arrayOk: true`)
621621
are available. This value here applies when hovering
622-
over dimensions. Note that `*categorycount`,
622+
over dimensions. Note that "categorycount",
623623
"colorcount" and "bandcolorcount" are only available
624-
when `hoveron` contains the "color" flagFinally, the
624+
when `hoveron` contains the "color" flag. Finally, the
625625
template string has access to variables `count`,
626626
`probability`, `category`, `categorycount`,
627627
`colorcount` and `bandcolorcount`. Anything contained
@@ -802,9 +802,9 @@ def __init__(
802802
data. Additionally, every attributes that can be
803803
specified per-point (the ones that are `arrayOk: true`)
804804
are available. This value here applies when hovering
805-
over dimensions. Note that `*categorycount`,
805+
over dimensions. Note that "categorycount",
806806
"colorcount" and "bandcolorcount" are only available
807-
when `hoveron` contains the "color" flagFinally, the
807+
when `hoveron` contains the "color" flag. Finally, the
808808
template string has access to variables `count`,
809809
`probability`, `category`, `categorycount`,
810810
`colorcount` and `bandcolorcount`. Anything contained

0 commit comments

Comments
 (0)