Skip to content

Commit 7f44e87

Browse files
bar base, closes #2585
1 parent c93201a commit 7f44e87

File tree

4 files changed

+9
-1
lines changed

4 files changed

+9
-1
lines changed

Diff for: CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
88

99
- `px.NO_COLOR` constant to override wide-form color assignment in Plotly Express ([#2614](https://github.com/plotly/plotly.py/pull/2614))
1010
- `facet_row_spacing` and `facet_col_spacing` added to Plotly Express cartesian 2d functions ([#2614](https://github.com/plotly/plotly.py/pull/2614))
11+
- `base` added to Plotly Express `bar` and `bar_polar` functions ([#2614](https://github.com/plotly/plotly.py/pull/2614))
1112

1213
### Fixed
1314

Diff for: packages/python/plotly/plotly/express/_chart_types.py

+2
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,7 @@ def bar(
317317
hover_data=None,
318318
custom_data=None,
319319
text=None,
320+
base=None,
320321
error_x=None,
321322
error_x_minus=None,
322323
error_y=None,
@@ -847,6 +848,7 @@ def bar_polar(
847848
hover_name=None,
848849
hover_data=None,
849850
custom_data=None,
851+
base=None,
850852
animation_frame=None,
851853
animation_group=None,
852854
category_orders={},

Diff for: packages/python/plotly/plotly/express/_core.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
# Declare all supported attributes, across all plot types
2121
direct_attrables = (
22-
["x", "y", "z", "a", "b", "c", "r", "theta", "size"]
22+
["x", "y", "z", "a", "b", "c", "r", "theta", "size", "base"]
2323
+ ["hover_name", "text", "names", "values", "parents", "wide_cross"]
2424
+ ["ids", "error_x", "error_x_minus", "error_y", "error_y_minus", "error_z"]
2525
+ ["error_z_minus", "lat", "lon", "locations", "animation_group"]

Diff for: packages/python/plotly/plotly/express/_doc.py

+5
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,11 @@
9797
colref_desc,
9898
"Values from this column or array_like are to be interpreted according to `locationmode` and mapped to longitude/latitude.",
9999
],
100+
base=[
101+
colref_type,
102+
colref_desc,
103+
"Values from this column or array_like are used to position the base of the bar.",
104+
],
100105
dimensions=[
101106
colref_list_type,
102107
colref_list_desc,

0 commit comments

Comments
 (0)