8000 categoryshapeshiftstart and categoryshapeshiftend properties for category axes by my-tien · Pull Request #7010 · plotly/plotly.js · GitHub
[go: up one dir, main page]

Skip to content
8000

categoryshapeshiftstart and categoryshapeshiftend properties for category axes #7010

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix shapeBounds calculation
read xsizemode for horizontal axes and ysizemode for vertical axes.
  • Loading branch information
my-tien committed Jun 3, 2024
commit 241f31c6055938867547e07f4e1b39ebf8e6be60
12 changes: 7 additions & 5 deletions src/components/shapes/calc_autorange.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,14 @@ function shapeBounds(ax, shape, paramsToUse, isVerticalAxis) {
var v1;
var shiftStart = 0;
var shiftEnd = 0;
if(shape.xsizemode === 'pixel') {
v0 = isVerticalAxis ? shape.yanchor : shape.xanchor;
v1 = isVerticalAxis ? shape.yanchor : shape.xanchor;
if(isVerticalAxis) {
var isYSizeModePixel = shape.ysizemode === 'pixel';
v0 = isYSizeModePixel ? shape.yanchor : shape.y0;
v1 = isYSizeModePixel ? shape.yanchor : shape.y1;
} else {
v0 = isVerticalAxis ? shape.y0 : shape.x0;
v1 = isVerticalAxis ? shape.y1 : shape.x1;
var isXSizeModePixel = shape.xsizemode === 'pixel';
v0 = isXSizeModePixel ? shape.xanchor : shape.x0;
v1 = isXSizeModePixel ? shape.xanchor : shape.x1;
}

var convertVal;
Expand Down
0