You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to plot D3 X3D charts with points. A basic example uses a random set of them. I want to plot data from arrays, how to pass data to the variable "var myData"? For example, I have "1 2 3 4 5, 6 7 8 9 10" for axis variables.
<script>
// Select chartholder
var chartHolder = d3.select("#chartholder");
// Declare the chart component
var myChart = d3.x3d.chart.scatterPlot()
.mappings({ x: 'x', y: 'y', z: 'z', size: 'size', color: 'color' })
.colors(d3.schemeRdYlGn[8])
.sizeRange([0.1, 1.5]);
var refreshChart = function() {
// Generate some data
var myData = d3.x3d.randomData.dataset6(200);
chartHolder.datum(myData).call(myChart);
};
d3.select("#refresh").attr("onclick", "refreshChart()");
refreshChart();
</script>
There is a good example for Bar charts. There we have Keys with [] holders. I want to make it here.
I am trying to plot D3 X3D charts with points. A basic example uses a random set of them. I want to plot data from arrays, how to pass data to the variable "var myData"? For example, I have "1 2 3 4 5, 6 7 8 9 10" for axis variables.
There is a good example for Bar charts. There we have Keys with [] holders. I want to make it here.
From:
https://stackoverflow.com/questions/73078754/how-to-load-array-data-into-d3-x3d-charts
The text was updated successfully, but these errors were encountered: