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
版权声明:本文标题:lightningchart - LightningChartJS Drawing Issue - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1738439899a2086897.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论