You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Highcharts 10.2.1版本散点图异常显示为折线的问题咨询

关于Highcharts散点图显示异常及版本相关问题

我制作了一个尽可能贴近生产环境的示例,但其中的系列未显示为散点图,而是折线图。该问题今日出现,显然是因为CDN开始提供10.2.1版本。

我的问题:

  • 这是Bug还是我配置有误?
  • 如何指定使用之前可用的版本(大概率是9版本)?
  • 生产环境中控制台还出现崩溃(截图如下),该图表与示例本质相同,但包含数百个数据点的更长系列。

补充:经确认,8.2和9.1.0版本也存在此问题

控制台崩溃截图

console.log('Creating chart: Windrichting');
chart = Highcharts.StockChart('chartcontainer', {
    title: {
        text: 'Windrichting',
    },
    xAxis: {
        type: 'datetime',
    },
    yAxis: {
        id: 'Direction',
        title: {
            text: 'Directrion (Compass / degrees)'
        },
        opposite: false,
        min: 0,
        max: 360,
        tickInterval: 45,
        labels: {
            align: 'right',
            x: -5,
            y: -2,
            formatter: function () {
                return compassP(this.value);
            }
        },
        allowDecimals: false
    },
    legend: {
        enabled: true
    },
    series: [],
});
chart.showLoading();
WindrichtingAddSeries(chart);
chart.hideLoading();
chart.redraw();
console.log('Creating chart: Done');


function WindrichtingAddSeries(thisChart) {
  thisChart.addSeries({
    name: 'Kompasrichting',
    id: 'Bearing',
    data: [[1661789460000,13],[1661789520000,26],[1661789580000,19],[1661789640000,12],[1661789700000,17],[1661789760000,354],[1661789820000,357]],
    color: '',
    yAxis: 'Direction',
    type: 'scatter',
    lineWidth: 2,
    zIndex: 5,
    tooltip: {
      valueSuffix: ' '
    }
  }, false);
  thisChart.addSeries({
    name: 'Gem. Kompasrichting',
    id: 'AverageBearing',
    data: [[1661789460000,90],[1661789520000,100],[1661789580000,120],[1661789640000,130],[1661789700000,120],[1661789760000,110],[1661789820000,100]],
    color: '',
    yAxis: 'Direction',
    type: 'scatter',
    lineWidth: 2,
    zIndex: 5,
    tooltip: {
      valueSuffix: ' '
    }
  }, false);
}

function compassP(deg) {
        var a = ['N', 'NE', 'E', 'SE', 'S', 'SW', 'W', 'NW'];
        return a[Math.floor((deg + 22.5) / 45) % 8];
    };

内容的提问来源于stack exchange,提问作者Hans Rottier

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.20 21:18:32