Skip to content

Commit c9930a0

Browse files
committed
fix table example
1 parent 7e6f1c6 commit c9930a0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

examples/basic_charts/src/main.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ use plotly::{
99
},
1010
layout::{Axis, BarMode, Layout, Legend, TicksDirection, TraceOrder},
1111
sankey::{Line as SankeyLine, Link, Node},
12+
traces::table::{Cells, Header},
1213
Bar, Plot, Sankey, Scatter, ScatterPolar, Table,
1314
};
1415
use rand_distr::{Distribution, Normal, Uniform};
@@ -606,8 +607,8 @@ fn basic_sankey_diagram() {
606607

607608
fn table_chart() {
608609
let trace = Table::new(
609-
vec![String::from("col1"), String::from("col2")],
610-
vec![vec![1, 2], vec![2, 3]],
610+
Header::new(vec![String::from("col1"), String::from("col2")]),
611+
Cells::new(vec![vec![1, 2], vec![2, 3]]),
611612
);
612613
let mut plot = Plot::new();
613614
plot.add_trace(trace);

0 commit comments

Comments
 (0)