Skip to content

Conversation

@AlexVvx
Copy link
Owner

@AlexVvx AlexVvx commented Dec 5, 2017

Related to #882

This PR adds chart title alignment feature. The purpose of feature is to let users adjust the look of chart by using alignment. When there are lots of traces, then legend occupies much space and with center aligned title top margin looks ugly (details in plotly/plotly.R#812)

Title is an object in layout:

text - is title text
alignment - is string (top, bottom, left, right, middle default), small gap between border and title equal to half of text height
x,y - is numbers, manual position in pixels from left top

x: fullLayout.title.x,
y: fullLayout.title.y,
'text-anchor': 'start',
'dominant-baseline': 'hanging'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm. Does dominant-baseline work in all browsers?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, will fix it together with other changes from plotly#882

@AlexVvx AlexVvx force-pushed the chart-title-alignment branch from 2e4c4b9 to 3ac4f0f Compare December 19, 2017 21:31
@ghost
Copy link

ghost commented Oct 23, 2019

Why is it still an open issue? : o

@alexcjohnson
Copy link
Collaborator

@ewirth I don't recall the details at this point, but we ended up doing this in a slightly different way, in plotly#3276 - so this PR, while useful for advancing the discussion, was ultimately not used directly. @AlexVvx can we close it?

@AlexVvx
Copy link
Owner Author

AlexVvx commented Oct 24, 2019

Yep, let's close

@AlexVvx AlexVvx closed this Oct 24, 2019
@ghost
Copy link

ghost commented Oct 24, 2019

@AlexVvx Thanks for the notice. I think that it's still impossible to set the title to the bottom of a line figure. Or I haven't find it. It should be a easy thing like position: bottom :d

@alexcjohnson
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants