javascript - highstock xaxis.ordnial = true 不工作
问题描述
我想消除烛台 highstock 图表中创建的缺口。我尝试设置 ordinal = true,但没有任何变化。我的图表在平日/周末产生了很多空白。这是 HighStock 图表的错误吗?
var chart = Highcharts.stockChart({
chart: {
renderTo: 'container',
events: {
load: function () {
//---get new tick
}
}
},
navigator: {
margin: 2
},
rangeSelector: {
allButtonsEnabled: true,
selected: 2
},
title: {
text: 'STOCHASTIC'
},
xAxis: {
ordinal: true
},
series: [{
type: 'candlestick',
name: 'STOCHASTIC',
data: content,
dataGrouping: {
units: [
[
'week', // unit name
[1] // allowed multiples
], [
'month',
[1, 2, 3, 4, 6]
]
]
}
}]
});
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<div id="container" style="height: 400px; min-width: 600px"></div>
<script src="https://code.highcharts.com/stock/highstock.js"></script>
<script src="https://code.highcharts.com/stock/modules/exporting.js"></script>
解决方案
推荐阅读
- r - 动态替换 R Shiny 数据表中的选项
- reactjs - 在 Typescript 中实现基于类型的特定行为
- php - TypeTestCase 与 EntityType 和 ServiceEntityRepository
- security - 分组密码的出口管制是什么?
- raspberry-pi - 如何在树莓派等边缘设备中加载或推断 onnx 模型?
- node.js - 如何在 Heroku 上运行 redis?
- kotlin - 何时为类中的协程指定 Dispatchers.xxx
- sql - 带有 NEW 的 JPQL 请求花费了太多时间
- javascript - 如何在 JS 中为前 2 个字符编写正则表达式,可以是数字或字母,后跟连字符,然后是 6 位数字?
- android - 缩小应用程序时,Android PDF 查看器崩溃