Search code examples
apexcharts

need to remove sky background color on bar hover in apexcharts


Hello frontend developers. I just want remove this background color.I am sure about this is background color.

I am using apexcharts

enter image description here

thanks.

enter image description here

I am trying this for solution


Solution

  • You can hide crosshairs. This is documented here: xaxis – ApexCharts.js

    let options = {
      series: [{
        name: 'Series',
        data: [10, 20, 15]
      }],
      chart: {
        type: 'bar',
        height: 350
      },
      xaxis: {
        categories: ['Category 1', 'Category 2', 'Category 3'],
        crosshairs: {
          show: false // <--- HERE
        }
      },
      grid: {
        yaxis: {
          lines: {
            show: false
          }
        }
      },
      dataLabels: {
        enabled: false
      }
    };
    
    let chart = new ApexCharts(document.querySelector('#chart'), options);
    chart.render();
    <script src="https://cdn.jsdelivr.net/npm/apexcharts"></script>
    
    <div id="chart"></div>