在单值或常量值(highchart)的情况下,在x轴上绘制的样条图 [英] Spline chart drawn on the xaxis in case of single value or constant values - highchart
问题描述
在使用旧版本的highchart - 2.1.6时,如果一个图只有一个值或一系列相同的值,则会在屏幕中间显示如下。
while using the older version of highchart - 2.1.6, if a plot had only one value or a series of same values, it would plot at the middle of the screen as below.
但是,自从我升级了highchart的版本到4.1 .5,线条粘在底部,在xaxis上。喜欢这个。
But, ever since i have upgraded the version of the highchart to 4.1.5, the line sticks to the bottom, on the xaxis. like this.
我我正在寻找的选项将其设置回正常,但还没有找到它。帮助我。
I am looking for the option to set it back to normal but, didn't find it yet. Help me out with this please.
我试过在系列上的pointPadding,甚至在yAxis maxPadding,但没有用。
这里是复制的小提琴 -
I have tried pointPadding on the series and even maxPadding on the yAxis, but no use. Here is the fiddle where it is replicated -
http://jsfiddle.net/ka4p4sym/2/
var chart = $('#container').highcharts();
推荐答案
我会设置 yAxis。 minRange
选项,演示。它不会将行正好放在中间,但会在顶部和底部留出一些额外的空间。
I would set yAxis.minRange
option, demo. It won't place line exactly in the middle, but will make some extra space on top and bottom.
这篇关于在单值或常量值(highchart)的情况下,在x轴上绘制的样条图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!