Skip to content

stackLabels of the bar chart with multiple xAxes is incorrectly positioned in version 11.4.1 #21174

@PartyStar1220

Description

@PartyStar1220
Chart title

Expected behaviour

Number 3 should be below, item 0

Actual behaviour

Number 3 is not following the movement of the axis

Live demo with steps to reproduce

Highcharts.chart('container', {
   chart: {
      type: 'bar',
    },
    xAxis: [
      {
        categories: ['1', '2', '3', '4'],
        height: '75%',
        offset: 0,
      },
      {
        categories: ['0'],
        height: '25%',
        top: '80%',
        offset: 0,
      },
    ],
    yAxis: [
      {
        title: {
          text: 'yAxis 1',
        },
        height: '100%',
        stackLabels: {
          enabled: true,
        },
      },
    ],
    plotOptions: {
      bar: {
        minPointLength: 2,
        stacking: 'normal',
        dataLabels: {
          enabled: true,
        },
        borderRadius: 5,
        pointWidth: null,
      },
    },
    series: [  {
    name: 'x',
    xAxis: 0,
    yAxis: 0,
    color: '#bdd7f2',
    data: [3, 5, 1, 13],
  },
  {
    name: 'y',
    xAxis: 0,
    yAxis: 0,
    color: '#8baaf5',
    data: [14, 8, 8, 12],
  },
  {
    name: 'x',
    xAxis: 1,
    yAxis: 0,
    color: '#bdd7f2',
    showInLegend: false,
    data: [1],
  },
  {
    name: 'y',
    xAxis: 1,
    yAxis: 0,
    color: '#8baaf5',
    showInLegend: false,
    data: [2],
  },],
});

Product version

Highcharts version 11.4.1

Affected browser(s)

Any browser

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions