Skip to content

Commit 25016f2

Browse files
committed
no valLetter (no y) -> nullArray
1 parent 49047b4 commit 25016f2

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

devtools/test_dashboard/index.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,11 @@
235235
yanchor: "bottom",
236236
},
237237
};
238-
Plotly.newPlot("tester", data2);
238+
// Plotly.newPlot("tester", data2);
239+
</script>
240+
<script>
241+
let data3 = [{ x: ["a", "b", "c"], base: [0.2, -0.2, 1], type: "bar" }];
242+
Plotly.newPlot("tester", data3);
239243
</script>
240244
</body>
241245
</html>

src/plots/cartesian/set_convert.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,9 +407,12 @@ module.exports = function setConvert(ax, fullLayout) {
407407
arrays.push(trace.z);
408408
}
409409
valLetter = 'z';
410-
} else {
410+
} else if(trace.y) {
411411
arrays.push(trace.y);
412412
valLetter = 'y';
413+
} else {
414+
var nullArray = arrayIn.map(function() {return null;});
415+
arrays.push(nullArray);
413416
}
414417
var objList = sortLib.matrixToObjectList(arrays, cols);
415418

0 commit comments

Comments
 (0)