Skip to content

Commit 7f74764

Browse files
authored
Merge pull request #7542 from plotly/cam/7531/fix-typos
refactor: Fix typos (and a conditional check)
2 parents ba538c3 + 7fdd4e1 commit 7f74764

File tree

6 files changed

+8
-7
lines changed

6 files changed

+8
-7
lines changed

draftlogs/7542_fix.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Fix some typos (and a conditional check) [[#7542](https://github.com/plotly/plotly.js/pull/7542)], with thanks to @musvaage for the contribution!

src/components/colorbar/draw.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ function drawColorBar(g, opts, gd) {
401401
ax.tickfont.size :
402402
0
403403
) + (
404-
ax.ticks !== 'intside' ?
404+
ax.ticks !== 'inside' ?
405405
opts.ticklen || 0 :
406406
0
407407
);

src/plot_api/plot_api.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,7 @@ function assertExtendTracesArgs(gd, update, indices, maxPoints) {
742742
(!(key in maxPoints) || !Array.isArray(maxPoints[key]) ||
743743
maxPoints[key].length !== update[key].length)) {
744744
throw new Error('when maxPoints is set as a key:value object it must contain a 1:1 ' +
745-
'corrispondence with the keys and number of traces in the update object');
745+
'correspondence with the keys and number of traces in the update object');
746746
}
747747
}
748748
}

test/image/baselines/h-colorbar03.png

293 Bytes
Loading

test/jasmine/tests/plot_api_test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1903,12 +1903,12 @@ describe('Test plot api', function() {
19031903
expect(function() {
19041904
Plotly.extendTraces(gd, {x: [[1]]}, [0], {y: [1]});
19051905
}).toThrow(new Error('when maxPoints is set as a key:value object it must contain a 1:1 ' +
1906-
'corrispondence with the keys and number of traces in the update object'));
1906+
'correspondence with the keys and number of traces in the update object'));
19071907

19081908
expect(function() {
19091909
Plotly.extendTraces(gd, {x: [[1]]}, [0], {x: [1, 2]});
19101910
}).toThrow(new Error('when maxPoints is set as a key:value object it must contain a 1:1 ' +
1911-
'corrispondence with the keys and number of traces in the update object'));
1911+
'correspondence with the keys and number of traces in the update object'));
19121912
});
19131913

19141914
it('should throw an error when update keys mismatch trace keys', function() {

test/plot-schema.json

Lines changed: 3 additions & 3 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",
@@ -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"

0 commit comments

Comments
 (0)