amis/examples/components/echarts/Legend.tsx

44 lines
855 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',
2020-11-02 19:39:21 +08:00
controls: buildOptions('legend.', legendOptions)
},
{
title: '位置',
2020-11-02 19:39:21 +08:00
controls: [viewport('legend.', '标题')]
2020-10-30 17:58:23 +08:00
},
{
title: '样式',
2020-11-02 19:39:21 +08:00
controls: commonStyle('legend.', '标题')
2020-10-30 17:58:23 +08:00
},
{
title: '文字样式',
controls: [
2020-11-01 22:35:09 +08:00
textStyleControls('legend.textStyle', '图例'),
textStyleControls('legend.pageTextStyle', '图例页信息')
]
2020-10-30 17:58:23 +08:00
},
{
title: '数据',
controls: [createHierarchy('legend', [])]
2020-10-30 17:58:23 +08:00
}
]
};