Skip to content

Commit 2ddb2f9

Browse files
committed
make bar offset float as well
- update test Signed-off-by: Andrei Gherghescu <[email protected]>
1 parent 024656f commit 2ddb2f9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

plotly/src/traces/bar.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ where
5656
opacity: Option<f64>,
5757
ids: Option<Vec<String>>,
5858
width: Option<f64>,
59-
offset: Option<Dim<usize>>,
59+
offset: Option<Dim<f64>>,
6060
text: Option<Dim<String>>,
6161
#[serde(rename = "textposition")]
6262
text_position: Option<Dim<TextPosition>>,
@@ -162,8 +162,8 @@ mod tests {
162162
.legend_group_title("legend-group-title")
163163
.marker(Marker::new())
164164
.name("Bar")
165-
.offset(5)
166-
.offset_array(vec![5, 5])
165+
.offset(5.0)
166+
.offset_array(vec![5.0, 5.0])
167167
.offset_group("offset_group")
168168
.opacity(0.5)
169169
.orientation(Orientation::Vertical)
@@ -198,7 +198,7 @@ mod tests {
198198
"opacity": 0.5,
199199
"ids": ["1"],
200200
"width": 999.0,
201-
"offset": [5, 5],
201+
"offset": [5.0, 5.0],
202202
"text": ["text"],
203203
"textposition": ["none"],
204204
"texttemplate": ["text_template"],

0 commit comments

Comments
 (0)