-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add Pie Chart trace - add examples - add section in mdBook Signed-off-by: Andrei Gherghescu <[email protected]> * fix cargo doc warnings Signed-off-by: Andrei Gherghescu <[email protected]> * add pie unittests and fix docs Signed-off-by: Andrei Gherghescu <[email protected]> --------- Signed-off-by: Andrei Gherghescu <[email protected]>
- Loading branch information
Showing
20 changed files
with
724 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Pie Charts | ||
|
||
The following imports have been used to produce the plots below: | ||
|
||
```rust,no_run | ||
use plotly::common::{Domain, Font, HoverInfo, Orientation}; | ||
use plotly::layout::{ | ||
Annotation, Layout, LayoutGrid}, | ||
use plotly::layout::Layout; | ||
use plotly::{Pie, Plot}; | ||
``` | ||
|
||
The `to_inline_html` method is used to produce the html plot displayed in this page. | ||
|
||
|
||
## Basic Pie Chart | ||
```rust,no_run | ||
{{#include ../../../../../examples/basic_charts/src/main.rs:basic_pie_chart}} | ||
``` | ||
|
||
{{#include ../../../../../examples/basic_charts/out/basic_pie_chart.html}} | ||
|
||
```rust,no_run | ||
{{#include ../../../../../examples/basic_charts/src/main.rs:basic_pie_chart_labels}} | ||
``` | ||
|
||
{{#include ../../../../../examples/basic_charts/out/basic_pie_chart_labels.html}} | ||
|
||
## Grouped Pie Chart | ||
```rust,no_run | ||
{{#include ../../../../../examples/basic_charts/src/main.rs:grouped_donout_pie_charts}} | ||
``` | ||
|
||
{{#include ../../../../../examples/basic_charts/out/grouped_donout_pie_charts.html}} | ||
|
||
## Pie Chart Text Control | ||
```rust,no_run | ||
{{#include ../../../../../examples/basic_charts/src/main.rs:pie_chart_text_control}} | ||
``` | ||
|
||
{{#include ../../../../../examples/basic_charts/out/pie_chart_text_control.html}} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.