Skip to content

Commit

Permalink
Merge pull request #2 from Veetaha:main
Browse files Browse the repository at this point in the history
Update to bon 2.0
  • Loading branch information
alceal authored Aug 29, 2024
2 parents 1fb44cf + 251c12f commit 1f01e8f
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 16 deletions.
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ keywords = ["chart", "plot", "plotly", "polars", "visualization"]
categories = ["visualization"]

[dependencies]
bon = "1.2.0"
bon = "2.0.0"
plotly = "0.9.0"
polars = { version = "0.42", features = ["dtype-categorical", "lazy", "strings"] }
serde = "1.0.208"
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ fn main() {
.unique().unwrap();

let layout = Layout::new()
.title(Title::new("Penguin Flipper Length vs Body Mass"))
.x_axis(Axis::new().title(Title::new("Body Mass (g)")))
.y_axis(Axis::new().title(Title::new("Flipper Length (mm)")))
.legend(Legend::new().title(Title::new("Species")));
.title(Title::with_text("Penguin Flipper Length vs Body Mass"))
.x_axis(Axis::new().title(Title::with_text("Body Mass (g)")))
.y_axis(Axis::new().title(Title::with_text("Flipper Length (mm)")))
.legend(Legend::new().title(Title::with_text("Species")));

let mut plot = Plot::new();
plot.set_layout(layout);
Expand Down
4 changes: 2 additions & 2 deletions src/traces/barplot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ impl VerticalBarPlot {
///
/// ![Vertical Bar Plot](https://imgur.com/Fd6DpB0.png)
///
#[builder]
#[builder(on(String, into), on(Text, into))]
pub fn new(
data: &DataFrame,
x: String,
Expand Down Expand Up @@ -258,7 +258,7 @@ impl HorizontalBarPlot {
///
/// ![Horizontal Bar Plot](https://imgur.com/saoTcNg.png)
///
#[builder]
#[builder(on(String, into), on(Text, into))]
pub fn new(
data: &DataFrame,
x: String,
Expand Down
4 changes: 2 additions & 2 deletions src/traces/boxplot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ impl VerticalBoxPlot {
///
/// ![Vertical Box Plot](https://imgur.com/0Zn0mFu.png)
///
#[builder]
#[builder(on(String, into), on(Text, into))]
pub fn new(
data: &DataFrame,
x: String,
Expand Down Expand Up @@ -281,7 +281,7 @@ impl HorizontalBoxPlot {
///
/// ![Horizontal Box Plot](https://imgur.com/Lu92liU.png)
///
#[builder]
#[builder(on(String, into), on(Text, into))]
pub fn new(
data: &DataFrame,
x: String,
Expand Down
2 changes: 1 addition & 1 deletion src/traces/lineplot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ impl LinePlot {
///
/// ![Line Plot](https://imgur.com/cOH707b.png)
///
#[builder]
#[builder(on(String, into), on(Text, into))]
pub fn new(
// Data
data: &DataFrame,
Expand Down
2 changes: 1 addition & 1 deletion src/traces/scatterplot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ impl ScatterPlot {
///
/// ![Scatter Plot](https://imgur.com/f5vgrNd.png)
///
#[builder]
#[builder(on(String, into), on(Text, into))]
pub fn new(
// Data
data: &DataFrame,
Expand Down
2 changes: 1 addition & 1 deletion src/traces/timeseriesplot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ impl TimeSeriesPlot {
///
/// ![Time Series Plot](https://imgur.com/sjxJ2og.png)
///
#[builder]
#[builder(on(String, into), on(Text, into))]
pub fn new(
// Data
data: &DataFrame,
Expand Down

0 comments on commit 1f01e8f

Please sign in to comment.