blob: 03820d4fb48b4df79385acdf9f71b9dff334aa41 [file]
<!DOCTYPE html>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<html>
<head>
<meta charset="utf-8">
<script src="lib/simpleRequire.js"></script>
<script src="lib/config.js"></script>
<script src="lib/jquery.min.js"></script>
<script src="lib/facePrint.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="lib/reset.css">
<script src="lib/testHelper.js"></script>
<script src="tooltipTestHelper.js"></script>
</head>
<body>
<style>
h1 {
line-height: 60px;
height: 60px;
background: #140;
text-align: center;
font-weight: bold;
color: #eee;
font-size: 14px;
}
.chart {
height: 850px;
}
</style>
<h1>axisPointer link in one echarts instance | after data zoom, link should be normal</h1>
<div class="chart" id="candlestick"></div>
<script>
require([
'echarts'
], function (echarts) {
var dom = document.getElementById('candlestick');
if (!dom) {
return;
}
var chart = echarts.init(dom);
var option = {
dataset: {
source: [
{
category: "Category 1",
revenueGross: 123,
revenueGrossPrevious: 153,
revenueNet: 98,
revenueNetPrevious: 124,
},
{
category: "Category 2",
revenueGross: 235,
revenueGrossPrevious: 143,
revenueNet: 201,
revenueNetPrevious: 102,
}
],
},
series: [
{
type: "bar",
dimensions: ["category", "revenueGross"],
name: "Revenue gross"
},
{
type: "bar",
dimensions: ["category", "revenueGrossPrevious"],
name: "Revenue gross: previous",
itemStyle: {
color: "#5470c6",
opacity: 0.5,
}
},
{
type: "bar",
dimensions: ["category", "revenueNet"],
name: "Revenue net",
},
{
type: "bar",
dimensions: ["category", "revenueNetPrevious"],
name: "Revenue net: previous",
itemStyle: {
color: "#91cc75",
opacity: 0.5,
}
},
],
xAxis: {
type: "category",
id: "category",
},
yAxis: [
{
type: "value",
name: "Revenue",
},
],
legend: {},
tooltip: {
trigger: "axis",
axisPointer: {
type: "shadow",
},
enterable: true,
}
};
chart.setOption(option);
});
</script>
</body>
</html>