Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
lwlwlwlw opened this issue Mar 16, 2017 · 3 comments
Closed

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

lwlwlwlw opened this issue Mar 16, 2017 · 3 comments

Comments

@lwlwlwlw
Copy link

lwlwlwlw commented Mar 16, 2017

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.

@lwlwlwlw lwlwlwlw changed the title reopening (reopening) failed to render 3d surface chart on specific data. Mar 16, 2017
@etpinard
Copy link
Contributor

Hi, I closed #1474 because as per our Contributing guidelines, GitHub issues are reserved for bug reports and feature request only.

In that same ticket I pointed you our https://community.plot.ly/ which to the best place to ask questions because 1) more users can offer solutions 2) more users can benefit from it.

I hope you understand.

@lwlwlwlw
Copy link
Author

Thank you very much etpinard, I totally understand and completely agree with you. I am sorry for any inconvenience.

Since the data I given above is a simple triangle and I guess it should can be rendered in 3d surface chart however it couldn't, it looks like a bug to me. Of source I might be wrong in my code, although the exact same logic works fine for data with more points.

Could you please kindly take a look at it? Thank you.

@archmoj
Copy link
Contributor

archmoj commented Mar 25, 2019

This is addressed in PR #3638.
@lwlwlwlw Here is a codepen with connectgaps enabled.
Closing.

@archmoj archmoj closed this as completed Mar 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants