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

标签 jquery space highcharts stacked

我有一个 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/

相关文章:

java - Java中如何在字符串中的数字和单词之间添加空格?

javascript - 带有全高背景条的 Highcharts 值条

highcharts - 具有多个级别的钻取图表

javascript - 动画结束时执行动画

javascript - 为什么我的 Javascript switch 语句不起作用?

javascript - jQuery:计算可见元素 - 效率/速度问题

jQuery UI 可拖动约束

java - 关于Java中的HotSpot优化

html - 无法弄清楚空白空间来自哪里

Javascript 基于多个级别以平面格式创建数组