admin管理员组

文章数量:1192157

In certain situations, when there is a significant gap between samples, the chart stops drawing lines after zooming, although the tooltips remain visible. Below is a demo code that reproduces the issue:

// Import LightningChartJS
const lcjs = require('@lightningchart/lcjs')

// Extract required parts from LightningChartJS.
const { lightningChart, AxisTickStrategies, Themes, emptyFill } = lcjs

// Create a XY Chart.
const chart = lightningChart().ChartXY({
    theme: Themes.darkGold,
})


chart
    .setPadding({
        right: 50,
    })
    .setTitle('Diesel and Gasoline Price Comparison')

// 设置 x 轴的样式
chart.xAxis
    .setTickStrategy(AxisTickStrategies.DateTime, (strategy) => strategy.setDateOrigin(new Date()))
    .setIntervalRestrictions({
        startMin: 0,
        endMax: 86400588
    })

// 设置 Y 轴的限制
chart.yAxis.setIntervalRestrictions({
    startMin: -10,
    endMax: 20
})
// 添加 series
const series = chart.addPointLineAreaSeries({
    dataPattern: 'ProgressiveX'
})

series.setEffect(false).setAreaFillStyle(emptyFill)

const xValues = [-1412]
for(let i = 42520921; i < 86398922; i += 2000) {
    xValues.push(i)
}
const yValues = []
xValues.forEach(x => {
    yValues.push(Math.random() * 10)
})

series.appendSamples({
    xValues, yValues
})

I also recorded a user interaction video that demonstrates how the series line sometimes disappears when using the mouse wheel, but may reappear with continued scrolling.

enter image description here

I would appreciate your feedback on this issue and any assistance you can provide to resolve it.

本文标签: lightningchartLightningChartJS Drawing IssueStack Overflow