Skip to content

Commit

Permalink
make bar offset float as well
Browse files Browse the repository at this point in the history
- update test

Signed-off-by: Andrei Gherghescu <[email protected]>
  • Loading branch information
andrei-ng committed Sep 6, 2024
1 parent 024656f commit 2ddb2f9
Showing 1 changed file with 4 additions and 4 deletions.
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

0 comments on commit 2ddb2f9

Please sign in to comment.