Skip to content

Commit

Permalink
docs: update document
Browse files Browse the repository at this point in the history
  • Loading branch information
vicanso committed Aug 19, 2023
1 parent 30e5105 commit d94ebaf
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 9 deletions.
5 changes: 5 additions & 0 deletions README-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@
<img src="./asset/image/table.png" alt="charts-rs">
</p>

## Multi Chart
<p align="center">
<img src="./asset/image/multi-chart.png" alt="charts-rs">
</p>

## Rust示例

### 使用Option的形式创建图表
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ Charts Web Source: [https://github.com/vicanso/charts-rs-web](https://github.com
<img src="./asset/image/table.png" alt="charts-rs">
</p>

## Multi Chart
<p align="center">
<img src="./asset/image/multi-chart.png" alt="charts-rs">
</p>

## Example

### New from option
Expand Down
Binary file added asset/image/multi-chart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed asset/image/multi_chart.png
Binary file not shown.
21 changes: 12 additions & 9 deletions tests/image.rs
Original file line number Diff line number Diff line change
Expand Up @@ -400,8 +400,8 @@ fn generate_image() {
"child_charts": [
{
"quality": 80,
"width": 600,
"height": 400,
"width": 400,
"height": 300,
"margin": {
"left": 5,
"top": 5,
Expand All @@ -411,13 +411,13 @@ fn generate_image() {
"font_family": "Roboto",
"title_font_size": 18,
"title_font_weight": "bold",
"title_align": "right",
"title_margin": {
"left": 0,
"top": 0,
"right": 0,
"bottom": 0
},
"title_align": "center",
"title_height": 30,
"sub_title_text": "Sub Title",
"sub_title_font_size": 14,
Expand Down Expand Up @@ -492,8 +492,9 @@ fn generate_image() {
},
{
"quality": 80,
"width": 600,
"height": 400,
"x": 410,
"width": 400,
"height": 300,
"margin": {
"left": 15,
"top": 15,
Expand All @@ -503,13 +504,13 @@ fn generate_image() {
"font_family": "Roboto",
"title_font_size": 18,
"title_font_weight": "bold",
"title_align": "left",
"title_margin": {
"left": 0,
"top": 0,
"right": 0,
"bottom": 0
},
"title_align": "center",
"title_height": 30,
"sub_title_text": "Sub Title",
"sub_title_font_size": 14,
Expand Down Expand Up @@ -584,8 +585,10 @@ fn generate_image() {
},
{
"quality": 80,
"width": 600,
"height": 400,
"width": 400,
"x": 210,
"y": 310,
"height": 300,
"margin": {
"left": 5,
"top": 5,
Expand Down Expand Up @@ -690,5 +693,5 @@ fn generate_image() {
)
.unwrap();
let buf = svg_to_png(&multi_chart.svg().unwrap()).unwrap();
std::fs::write("./asset/image/multi_chart.png", buf).unwrap();
std::fs::write("./asset/image/multi-chart.png", buf).unwrap();
}

0 comments on commit d94ebaf

Please sign in to comment.