Change Colorbar Axis

How would i change the colorbar axis from “y” to “z” in a 3d surface chart ?

I identified it from the plot.ly code .

data : { x: 'x', y: 'y', z: 'z', type: 'surface', caxis : "z", }

Use the surfacecolor attribute to map arbitrary 2D arrays to the color dimension.

Example code and result.