0
HIGH CHARTS

In addition to this question, I would like to ask another question here in this thread.

How to add extra tears(ticks), in such a way, the green bar dataLabel, does stay inside plotting area, rather, going out of plotting area or made hidden. JSFIDDLE

Jeffrin John
  • 675
  • 2
  • 7
  • 16
  • I didn't understand _How to add extra tears(ticks)_ – Deep 3015 Aug 14 '17 at 17:04
  • This is not a proper way but still works. Set cart height . check http://jsfiddle.net/qr9xrLdj/ – Deep 3015 Aug 14 '17 at 17:15
  • Looked at your update. I cannot change the height of chart. I am dynamically generating values, and it keeps on changing. I could not change height every time. If you can suggest me any other idea please? @Deep3015 – Jeffrin John Aug 15 '17 at 04:16

2 Answers2

0

There are lots of ways to do this. But quickest one is adding a max value to yAxis with using yAxis.max.

yAxis: {
        allowDecimals: false,
        max: 6000
    },

Here is the working example: jsFiddle.

OR

You can use the combination of yAxis.tickAmount and yAxis.tickInterval like this;

yAxis: {
        allowDecimals: false,
        tickAmount: 10,
        tickInterval: 1000
    },

Here is the working example: jsFiddle.

Emre Bolat
  • 4,316
  • 5
  • 29
  • 32
0

Besides setting a new max property or trying a different combination of ticks, you can simply set overflow property with 'none' value and crop with false. This way you can display data labels outside the plot area.

API Reference:
http://api.highcharts.com/highcharts/plotOptions.series.dataLabels.overflow
http://api.highcharts.com/highcharts/plotOptions.series.dataLabels.crop

Example:
http://jsfiddle.net/2qtpx0rL/

pawel_d
  • 3,061
  • 1
  • 8
  • 13