-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Add option for rounded corners on bar charts #6761
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
Changes from 4 commits
024f05f
31c3ac2
b0c6258
d71fe49
bb78c78
5dfd686
64912d4
cc1e6ff
dc2c54c
3b725fa
870d4c9
aa8ba1e
5845e0e
85f47c6
578712a
8f77cde
45689ae
137e185
795235b
dd717b6
35e0c8f
7aa7496
250bf31
495d950
be0ddff
819e8bf
ed69422
4a44291
65d3b55
e8cdde1
9c4227e
dabcaf0
701fd8c
29589e8
d0b9a90
3e5a957
582ce13
a238c87
ac329f7
8a607e6
338b4e6
60c918e
9dd0896
1628b5c
bfbd397
71e4896
4e794d0
dedce2a
b137b25
fdd6d03
8fcc3a5
71b53c3
90cf5c3
510c66b
5599ea6
8dffbbe
c165f6a
ee2451a
256a87e
b122521
015b881
8b57fb5
ec44d87
2913c6e
9e3c249
f986349
99352d0
6f685c0
f093ee7
e3cd5a5
98356b4
a2befea
781fbe2
97f0b0e
c52890c
10e38f4
f7d4b4a
4335ba0
e9043e9
4624132
8c45d15
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,4 +47,5 @@ module.exports = function(layoutIn, layoutOut, fullData) { | |
|
||
coerce('bargap', (shouldBeGapless && !gappedAnyway) ? 0 : 0.2); | ||
coerce('bargroupgap'); | ||
coerce('barcornerradius'); | ||
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. We should use 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. Is that necessary? So the only reason to validate it would be for internal consistency within the plot object, which I guess is a good enough reason if that's consistent with what we do elsewhere. 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. You are right. It does not seem necessary. |
||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
archmoj marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"data": [ | ||
{ | ||
"x": [ | ||
"giraffes", | ||
"orangutans", | ||
"monkeys", | ||
"capybaras" | ||
], | ||
"y": [20, -14, 2, 18 | ||
], | ||
"type": "bar", | ||
"marker": {"cornerradius": 10} | ||
}, | ||
{ | ||
"y": [ | ||
"giraffes", | ||
"orangutans", | ||
"monkeys", | ||
"capybaras" | ||
], | ||
"x": [20, -4, -12, 18], | ||
"type": "bar", | ||
"orientation": "h", | ||
"xaxis": "x2", | ||
"yaxis": "y2" | ||
} | ||
|
||
], | ||
"layout": {"grid": {"rows": 1, "columns": 2, "pattern": "independent"}, "barcornerradius": "30%"} | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14083,6 +14083,12 @@ | |
"editType": "none", | ||
"valType": "string" | ||
}, | ||
"cornerradius": { | ||
"description": "Sets the rounding of corners. May be an integer number of pixels, or a percentage of bar width(as a string).", | ||
"dflt": 0, | ||
"editType": "plot", | ||
"valType": "any" | ||
}, | ||
"editType": "calc", | ||
"line": { | ||
"autocolorscale": { | ||
|
@@ -14770,6 +14776,12 @@ | |
"zoomScale" | ||
], | ||
"layoutAttributes": { | ||
"barcornerradius": { | ||
"description": "Sets the rounding of corners. May be an integer number of pixels, or a percentage of bar width(as a string).", | ||
"dflt": 0, | ||
"editType": "plot", | ||
"valType": "any" | ||
}, | ||
"bargap": { | ||
"description": "Sets the gap (in plot fraction) between bars of adjacent location coordinates.", | ||
"editType": "calc", | ||
|
@@ -15632,6 +15644,12 @@ | |
"editType": "none", | ||
"valType": "string" | ||
}, | ||
"cornerradius": { | ||
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 one shouldn't be added to |
||
"description": "Sets the rounding of corners. May be an integer number of pixels, or a percentage of bar width(as a string).", | ||
"dflt": 0, | ||
"editType": "plot", | ||
"valType": "any" | ||
}, | ||
"editType": "calc", | ||
"line": { | ||
"autocolorscale": { | ||
|
@@ -26829,6 +26847,12 @@ | |
"editType": "none", | ||
"valType": "string" | ||
}, | ||
"cornerradius": { | ||
archmoj marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"description": "Sets the rounding of corners. May be an integer number of pixels, or a percentage of bar width(as a string).", | ||
"dflt": 0, | ||
"editType": "plot", | ||
"valType": "any" | ||
}, | ||
"editType": "calc", | ||
"line": { | ||
"autocolorscale": { | ||
|
@@ -31439,6 +31463,12 @@ | |
"editType": "none", | ||
"valType": "string" | ||
}, | ||
"cornerradius": { | ||
"description": "Sets the rounding of corners. May be an integer number of pixels, or a percentage of bar width(as a string).", | ||
"dflt": 0, | ||
"editType": "plot", | ||
"valType": "any" | ||
}, | ||
"editType": "calc", | ||
"line": { | ||
"autocolorscale": { | ||
|
@@ -32044,6 +32074,12 @@ | |
"showLegend" | ||
], | ||
"layoutAttributes": { | ||
"barcornerradius": { | ||
"description": "Sets the rounding of corners. May be an integer number of pixels, or a percentage of bar width(as a string).", | ||
"dflt": 0, | ||
"editType": "plot", | ||
"valType": "any" | ||
}, | ||
"bargap": { | ||
"description": "Sets the gap (in plot fraction) between bars of adjacent location coordinates.", | ||
"editType": "calc", | ||
|
Uh oh!
There was an error while loading. Please reload this page.