Click here to Skip to main content
15,886,030 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hi all,
i want to pass data in 3d charts i.e; x-axis and y-axis,z-axis. This is my requirement.
please provide soultion regarding this.

Thanks in Advance

What I have tried:

i have tried for 2d charts, it is working fine, but the same way i need to pass data in 3d charts like x-axis,y-axis,z-axis.
Posted
Updated 30-Jun-18 0:27am
Comments
Richard Deeming 29-Jun-18 9:22am    
Since you haven't told us which of the thousands of Javascript charting libraries you're using, nor shown us what you've tried, there's no way anyone can help you.

Click the green "Improve question" link and edit your question. Include the details of which charting library you're using, what you've tried, and where you're stuck. Include the full details of any errors, and remember to indicate which line of code they relate to.

Hi,
If you mean standard javascript, so have a look at this link ;)

Plotly.js 3D Charts[^]
 
Share this answer
 
USE THIS CODE





<meta http-equiv="content-type" content="text/html; charset=UTF-8" />


link rel="stylesheet" type"text/css:" href="style.css">


Plotly.d3.csv('data_file.csv',function(err,rows)
{
console.log(rows);
var data = [];
for (let i = 0; i &lt; rows.length; i++)
{
data.push(rows.map(row => row [i]));
}
console.log(data);
Plotly.netPlot('chart',[{
z:data,
type: 'surface'
}]);
});
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900