Skip to content

Commit 73f279b

Browse files
committed
add line styling to contour_legend test image and fix it for histogram2dcontour
1 parent e25b9ff commit 73f279b

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

src/traces/histogram2dcontour/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Histogram2dContour.hoverPoints = require('../contour/hover');
2323
Histogram2dContour.moduleType = 'trace';
2424
Histogram2dContour.name = 'histogram2dcontour';
2525
Histogram2dContour.basePlotModule = require('../../plots/cartesian');
26-
Histogram2dContour.categories = ['cartesian', 'svg', '2dMap', 'contour', 'histogram'];
26+
Histogram2dContour.categories = ['cartesian', 'svg', '2dMap', 'contour', 'histogram', 'showLegend'];
2727
Histogram2dContour.meta = {
2828
hrName: 'histogram_2d_contour',
2929
description: [
4.9 KB
Loading

test/image/mocks/contour_legend.json

+10-7
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"z":[[1, 2, 3], [4, 5, 6], [7, 8, 9]],
1414
"showscale": false,
1515
"showlegend": true,
16-
"line": {"width": 2},
16+
"line": {"width": 2, "dash": "dot"},
1717
"name": "lines"
1818
}, {
1919
"type": "contour",
@@ -30,21 +30,24 @@
3030
}, {
3131
"type": "contour",
3232
"contours": {"coloring": "heatmap"},
33+
"line": {"width": 3, "color": "#cf0", "dash": "dashdot"},
3334
"z": [[1, 2], [3, 4]],
3435
"showscale": false,
3536
"showlegend": true,
3637
"y": [2, 3],
37-
"name": "heatmap 1"
38+
"name": "heatmap"
3839
}, {
39-
"type": "contour",
40+
"type": "histogram2dcontour",
4041
"contours": {"coloring": "heatmap"},
41-
"z": [[1, 2], [3, 4]],
42+
"xbins": {"start": 0.5, "end": 2.5, "size": 1},
43+
"ybins": {"start": 1.5, "end": 3.5, "size": 1},
44+
"line": {"color": "#f00", "dash": "dot"},
4245
"showscale": false,
4346
"showlegend": true,
4447
"colorscale": "Viridis",
45-
"x": [1, 2],
46-
"y": [2, 3],
47-
"name": "heatmap 2"
48+
"x": [1.1, 1.1, 1.1, 1.8, 1.8, 1.1, 1.8, 1.8, 1.8, 1.8],
49+
"y": [2.2, 2.8, 2.8, 2.2, 2.2, 2.8, 2.8, 2.8, 2.8, 2.8],
50+
"name": "histogram"
4851
}],
4952
"layout":{
5053
"autosize":false,

0 commit comments

Comments
 (0)