Skip to content

Colorbar tick labels overlap with colorbar title #1396

Closed
@jdugge

Description

@jdugge

When using a colorbar with titleside: 'right' and a small value for len, the colorbar tick labels can overlap with the colorbar title:

image

(Codepen: http://codepen.io/anon/pen/YNoOML)

var data = [ {
  z: [[0, 100],
       [75, 0]],
  type: 'heatmap',
  colorbar:{
    len: 0.35,
    title: 'My long label',
    titleside:'right',
    tickvals:[0,50,100],
    tickfont: {color: 'red'}
  }
}]; 

var layout = {};

Plotly.newPlot('myDiv', data, layout);

The workaround for avoiding this overlap given in #938 (comment) (using an invisible tickprefix) only works for titles that are to the left of the tick labels, unfortunately.

Is there a way to avoid this overlap with titles to the right of the tick labels?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugsomething broken

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions