Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Fix fill tozero with undefined value and overlaping of fill area #2979

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
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
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
last version , we display by order only .
add somes text traces into the baseline test
  • Loading branch information
ErwanMAS committed Oct 1, 2018
commit 95c602eb4a438cfffd3b78b3345e7971005867b8
50 changes: 16 additions & 34 deletions 50 src/traces/scattergl/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,35 +261,23 @@ function sceneUpdate(gd, subplot) {
var i;
for(i = 0; i < scene.count; i++) {
if(scene.fill2d && scene.fillOptions[i]) {
// must do all fills first
Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm. Looks like this broke the gl2d_scatter_fill_self_next mock:

peek 2018-10-04 17-07

The first two traces have fill: 'tonext' meaning their fills should be behind both the data[0] and data[1] markers. See corresponding SVG structure:

image

available here -> https://rreusser.github.io/plotly-mock-viewer/#scatter_fill_self_next

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i pushed a new version .

scene.fill2d.draw(i);
if(scene.line2d && scene.lineOptions[i]) {
scene.line2d.draw(i);
if(scene.error2d && scene.errorXOptions[i]) {
scene.error2d.draw(i);
}
if(scene.error2d && scene.errorYOptions[i]) {
scene.error2d.draw(i + scene.count);
}
}
if(scene.scatter2d && scene.markerOptions[i] && (!scene.selectBatch || !scene.selectBatch[i])) {
// traces in no-selection mode
scene.scatter2d.draw(i);
}
} else {
if(scene.line2d && scene.lineOptions[i]) {
scene.line2d.draw(i);
}
if(scene.error2d && scene.errorXOptions[i]) {
scene.error2d.draw(i);
}
if(scene.error2d && scene.errorYOptions[i]) {
scene.error2d.draw(i + scene.count);
}
if(scene.scatter2d && scene.markerOptions[i] && (!scene.selectBatch || !scene.selectBatch[i])) {
// traces in no-selection mode
scene.scatter2d.draw(i);
}
}
if(scene.line2d && scene.lineOptions[i]) {
scene.line2d.draw(i);
}
if(scene.error2d && scene.errorXOptions[i]) {
scene.error2d.draw(i);
}
if(scene.error2d && scene.errorYOptions[i]) {
scene.error2d.draw(i + scene.count);
}
if(scene.scatter2d && scene.markerOptions[i] && (!scene.selectBatch || !scene.selectBatch[i])) {
// traces in no-selection mode
scene.scatter2d.draw(i);
}
if(scene.glText[i] && scene.textOptions[i]) {
scene.glText[i].render();
}
}

Expand All @@ -299,12 +287,6 @@ function sceneUpdate(gd, subplot) {
scene.scatter2d.draw(scene.unselectBatch);
}

for(i = 0; i < scene.count; i++) {
if(scene.glText[i] && scene.textOptions[i]) {
scene.glText[i].render();
}
}

scene.dirty = false;
};

Expand Down
Binary file modified BIN +4.83 KB (110%) test/image/baselines/gl2d_order_error.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions 10 test/image/mocks/gl2d_order_error.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
"marker": {"color": "#800"},"line": {"color": "#400"}
},{
"type": "scattergl",
"y": [3, 2, 1, 1], "mode":"text","xaxis": "x", "yaxis": "y" ,
"text": ["A","B","C","D"],
"textfont": { "size": [ 30, 20 , 30 , 30 ] }
},{
"type": "scattergl",
"y": [1, 4, 0, 3],
"fillcolor":"#282","fill": "tozeroy", "xaxis": "x", "yaxis": "y" ,
"error_x": {"value": 0.4, "type": "constant","color":"#028"},
Expand All @@ -22,6 +27,11 @@
"marker": {"color": "#088"},"line": {"color": "#044"}
},{
"type": "scatter",
"y": [3, 2, 1, 1], "mode":"text","xaxis": "x2", "yaxis": "y2" ,
"text": ["A","B","C","D"],
"textfont": { "size": [ 30, 20 , 30 , 30 ] }
},{
"type": "scatter",
"y": [1, 4, 0, 3],
"fillcolor":"#882","fill": "tozeroy", "xaxis": "x2", "yaxis": "y2" ,
"error_x": {"value": 0.4, "type": "constant","color":"#028"},
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.