Skip to content

(reopening) failed to render 3d surface chart on specific data. #1484

Closed
@lwlwlwlw

Description

@lwlwlwlw

reopening #1474 because I have some more questions that need your help.

I am creating a 3d surface chart based on some input data, this data could change from time to time and if by accident, data like below(a triangle) came, then the 3d surface chart can not render correctly.
x,y,z
-1,-1,0
1,-1,0
0,1,1

Code that I have tried:

var x=[-1,0,1];
var y=[-1,1];
var z=[];
z1 = [
[0,null,0],
[null,1,null],
];

var data_z1 = {x:[-1,0,1],y:[-1,1],z: z1, type: 'surface'};
Plotly.newPlot('myDiv', [data_z1]);

In the original ticket, etpinard suggested using mesh3d rather than 3d surface chart. However 3d surface chart best fits the requirement so I have to stick to it and make it renders any data as much as possible.

Since the fact that code I wrote above failed to render the graph so any help would be highly appreciated.

Please don't rush closing this and just give the author one chance to explain himself in case of some misunderstanding. Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions