-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Multicategory axis type #3300
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
Merged
Merged
Multicategory axis type #3300
Changes from 1 commit
Commits
Show all changes
55 commits
Select commit
Hold shift + click to select a range
e962fb4
big lint commit in axes.js
etpinard d49b7b4
first cut multicategory
etpinard d28ed18
rm useless `if(ax._mainLinePosition)` condition
etpinard 9ebbe7d
generalize tick labels selection stash
etpinard 6dbddc9
small fixup in axis drawTitle()
etpinard 5720802
mv ax drawTitles() to end of Axes.drawOne
etpinard 0f0661e
stash crispRound ax.gridwidth value on ax._gw
etpinard 86f710c
2nd look at mutlicategory positioning
etpinard d986f94
adapt tickon:'boundaries' logic for multicategory axes
etpinard c680558
don't coerce ticktext/tickvals on multicategory axes
etpinard 2a9ef87
mv maxRowLength to lib/array.js, use it it in xy defaults
etpinard f404d9f
add support for multicategory for box and violin traces
etpinard 93323b8
add support for axis dividers
etpinard 73f0365
:three: multicategory mocks
etpinard 660a546
fix showdividers:false logic
etpinard 1a4c95e
generalize Lib.maxRowLength
etpinard 48df699
add a some potential TODOs
etpinard 701f793
add Lib.minRowLength and use it to find trace._length
etpinard 016846a
improve multicategory ax.makeCalcdata
etpinard 3d097c2
initial support for multicategory on y-axes
etpinard d5777e9
fix data-referenced shapes on multicategory axes
etpinard b792b8d
add support for heatmap and contour traces on multicategoy axes
etpinard bf52cd7
add support for histogram* traces on multicategory axes
etpinard c3a0f5a
add support for finance traces on multicategory axes
etpinard 80f4701
test xaxis.automargin:true + long multicategory labels
etpinard 927c701
add multicategory axis auto-type tests
etpinard b49ca0c
fixup multicategory hover
etpinard e313064
add multicategory mock to mock lists
etpinard 2bb1388
make tickons:'boundaries' the dflt on multicategory axes
etpinard 3eac338
ignore bar base on (multi)category size axes
etpinard c802d32
fix box/violin x0/y0 multi-category edge case
etpinard 7c3dd01
fix heatmap/contour x0/y0 + multicategory edge case
etpinard e0111d4
fix box/violin multicategory on value axis edge cases
etpinard 69ccfd3
fix typed array support on axes with set type:multicategory
etpinard 3746e03
aj-proof multicategory ax-autotype logic
etpinard cbb3b7d
add repositionOnUpdate opts for Axes.drawLabels
etpinard 1965dae
rotate Drawing.bBox results in getLabelLevelSpan
etpinard ad97171
do not try to use ax.tickangle for secondary labels
etpinard a9eca09
accept typed array as inner arrays in multicategory autotype
etpinard 3bc03e5
add explanation for why multicategory axes have no d2c & d2l
etpinard e71b7df
assert multicategory event data
etpinard 5c85981
fix multicategory ax.cleanPos
etpinard 627f24b
simplify histogram2d x/y len logic
etpinard a25c5e3
aj-proof heatmap_multicategory mock
etpinard 858f7c2
fix #3255 - get automargin calls out of supplyDefaults
alexcjohnson bdabf48
refactor rangeslider pipeline
alexcjohnson b2a4b76
fixed range_slider_rangemode baseline
alexcjohnson 177e6f0
use _replotting in cartesian dragbox
alexcjohnson da30f16
remove setScale categories fallback and update heatmap test comment
alexcjohnson 68993c3
minor :palm_tree: for findMainSubplot
alexcjohnson f55e769
pre-collate counteraxes and subplot ids for each axis
alexcjohnson 939df6e
Merge pull request #3323 from plotly/clean-defaults-mc
alexcjohnson 5da3851
do not draw ticks above dividers
etpinard 204b2e8
add multicategory + mirror ax mock
etpinard 4b82426
do not accept number as box/violin x0 on multicategory axes
etpinard 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
add support for histogram* traces on multicategory axes
- Loading branch information
commit bf52cd7f69f6895c315426e1c131a64a616542a2
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,121 @@ | ||
{ | ||
"data": [ | ||
{ | ||
"type": "histogram2d", | ||
"name": "hist2d", | ||
"x": [ | ||
[ 2017, 2018, 2017, 2018, 2017, 2018, 2017, 2018, 2017, 2018, 2017, 2018 ], | ||
[ "a", "a", "a", "a", "a", "a", "b", "b", "c", "c", "c", "c" ] | ||
], | ||
"y": [ | ||
[ 2017, 2018, 2017, 2018, 2017, 2018, 2017, 2018, 2017, 2018, 2017, 2018, 2018, 2017, 2017 ], | ||
[ "a", "a", "a", "a", "a", "a", "b", "b", "c", "c", "c", "c", "b", "c", "a" ] | ||
], | ||
"colorscale": "Viridis", | ||
"opacity": 0.8, | ||
"colorbar": { | ||
"x": 0.7, | ||
"xanchor": "left", | ||
"y": 0.7, | ||
"yanchor": "bottom", | ||
"len": 0.3, | ||
"title": { | ||
"side": "right", | ||
"text": "hist2d" | ||
} | ||
} | ||
}, | ||
{ | ||
"mode": "markers", | ||
"x": [ | ||
[ 2017, 2018, 2017, 2018, 2017, 2018, 2017, 2018, 2017, 2018, 2017, 2018 ], | ||
[ "a", "a", "a", "a", "a", "a", "b", "b", "c", "c", "c", "c" ] | ||
], | ||
"y": [ | ||
[ 2017, 2018, 2017, 2018, 2017, 2018, 2017, 2018, 2017, 2018, 2017, 2018, 2018, 2017, 2017 ], | ||
[ "a", "a", "a", "a", "a", "a", "b", "b", "c", "c", "c", "c", "b", "c", "a" ] | ||
], | ||
"marker": { | ||
"color": "#d3d3d3", | ||
"size": 18, | ||
"opacity": 0.3, | ||
"line": {"color": "black", "width": 1} | ||
} | ||
}, | ||
|
||
{ | ||
"type": "histogram2dcontour", | ||
"name": "hist2dcontour", | ||
"x": [ | ||
[ 2017, 2018, 2017, 2018, 2017, 2018, 2017, 2018, 2017, 2018, 2017, 2018 ], | ||
[ "a", "a", "a", "a", "a", "a", "b", "b", "c", "c", "c", "c" ] | ||
], | ||
"y": [ | ||
[ 2017, 2018, 2017, 2018, 2017, 2018, 2017, 2018, 2017, 2018, 2017, 2018, 2018, 2017, 2017 ], | ||
[ "a", "a", "a", "a", "a", "a", "b", "b", "c", "c", "c", "c", "b", "c", "a" ] | ||
], | ||
"contours": { | ||
"coloring": "lines" | ||
}, | ||
"line": { | ||
"width": 4 | ||
}, | ||
"colorscale": "Viridis", | ||
"colorbar": { | ||
"x": 1, | ||
"xanchor": "right", | ||
"y": 0.7, | ||
"yanchor": "bottom", | ||
"len": 0.3, | ||
"title": { | ||
"side": "right", | ||
"text": "hist2dcontour" | ||
} | ||
} | ||
}, | ||
{ | ||
"type": "histogram", | ||
"name": "hist-x", | ||
"x": [ | ||
[ 2017, 2018, 2017, 2018, 2017, 2018, 2017, 2018, 2017, 2018, 2017, 2018 ], | ||
[ "a", "a", "a", "a", "a", "a", "b", "b", "c", "c", "c", "c" ] | ||
], | ||
"yaxis": "y2", | ||
"marker": { | ||
"color": "#008080" | ||
} | ||
}, | ||
{ | ||
"type": "histogram", | ||
"name": "hist-y", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This kind of plot would really benefit from |
||
"y": [ | ||
[ 2017, 2018, 2017, 2018, 2017, 2018, 2017, 2018, 2017, 2018, 2017, 2018, 2018, 2017, 2017 ], | ||
[ "a", "a", "a", "a", "a", "a", "b", "b", "c", "c", "c", "c", "b", "c", "a" ] | ||
], | ||
"xaxis": "x2", | ||
"marker": { | ||
"color": "#008080" | ||
} | ||
} | ||
], | ||
"layout": { | ||
"title": { | ||
"text": "Multi-category histograms", | ||
"xref": "paper", | ||
"x": 0 | ||
}, | ||
"xaxis": { | ||
"domain": [0, 0.65] | ||
}, | ||
"yaxis": { | ||
"domain": [0, 0.65] | ||
}, | ||
"xaxis2": { | ||
"domain": [0.7, 1] | ||
}, | ||
"yaxis2": { | ||
"domain": [0.7, 1] | ||
}, | ||
"showlegend": false | ||
} | ||
} |
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.
Uh oh!
There was an error while loading. Please reload this page.