Skip to content

Commit

Permalink
add line styling to contour_legend test image and fix it for histogra…
Browse files Browse the repository at this point in the history
…m2dcontour
  • Loading branch information
alexcjohnson committed Aug 14, 2018
1 parent e25b9ff commit 73f279b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/traces/histogram2dcontour/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Histogram2dContour.hoverPoints = require('../contour/hover');
Histogram2dContour.moduleType = 'trace';
Histogram2dContour.name = 'histogram2dcontour';
Histogram2dContour.basePlotModule = require('../../plots/cartesian');
Histogram2dContour.categories = ['cartesian', 'svg', '2dMap', 'contour', 'histogram'];
Histogram2dContour.categories = ['cartesian', 'svg', '2dMap', 'contour', 'histogram', 'showLegend'];
Histogram2dContour.meta = {
hrName: 'histogram_2d_contour',
description: [
Expand Down
Binary file modified test/image/baselines/contour_legend.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 10 additions & 7 deletions test/image/mocks/contour_legend.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"z":[[1, 2, 3], [4, 5, 6], [7, 8, 9]],
"showscale": false,
"showlegend": true,
"line": {"width": 2},
"line": {"width": 2, "dash": "dot"},
"name": "lines"
}, {
"type": "contour",
Expand All @@ -30,21 +30,24 @@
}, {
"type": "contour",
"contours": {"coloring": "heatmap"},
"line": {"width": 3, "color": "#cf0", "dash": "dashdot"},
"z": [[1, 2], [3, 4]],
"showscale": false,
"showlegend": true,
"y": [2, 3],
"name": "heatmap 1"
"name": "heatmap"
}, {
"type": "contour",
"type": "histogram2dcontour",
"contours": {"coloring": "heatmap"},
"z": [[1, 2], [3, 4]],
"xbins": {"start": 0.5, "end": 2.5, "size": 1},
"ybins": {"start": 1.5, "end": 3.5, "size": 1},
"line": {"color": "#f00", "dash": "dot"},
"showscale": false,
"showlegend": true,
"colorscale": "Viridis",
"x": [1, 2],
"y": [2, 3],
"name": "heatmap 2"
"x": [1.1, 1.1, 1.1, 1.8, 1.8, 1.1, 1.8, 1.8, 1.8, 1.8],
"y": [2.2, 2.8, 2.8, 2.2, 2.2, 2.8, 2.8, 2.8, 2.8, 2.8],
"name": "histogram"
}],
"layout":{
"autosize":false,
Expand Down

0 comments on commit 73f279b

Please sign in to comment.