Skip to content

yaxis/xaxis position attribute does not do anything when using heatmap #2613

Description

@gajus
Plotly.newPlot(
  'graph',
  [
    {
      colorscale: 'YIOrRd',
      hoverinfo: 'text',
      reversescale: true,
      type: 'heatmap',
      z: [[1, 20, 30], [20, 1, 60], [30, 60, 1]]
    }
  ],
  {
    showlegend: false,
    xaxis: {
      title: 'Year',
      titlefont: {
        size: 16
      }
    },
    yaxis: {
    	anchor: 'free',
    	position: -100,
        title: 'Unemployed',
        titlefont: {
          size: 16
        }
    },
    margin: {
      l: 200,
      r: 50,
      b: 50,
      t: 50
    }
  },
  {
    displayModeBar: false,
    staticPlot: true
  }
);

https://jsfiddle.net/dzvx2838/

I have tried adjusting values:

anchor: 'free',
position: -100,

but it has no effect to the position of the yaxis title.

What I would like to achieve is to make the yaxis title stick to the left-most position as I increase the left-margin.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions