使用the documentation中的billboardjs的子图表选项可以正常工作。
我想知道的是:
有没有办法在图表顶部显示子图?
我应该如何实现这一目标?
来自docs的示例:
var chart = bb.generate({
data: {
columns: [
["sample", 30, 200, 100, 400, 150, 250]
]
},
size:{width: 500, height: 250},
subchart: {
show: true
},
bindto: "#SubChart"
});
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/billboard.js/dist/billboard.min.css" />
<script src="https://cdn.jsdelivr.net/npm/billboard.js/dist/billboard.pkgd.min.js"></script>
<title>JS Bin</title>
</head>
<body>
<div id="SubChart"></div>
</body>
</html>