when all the values are 0 in the chart and I don't have a max axis value I am getting blank space in place of bars
Asked
Active
Viewed 161 times
0

kishore kingmaker
- 476
- 3
- 15
-
Hi @kishore kingmaker, Could you explain your problem more precisely? It seems that the result is correct. – ppotaczek Jul 08 '19 at 11:41
-
@ppotaczek see the 0 lines, it has white space for bars. It should not be shown – kishore kingmaker Jul 08 '19 at 11:45
-
kishore kingmaker - please share your chart configuration object with sample data. – ppotaczek Jul 08 '19 at 11:48
-
@ppotaczek https://jsfiddle.net/zwp0c4qd/17/ u can refer this example js fiddle by me – kishore kingmaker Jul 08 '19 at 11:51
-
@ppotaczek https://codepen.io/anon/pen/MMPMRp but the same is not coming in codepen lol – kishore kingmaker Jul 08 '19 at 12:02
-
Ok, thanks for the example. You can decrease `threshold` property, which is set to `0` by default, to show the columns: https://jsfiddle.net/BlackLabel/4t259bwz/ – ppotaczek Jul 08 '19 at 12:04
-
@ppotaczek, I no need the columns to be shown. It should be like a plain line like the code pen example. Thanks for the try – kishore kingmaker Jul 08 '19 at 12:06
2 Answers
1
You need to increase gridZIndex
property for yAxis
:
yAxis: {
gridZIndex: 4,
...
}
Live demo: https://jsfiddle.net/BlackLabel/0e89puxL/
API Reference: https://api.highcharts.com/highcharts/series.column.minPointLength

ppotaczek
- 36,341
- 2
- 14
- 24
-
-
@kishore kingmaker, so please explain exactly what is the correct result. – ppotaczek Jul 08 '19 at 13:26
-
https://codepen.io/anon/pen/MMPMRp this will be the correct result but its showing only in code pen @ppotaczrk – kishore kingmaker Jul 08 '19 at 13:36
-
@kishore kingmaker - For me the result is the same - the `0` axis grid line is empty in places where there are columns. Could you point out the difference? This is the result from jsfiddle: https://imgur.com/a/fGusPwY – ppotaczek Jul 08 '19 at 13:57
-
see in code pen there is no space for columns which has 0 value – kishore kingmaker Jul 08 '19 at 14:11
-
1Ok, sorry for the misunderstanding - I thought you wanted to achieve the opposite result. Please try to increase `gridZIndex` for `yAxis`. Example: https://jsfiddle.net/45u2entx/ – ppotaczek Jul 08 '19 at 15:02
-
yup that works sup thanks a lot for your patience and effort – kishore kingmaker Jul 08 '19 at 21:45
-
have a small problem on that when I give zindex: 4 for xaxis it also applied on all lines – kishore kingmaker Jul 09 '19 at 13:05
0

kishore kingmaker
- 476
- 3
- 15
-
1You can set the `zIndex` property only if there is one grid line. Example: https://jsfiddle.net/BlackLabel/abx6vy9g/ – ppotaczek Jul 09 '19 at 14:10