As also reported in here https://github.com/plotly/plotly.js/issues/3306#issuecomment-449330809 The user may get errors creating a `surface` trace in scenarios e.g. when the z array is empty. Here is a [demo](https://codepen.io/MojtabaSamimi/pen/OrpwWj).