如何更改 HighCharts.js 散点图标记位置的位置

how to change the position of HighCharts.js scatterplot marker position

请参考JSFIDDLE

我希望 var x1 的值(即 var x1 = 10;)应该在我更改范围滑块时更改,即::

document.getElementById("range").innerHTML 

求推荐。

针对您的问题,这里有一个简单的解决方案:

http://jsfiddle.net/La9s2cp4/5/

var chart;

function createChart(){

// Set up the chart
chart = new Highcharts.Chart({
    chart: {
        renderTo: 'container',
        margin: 100,
        type: 'scatter',
        options3d: {
            enabled: true,
            alpha: 10,
            beta: 30,
            depth: 250,
            viewDistance: 5,

            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: 'Draggable box'
    },
    subtitle: {
        text: 'Click and drag the plot area to rotate in space'
    },
    plotOptions: {
        scatter: {
            width: 10,
            height: 10,
            depth: 10
        }
    },
    yAxis: {
        min: 0,
        max: 10,
        title: null
    },
    xAxis: {
        min: 0,
        max: 10,
        gridLineWidth: 1
    },
    zAxis: {
        min: 0,
        max: 10,
        showFirstLabel: false
    },
    legend: {
        enabled: false
    },
    series: [{
        name: 'Reading',
        marker: {
            radius: xdata
        },
        colorByPoint: true,
        data: [dataG.data1, dataG.data2, dataG.data3]
    }]
});

}