amis/examples/components/EChartsEditor/Axis.tsx

15 lines
404 B
TypeScript
Raw Normal View History

2020-11-02 19:39:21 +08:00
import {objectOrArray, buildOptions} from './Common';
//@ts-ignore
const xAxisOptions = __inline('./option-parts/option.xAxis.json');
//@ts-ignore
const yAxisOptions = __inline('./option-parts/option.yAxis.json');
export default (axis = 'x') => {
return objectOrArray(
axis === 'x' ? 'xAxis' : 'yAxis',
'多轴模式',
buildOptions('', axis === 'x' ? xAxisOptions : yAxisOptions)
);
};