Hide/remove values (in a range) from y axis in columnrange chart - Javascript highcharts

Javascript examples for highcharts:Chart Value

Description

Hide/remove values (in a range) from y axis in columnrange chart

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <title>Highcharts Demo</title> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
   </head> 
   <body> 
      <script src="https://code.highcharts.com/highcharts.js"></script> 
      <script src="https://code.highcharts.com/highcharts-more.js"></script> 
      <script src="https://code.highcharts.com/modules/broken-axis.js"></script> 
      <script src="https://code.highcharts.com/modules/exporting.js"></script> 
      <div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div> 
      <script type="text/javascript">
Highcharts.chart('container', {
  chart: {//www  .  j a  v a 2  s  .c o m
    type: 'columnrange',
    inverted: true
  },
  xAxis: {
    categories: ['FirstTask']
  },
  yAxis: {
    type: 'datetime',
    tickInterval: 24 * 36e5,
    breaks: [{
      from: Date.UTC(2017, 5, 19),
      to: Date.UTC(2017, 5, 20),
      breakSize: 0
    }],
    labels: {
      formatter: function () {
        const hide = Date.UTC(2017, 5, 19) <= this.value && this.value < Date.UTC(2017, 5, 20)
        return !hide ? this.axis.defaultLabelFormatter.call(this) : null
      }
    }
  },
  series: [{
    data: [[14977185387, 14981505387]]
  }],
});

      </script>  
   </body>
</html>

Related Tutorials