amis2/examples/components/EChartsEditor/Axis.tsx
2020-11-03 12:43:33 +08:00

15 lines
404 B
TypeScript

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)
);
};