In the highchart site, they have an example of a draggable scatter box in which you can do 3d rotation
I was able to create the 3d graph using ember-highchart
, however I have yet to figure out how to add the event of rotation in ember. What is the best way to do something like that ?
here is my component containing ember-highchart
threed-graph.hbs
threed-graph.js
chartOptions: Ember.computed('array', function(){
return {
chart: {
renderTo: 'container',
margin: 100,
type: 'scatter',
options3d: {
enabled: true,
alpha: 10,
beta: 30,
depth: 250,
viewDistance: 5,
fitToPlot: false,
frame: {
bottom: { size: 1, color: 'rgba(0,0,0,0.02)' },
back: { size: 1, color: 'rgba(0,0,0,0.04)' },
side: { size: 1, color: 'rgba(0,0,0,0.06)' }
}
}
},
title: {
text: 'XYZ'
},
subtitle: {
text: 'Click on point to find coordinates'
},
plotOptions: {
scatter: {
width: 10,
height: 10,
depth: 10
}
},
yAxis: {
min: -10,
max: 10,
title: null
},
xAxis: {
min: -10,
max: 10,
gridLineWidth: 1
},
zAxis: {
min: -10,
max: 10,
showFirstLabel: false
},
legend: {
enabled: false
},
series: [{
name: 'Reading',
colorByPoint: true,
data: this.get('array')
}]
}
})
Aucun commentaire:
Enregistrer un commentaire