gpt4 book ai didi

jquery - HighCharts - 删除堆叠条上系列之间的空间

转载 作者:行者123 更新时间:2023-12-01 04:18:27 25 4
gpt4 key购买 nike

我有一个 HighCharts 图表来显示一些信息。我每天都堆放信息。每个条目都是唯一的 -> 我不能使用单个系列。

问题是:两天之间,有一个巨大的空间,我不知道如何减少或删除它。当我使用 PlotOptions 时没有任何效果。我认为原因是我的xAxis-Handling,因为如果我使用“正常方式”声明xAxis类别,就没有问题。

我的jsFiddle:http://jsfiddle.net/MhL2Q/1/

另一个正在运行的 jsFiddle:jsfiddle_dot_net/wergeld/M85tL/(仅允许 2 个链接)

原始 HighChart 演示:http://jsfiddle.net/gh/get/jquery/1.7.2/highslide-software/highcharts.com/tree/master/samples/highcharts/demo/column-stacked/

最佳答案

您可以使用xAxis.minPaddingxAxis.maxPadding

Padding of the max value relative to the length of the axis. A padding of 0.05 will make a 100px axis 5px longer. This is useful when you don't want the highest data value to appear on the edge of the plot area. When the axis' max option is set or a max extreme is set using axis.setExtremes(), the maxPadding will be ignored. Defaults to 0.

xAxis: {
type: 'datetime',
dateTimeLabelFormats: {
month: '%e. %b',
year: '%b'
},
tickInterval: 24 * 3600 * 1000,
tickWidth: 1,
minPadding: 0.5,
maxPadding: 0.5
}

Padding datetime axis @ jsFiddle

关于jquery - HighCharts - 删除堆叠条上系列之间的空间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12680880/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com