Skip to content

Commit

Permalink
docs: overlap details (#390)
Browse files Browse the repository at this point in the history
  • Loading branch information
Koooooo-7 committed Feb 5, 2024
1 parent 8a7a8e1 commit 8032a9c
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions docs/en-us/options/global.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,3 +221,32 @@ func PieWithDispatchAction() *charts.Pie {
}
```

Additionally, when you have different types of series, you need the `Overlap` functions.
```js
series: [
{
name: 'Precipitation',
type: 'bar',
data: [
2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3
]
},
{
name: 'Temperature',
type: 'line',
data: [2.0, 2.2, 3.3, 4.5, 6.3, 10.2, 20.3, 23.4, 23.0, 16.5, 12.0, 6.2]
}
]
```

In go-echarts:

```go
line := charts.NewLine()
bar := charts.NewBar()
...
bar.Overlap(line)
```

It will add the line's all series into bar's and the `Options` is only obtained from bar's.

0 comments on commit 8032a9c

Please sign in to comment.