8000 Make Bar.width to be Option<f64> by Ionizing · Pull Request #230 · plotly/plotly.rs · GitHub
[go: up one dir, main page]

Skip to content

Make Bar.width to be Option<f64> #230

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 2 commits into from
Sep 6, 2024
Merged
Changes from 1 commit
Commits
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
make bar offset float as well
- update test

Signed-off-by: Andrei Gherghescu <8067229+andrei-ng@users.noreply.github.com>
  • Loading branch information
andrei-ng committed Sep 6, 2024
commit 377b2597155a71c3fe1336eb760b7f749fddea8c
8 changes: 4 additions & 4 deletions plotly/src/traces/bar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ where
opacity: Option<f64>,
ids: Option<Vec<String>>,
width: Option<f64>,
offset: Option<Dim<usize>>,
offset: Option<Dim<f64>>,
text: Option<Dim<String>>,
#[serde(rename = "textposition")]
text_position: Option<Dim<TextPosition>>,
Expand Down Expand Up @@ -162,8 +162,8 @@ mod tests {
.legend_group_title("legend-group-title")
.marker(Marker::new())
.name("Bar")
.offset(5)
.offset_array(vec![5, 5])
.offset(5.0)
.offset_array(vec![5.0, 5.0])
.offset_group("offset_group")
.opacity(0.5)
.orientation(Orientation::Vertical)
Expand Down Expand Up @@ -198,7 +198,7 @@ mod tests {
"opacity": 0.5,
"ids": ["1"],
"width": 999.0,
"offset": [5, 5],
"offset": [5.0, 5.0],
"text": ["text"],
"textposition": ["none"],
"texttemplate": ["text_template"],
Expand Down
Loading
0