@@ -6,7 +6,7 @@ export default Ember.Component.extend({
init ( ) {
this . _super ( ...arguments ) ;
Plotly . d3 . csv ( 'https ://raw.githubusercontent.com/plotly/datasets/master/3d-scatter .csv' , function ( err , rows ) {
Plotly . d3 . csv ( 'http ://localhost:3700/skull .csv' , function ( err , rows ) {
function unpack ( rows , key ) {
return rows . map ( function ( row )
{ return row [ key ] ; } ) ; }
@@ -15,15 +15,17 @@ export default Ember.Component.extend({
x :unpack ( rows , 'x1' ) , y : unpack ( rows , 'y1' ) , z : unpack ( rows , 'z1' ) ,
mode : 'markers' ,
marker : {
size : 12 ,
size : 6 ,
line : {
color : 'rgba(217, 217, 217, 0.14 )' ,
color : 'rgba(0, 0, 0, 1 )' ,
width : 0.5 } ,
opacity : 0.8 } ,
markeredgewidth : 0.0 ,
opacity : .1 } ,
type : 'scatter3d'
} ;
var trace2 = {
/* var trace2 = {
x:unpack(rows, 'x2'), y: unpack(rows, 'y2'), z: unpack(rows, 'z2'),
mode: 'markers',
marker: {
@@ -34,9 +36,9 @@ export default Ember.Component.extend({
color: 'rgb(204, 204, 204)',
width: 1},
opacity: 0.8},
type : 'scatter3d ' } ;
type: 'surface '};*/
var data = [ trace1 , trace2 ] ;
var data = [ trace1 ] ;
var layout = { margin : {
l : 100 ,
r : 100 ,
@@ -46,6 +48,47 @@ export default Ember.Component.extend({
//console.log(data);
Plotly . newPlot ( 'tester' , data , layout ) ;
} ) ;
/*Plotly.d3.csv("http://localhost:3700/ventricles.csv", function(err, rows){
console.log(rows);
function unpack(rows, key) {
return rows.map(function(row)
{ return row[key]; });}
var trace1 = {
x:unpack(rows, 'x1'), y: unpack(rows, 'y1'), z: unpack(rows, 'z1'),
mode: 'markers',
/*marker: {
size: 12,
line: {
color: 'rgba(217, 217, 217, 0.14)',
width: 0.5},
opacity: 0.8},
type: 'scatter3d',
};
/*var trace2 = {
x:unpack(rows, 'x2'), y: unpack(rows, 'y2'), z: unpack(rows, 'z2'),
mode: 'markers',
marker: {
color: 'rgb(127, 127, 127)',
size: 12,
symbol: 'circle',
line: {
color: 'rgb(204, 204, 204)',
width: 1},
opacity: 0.8},
type: 'scatter3d'};
var data = [trace1];
var layout = {margin: {
l: 1000,
r: 1000,
b: 1000,
t: 1000
}};
console.log(data);
Plotly.newPlot('tester', data, layout);
});*/
} ,
actions : {