Highcharts Display Xaxis plot line

Tags: , ,



How can I enable only the left most Highcharts XAxis plot line on DateTime Line chart. I suppose there should be a default option to display XAxis line without needing to know the minimum/start value

My progress so far -> https://jsfiddle.net/Lpjb9wc7/

enter image description here

const chart = Highcharts.chart('container', {

credits: {
  enabled: false,
},
title: null,
xAxis: {
  title: 'Session',
  type: 'datetime',
  tickInterval: 3600 * 1000,
  gridLineWidth: 1
},
yAxis: {
  gridLineWidth: 0,
  title: {
    text: 'Temperature',
  },
},
legend: {
  enabled: false,
},
plotOptions: {
  series: {
    marker: {
      enabled: false,
    },
  },
},
series: [
  {
    data: [
      [1369206795000, 1],
      [1369225421000, 3],
      [1369230934000, 2],
    ],
  },
],

});

Answer

You need to change the dafault value of the lineWidth property.

    yAxis: {
        lineWidth: 1,
        ...
    }

Live demo: https://jsfiddle.net/BlackLabel/49078gLx/

API Reference: https://api.highcharts.com/highcharts/yAxis.lineWidth



Source: stackoverflow