-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Path pattern fills #7280
Open
alexcjohnson
wants to merge
9
commits into
master
Choose a base branch
from
alex/path-pattern-fill
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Path pattern fills #7280
Changes from 8 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
fa2e424
path pattern fills
alexcjohnson 1e2aa92
why has vscode started adding weird imports I didn't ask for?
alexcjohnson c842f6b
changelog for arbitrary pattern fills
alexcjohnson 8377544
schema update for path pattern fills
alexcjohnson 50975ce
new pattern_bars baseline image
alexcjohnson e0395f6
put path pattern image test into a new mock and restore the old patte…
alexcjohnson 24c4cb7
remove bad funnel attrs in mock and fix new baseline name
alexcjohnson dbcf4da
fix validation for arrayOk enums
alexcjohnson c2b1fad
remove obsolete keys from new pattern path mock
alexcjohnson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
- Add `pattern.path` attribute as an alternative to the preset `pattern.shape` values, so you can use any SVG path string as a pattern fill. [[#7280](https://github.com/plotly/plotly.js/pull/7280)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,222 @@ | ||
{ | ||
"data": [ | ||
{ | ||
"x": ["a", "b", "c", "d", "e"], | ||
"y": [1, 2, 3, 4, 5], | ||
"name": "Bar 1", | ||
"type": "bar", | ||
"textposition": "outside", | ||
"text": "bgcolor", | ||
"marker": { | ||
"pattern": { | ||
"shape": "/", | ||
"bgcolor": ["", "lightblue", "blue", "darkblue", "black"] | ||
} | ||
} | ||
}, | ||
{ | ||
"x": ["a", "b", "c", "d", "e"], | ||
"y": [2, 3, 4, 5, 6], | ||
"name": "Bar 2", | ||
"type": "bar", | ||
"textposition": "outside", | ||
"text": "shape", | ||
"marker": { | ||
"pattern": { | ||
"shape": ["|", "/", "-", "\\", "|"] | ||
} | ||
} | ||
}, | ||
{ | ||
"x": ["a", "b", "c", "d", "e"], | ||
"y": [3, 4, 5, 6, 7], | ||
"name": "Bar 3", | ||
"type": "bar", | ||
"textposition": "outside", | ||
"text": "size", | ||
"marker": { | ||
"pattern": { | ||
"shape": "x", | ||
"size": [4, 6, 8, 10, 12] | ||
} | ||
} | ||
}, | ||
{ | ||
"x": ["a", "b", "c", "d", "e"], | ||
"y": [6, 7, 8, 9, 10], | ||
"name": "Bar 4", | ||
"type": "bar", | ||
"textposition": "outside", | ||
"text": "solidity", | ||
"marker": { | ||
"pattern": { | ||
"shape": ".", | ||
"bgcolor": "yellow", | ||
"solidity": [0.1, 0.3, 0.5, 0.7, 0.9] | ||
} | ||
} | ||
}, | ||
{ | ||
"x": ["a", "b", "c", "d", "e"], | ||
"y": [7, 8, 9, 10, 11], | ||
"name": "Bar 5", | ||
"type": "bar", | ||
"textposition": "outside", | ||
"text": "path", | ||
"marker": { | ||
"pattern": { | ||
"path": [ | ||
"M0,0H4V4H0Z", | ||
"M0,0H6V6Z", | ||
"M0,0V4H4Z", | ||
"M0,0C0,2,4,2,4,4C4,6,0,6,0,8H2C2,6,6,6,6,4C6,2,2,2,2,0Z", | ||
"M4,4L7,2A3.5,3.5,0,1,0,7,6Z" | ||
], | ||
"fgcolor": "yellow", | ||
"bgcolor": "black" | ||
} | ||
} | ||
}, | ||
{ | ||
"t": ["M", "N", "O", "P"], | ||
"r": [1, 2, 3, 4], | ||
"type": "barpolar", | ||
"name": "Barpolar 1", | ||
"marker": { | ||
"color": "red", | ||
"pattern": { | ||
"shape": "+", | ||
"size": [1, 2, 3, 4] | ||
} | ||
} | ||
}, | ||
{ | ||
"t": ["M", "N", "O", "P"], | ||
"r": [2, 3, 4, 1], | ||
"type": "barpolar", | ||
"name": "Barpolar 2", | ||
"marker": { | ||
"color": "rgba(0,127,0,0.5)", | ||
"pattern": { | ||
"shape": "x", | ||
"solidity": 0.75 | ||
} | ||
} | ||
}, | ||
{ | ||
"t": ["M", "N", "O", "P"], | ||
"r": [3, 4, 1, 2], | ||
"type": "barpolar", | ||
"name": "Barpolar 3", | ||
"marker": { | ||
"color": "blue", | ||
"pattern": { | ||
"shape": ["|", "-", "|", "-"], | ||
"solidity": 0.5 | ||
} | ||
} | ||
}, | ||
{ | ||
"t": ["M", "N", "O", "P"], | ||
"r": [4, 1, 2, 3], | ||
"type": "barpolar", | ||
"name": "Barpolar 4", | ||
"marker": { | ||
"color": "orange", | ||
"pattern": { | ||
"shape": ".", | ||
"bgcolor": "yellow", | ||
"solidity": [0.2, 0.8, 0.6, 0.4] | ||
} | ||
} | ||
}, | ||
|
||
{ | ||
"xaxis": "x2", | ||
"yaxis": "y2", | ||
"y": ["A", "A", "A", "A", "B", "B", "C"], | ||
"name": "Histogram 1", | ||
"type": "histogram", | ||
"marker": { | ||
"color": "yellow", | ||
"line": { | ||
"color": "black", | ||
"width": 2 | ||
}, | ||
"pattern": { | ||
"bgcolor": "blue", | ||
"shape": "." | ||
} | ||
} | ||
}, | ||
{ | ||
"xaxis": "x2", | ||
"yaxis": "y2", | ||
"y": ["C", "C", "C", "C", "B", "B", "A"], | ||
"name": "Histogram 2", | ||
"type": "histogram", | ||
"marker": { | ||
"color": "yellow", | ||
"line": { | ||
"color": "red", | ||
"width": 4 | ||
}, | ||
"pattern": { | ||
"bgcolor": "rgba(255, 127,0,0.5)", | ||
"shape": "x" | ||
} | ||
} | ||
}, | ||
|
||
{ | ||
"xaxis": "x3", | ||
"yaxis": "y3", | ||
"x": [3, 2, 1], | ||
"y": ["U", "V", "W"], | ||
"name": "Funnel", | ||
"type": "funnel" | ||
} | ||
], | ||
"layout": { | ||
"title": { | ||
"text": "pattern options" | ||
}, | ||
"width": 1000, | ||
"height": 600, | ||
|
||
"xaxis": { | ||
"domain": [0, 1] | ||
}, | ||
"yaxis": { | ||
"range": [0, 11], | ||
"domain": [0, 0.475] | ||
}, | ||
|
||
"polar": { | ||
"domain": { | ||
"x": [0.35, 0.65], | ||
"y": [0.525, 1] | ||
} | ||
}, | ||
|
||
"xaxis2": { | ||
"anchor": "y2", | ||
"gridcolor": "black", | ||
"gridwidth": 2, | ||
"domain": [0, 0.3] | ||
}, | ||
"yaxis2": { | ||
"anchor": "x2", | ||
"domain": [0.525, 1] | ||
}, | ||
|
||
"xaxis3": { | ||
"anchor": "y3", | ||
"domain": [0.7, 1] | ||
}, | ||
"yaxis3": { | ||
"anchor": "x3", | ||
"domain": [0.525, 1] | ||
} | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because we're comparing the original data array to something we coerced off a deep copy, arrays that make it here will never be
===