Plotly.js: More control over tick text alignment

Created on 11 May 2017  路  7Comments  路  Source: plotly/plotly.js

Perhaps via layout.axisid.tickalign & layout.axisid.tickvalign -- both accepting a number on a 0-1 scale? Here's an example of tickalign=1 (the default) vs tickalign=0
screen shot 2017-05-11 at 1 30 04 pm
screen shot 2017-05-11 at 1 30 27 pm

feature

Most helpful comment

Another use case is centering labels _between_ ticks. A request has come in to replicate this type of label positioning

image

All 7 comments

Another use case is centering labels _between_ ticks. A request has come in to replicate this type of label positioning

image

Basically here we just want a new ticksbetweenlabels boolean.

@cpsievert was talking here about how to align the tick label relative to its anchor point. I see that as a very different feature from whether the ticks and labels even have the same anchor point - which is the subject of #2601, lets continue the latter discussion over there.

Ah you're right, sorry. @bpostlethwaite had tagged this issue so I just followed suit :)

@nicolaskruchten Does the latest release allow ticksbetweenlabels for other types than category?

No, tickson: 'boundaries' is only available for 'category' and 'multicategory' axes at the moment.

The ticksbetweenlabels boolean would be really useful for heatmaps and images, in order to have ticks at the boundary between pixels.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

n-riesco picture n-riesco  路  3Comments

empet picture empet  路  3Comments

etpinard picture etpinard  路  3Comments

nicolaskruchten picture nicolaskruchten  路  3Comments

maxwell8888 picture maxwell8888  路  3Comments