amis/examples/components/EChartsEditor/Legend.tsx

46 lines
938 B
TypeScript
Raw Normal View History

2020-10-30 17:58:23 +08:00
/**
* @file Echarts legend
*/
import {
textStyleControls,
buildOptions,
createHierarchy,
commonStyle,
viewport
2020-10-30 17:58:23 +08:00
} from './Common';
//@ts-ignore
const legendOptions = __inline('./option-parts/option.legend.json');
2020-10-30 17:58:23 +08:00
export default {
type: 'tabs',
tabs: [
{
title: '基础',
className: 'echarts-tab',
body: [createHierarchy('legend', buildOptions('', legendOptions))]
},
{
title: '位置',
body: [createHierarchy('legend', [viewport('', '图例')])]
2020-10-30 17:58:23 +08:00
},
{
title: '样式',
body: [createHierarchy('legend', commonStyle('', '图例'))]
2020-10-30 17:58:23 +08:00
},
{
title: '文字样式',
body: [
createHierarchy('legend', [
textStyleControls('textStyle', '图例'),
textStyleControls('pageTextStyle', '图例页信息')
])
]
2020-10-30 17:58:23 +08:00
},
{
title: '数据',
body: [createHierarchy('legend', [])]
2020-10-30 17:58:23 +08:00
}
]
};