Connected graphs BUG
HTML
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>Connected ECharts Demo</title>
<style>
.chart-container {
width: 100%;
height: 400px;
margin-bottom: 20px;
background: white;
border: 1px solid #ddd;
border-radius: 4px;
}
</style>
<!-- Import ECharts from CDN -->
<script src="https://cdn.jsdelivr.net/npm/echarts@5.6.0/dist/echarts.min.js"></script>
</head>
<body>
<h1>Connected ECharts Demo</h1>
<p>Changes in one chart affect both charts (zoom, tooltip, etc.)</p>
<!-- Chart containers -->
<div id="chart1" class="chart-container"></div>
<div id="chart2" class="chart-container"></div>
<script>
// Sample data
const data1 = generateData(50)
const data2 = generateData(50)
// Initialize ECharts instances
const chart1 = echarts.init(document.getElementById("chart1"))
const chart2 = echarts.init(document.getElementById("chart2"))
// Common options for both charts
const commonOptions = {
tooltip: {
trigger: "axis",
axisPointer: {
type: "cross",
crossStyle: {
color: "#999",
},
lineStyle: {
type: "dashed",
},
},
},
grid: {
left: "5%",
right: "5%",
top: "60px",
bottom: "60px",
containLabel: true,
},
xAxis: {
type: "time",
axisLabel: {
formatter: function (value) {
const date = new Date(value)
return date.toLocaleTimeString()
},
},
},
yAxis: {
type: "value",
min: 0,
max: 100,
},
dataZoom: [
{
type: "inside",
xAxisIndex: 0,
filterMode:...