19 lines
392 B
TypeScript
19 lines
392 B
TypeScript
import { GridComponentOption } from 'echarts'
|
|
|
|
export const generateGrid = function (): GridComponentOption {
|
|
const index = 0
|
|
const length = 1
|
|
// const chartID = 1
|
|
const _height = 82 / length - 2 + '%'
|
|
const _top = index * (82 / length) + 1 + '%'
|
|
const _left = '8%'
|
|
const _right = '8%'
|
|
|
|
return {
|
|
top: _top,
|
|
height: _height,
|
|
left: _left,
|
|
right: _right,
|
|
}
|
|
}
|