Skip to content

Implement cliponaxis: false for bar text - #2378

Merged
etpinard merged 5 commits into
masterfrom
bar-cliponaxis-false
Feb 19, 2018
Merged

etpinard merged 5 commits into
masterfrom
bar-cliponaxis-false

Conversation

@etpinard

Copy link
Copy Markdown
Contributor

Friday Afternoon Feature. This one was talked about in #2000 and #2001 as one way to solve problems with undesired clipped text nodes in bar traces. Note that this PR does not attempt to make on-graph text contribue to the autorange computations.

cc @alexcjohnson @cldougl (and I think this should make @chriddyp happy too 😉 )

... now that the barlayer also supports `cliponaxis: false`
    we let bar/plot.js handle clipping per trace.
@etpinard etpinard added this to the v1.35.0 milestone Feb 16, 2018
Comment thread src/components/drawing/index.js Outdated
drawing.hideOutsideRangePoints = function(traceGroups, subplot, selector) {
if(!subplot._hasClipOnAxisFalse) return;

selector = selector || '.point,textpoint';

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

'.point,.textpoint' (you lost a .)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

do we not have an image test that catches this?

@etpinard etpinard Feb 16, 2018 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

No. That thing only gets called during pan and scroll zoom. Nice catch. I'll add a pan test to 🔒 this down.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed and 🔒 in -> b9513a2

@alexcjohnson

Copy link
Copy Markdown
Collaborator

Very nice, relieves one of the big pain points until we really do text in autorange. 💃

@chriddyp

Copy link
Copy Markdown
Member

YESSSSSSSSSS! Love Friday Afternoon Features 🥇

@ghost

ghost commented Feb 18, 2018

Copy link
Copy Markdown

Oo

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

Labels

feature something new

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants