Skip to content

Commit

Permalink
Merge pull request #59 from shunsock/fix/image_format_in_tutorial
Browse files Browse the repository at this point in the history
replacing ImageFormat::PNG to ImageFormat::Png in tutorial code
  • Loading branch information
yuankunzhang committed Jun 15, 2024
2 parents f2dcfcd + 8c52a3a commit 1c33104
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,11 @@ let mut renderer = ImageRenderer::new(1000, 800);
// Render the chart as SVG string.
renderer.render(&chart).unwrap();
// Render the chart as PNG bytes.
renderer.render_format(ImageFormat::PNG, &chart).unwrap();
renderer.render_format(ImageFormat::Png, &chart).unwrap();
// Save the chart as SVG file.
renderer.save(&chart, "/tmp/chart.svg").unwrap();
// Save the chart as PNG file.
renderer.save_format(ImageFormat::PNG, &chart, "/tmp/chart.png");
renderer.save_format(ImageFormat::Png, &chart, "/tmp/chart.png");


// Use WasmRenderer. The `wasm` feature needs to be enabled.
Expand Down

0 comments on commit 1c33104

Please sign in to comment.