Skip to content

Long labels on the x-axis add space between chart and axis #1989

@pvictor

Description

@pvictor

Bug report

Using long labels on the x-axis add an extra gap between the y-axis and the chart: Here's a visual explanation:

image

Link to codepen: https://codepen.io/pvictor-r/pen/GRqjpNa

Code used:

var options2 = {
  chart: {
    height: 380,
    width: "100%",
    type: "bar"
  },
  series: [
    {
      name: "Series 1",
      data: [2, 3]
    }
  ],
  xaxis: {
    categories: ["Weekdays", "Saturday and Sunday"]
  },
  yaxis: {
    axisBorder: {
      show: true,
      color: "#000"
    }
  }
};

var chart2 = new ApexCharts(document.querySelector("#chart2"), options2);

chart2.render();

Thank you!

Victor

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions