Files
vueecharts/demo/data/polar.js
Yue JIN 522dd7cc5c chore: ESLint Flat Config (#834)
* chore: eslint flat config

* chore: format

* update according to review

* chore: remove prettier config and format

* fix: move handler to script to bypass eslint

* chore: config eslint for lang=js block

* docs: add surrounding empty lines for code block

* chore: also minify css in csp build

* chore: publint
2025-08-10 23:22:04 +08:00

53 lines
935 B
JavaScript

const data = [];
for (let i = 0; i <= 360; i++) {
const t = (i / 180) * Math.PI;
const r = Math.sin(2 * t) * Math.cos(2 * t);
data.push([r, i]);
}
export default function getData() {
return {
textStyle: {
fontFamily: 'Inter, "Helvetica Neue", Arial, sans-serif',
fontWeight: 300,
},
title: {
text: "Dual Numeric Axis",
top: "5%",
left: "5%",
},
legend: {
data: ["line"],
top: "6%",
},
polar: {
radius: "65%",
center: ["50%", "56%"],
},
tooltip: {
trigger: "axis",
axisPointer: {
type: "cross",
},
},
angleAxis: {
type: "value",
startAngle: 0,
},
radiusAxis: {
min: 0,
},
series: [
{
coordinateSystem: "polar",
name: "line",
type: "line",
showSymbol: false,
data: data,
},
],
animationDuration: 2000,
};
}