我正在使用 LightningChartJs v. 1.3.1。并在可滚动的页面上有一个图表。
当鼠标指针悬停在图表上时,页面不再可滚动。
我试过chart.setMouseInteractions(false)
没有成功。
在带触摸板的 Mac 上试过。不确定鼠标滚轮的行为是否相同。
请看下面的例子:
const {
lightningChart,
AxisTickStrategies
} = lcjs
const chart = lightningChart().ChartXY({
containerId: "chart",
defaultAxisXTickStrategy: Object.assign({}, AxisTickStrategies.Numeric)
});
chart.setMouseInteractions(false);
.wrapper {
with: 100%;
height: 1000px;
background: #FFFFF0;
}
h1 {
text-align: center;
margin-bottom: 200px;
padding: 20px;
}
<div class="wrapper">
<h1>Please scroll down!</h1>
<div id="chart"></div>
</div>
<script src="https://unpkg.com/@arction/lcjs@1.3.1/dist/lcjs.iife.js"></script>