mirror of
https://github.com/pengzhanbo/vuepress-theme-plume.git
synced 2026-04-23 10:58:13 +08:00
42 lines
593 B
Markdown
42 lines
593 B
Markdown
````md
|
|
::: echarts Two Value-Axes in Polar
|
|
```js
|
|
const data = []
|
|
|
|
for (let i = 0; i <= 100; i++) {
|
|
const theta = (i / 100) * 360
|
|
const r = 5 * (1 + Math.sin((theta / 180) * Math.PI))
|
|
data.push([r, theta])
|
|
}
|
|
|
|
const height = 450
|
|
|
|
const option = {
|
|
legend: {
|
|
data: ['line'],
|
|
},
|
|
polar: {},
|
|
tooltip: {
|
|
trigger: 'axis',
|
|
axisPointer: {
|
|
type: 'cross',
|
|
},
|
|
},
|
|
angleAxis: {
|
|
type: 'value',
|
|
startAngle: 0,
|
|
},
|
|
radiusAxis: {},
|
|
series: [
|
|
{
|
|
coordinateSystem: 'polar',
|
|
name: 'line',
|
|
type: 'line',
|
|
data,
|
|
},
|
|
],
|
|
}
|
|
```
|
|
:::
|
|
````
|