diff --git a/src/traces/contour/plot.js b/src/traces/contour/plot.js index cc391889854..857f9e6dfad 100644 --- a/src/traces/contour/plot.js +++ b/src/traces/contour/plot.js @@ -408,7 +408,8 @@ exports.labelFormatter = function(contours, colorbar, fullLayout) { formatAxis = { type: 'linear', _id: 'ycontour', - showexponent: 'all' + showexponent: 'all', + exponentformat: 'B' }; if(contours.type === 'constraint') { diff --git a/test/image/baselines/contour_label-thousands-suffix.png b/test/image/baselines/contour_label-thousands-suffix.png new file mode 100644 index 00000000000..9d9fa9ebb2c Binary files /dev/null and b/test/image/baselines/contour_label-thousands-suffix.png differ diff --git a/test/image/mocks/contour_label-thousands-suffix.json b/test/image/mocks/contour_label-thousands-suffix.json new file mode 100644 index 00000000000..c7a8e831c1c --- /dev/null +++ b/test/image/mocks/contour_label-thousands-suffix.json @@ -0,0 +1,50 @@ +{ + "data": [{ + "type": "contour", + "colorscale": [ + [0, "rgb(0,32,255)"], + [1, "rgb(0,32,255)"] + ], + "contours": { + "coloring": "lines", + "start": 3545.44829464, + "end": 9774, + "size": 100, + "showlabels": true, + "labelfont": { + "color": "black", + "family": "Raleway", + "size": 14 + } + }, + "showscale": false, + "y": [ + 30000, + 63333.3333333, + 30000, + 63333.3333333 + ], + "x": [ + 10000, + 10000, + 25000, + 25000 + ], + "line": { + "dash": "solid" + }, + "z": [ + 3545.44829464, + 5401.29856219, + 4287.07467078, + 6254.05596683 + ] + }], + "layout": { + "title": "in_Fz_tar = f(in_Fy_tar)", + "margin": {"r": 80}, + "legend": { + "font": {"size": 9} + } + } +}