VanOord / vue3-plotly

MIT License
10 stars 8 forks source link

Updating a 3d surface plot with axis labels resets viewpoint #11

Closed bolau closed 10 months ago

bolau commented 10 months ago

Hi,

I use vue3-plotly to plot 3D surfaces, which I can update with several controls. When I don't use axis labels, updating the data does not reset the viewpoint (= current orientation of the graph). But when I set labels, it resets the viewpoint to default. Can you think of a workaround?

Best, Boris

const layout = computed(() => {
    return {
        scene: {
            xaxis: { title: { text: props.params.layout.xlabel }},
            yaxis: { title: { text: props.params.layout.ylabel }},
            zaxis: { title: { text: props.params.layout.zlabel }}
        }
    }
})
bolau commented 10 months ago

I noticed that this is a problem in plotly.js, not in vue3-plotly.