2020-10-30 17:58:23 +08:00
|
|
|
/**
|
|
|
|
* @file Echarts legend 的配置
|
|
|
|
*/
|
|
|
|
import {
|
|
|
|
textStyleControls,
|
2020-11-01 00:26:47 +08:00
|
|
|
buildOptions,
|
|
|
|
createHierarchy,
|
|
|
|
commonStyle,
|
|
|
|
viewport
|
2020-10-30 17:58:23 +08:00
|
|
|
} from './Common';
|
|
|
|
|
2020-11-01 00:26:47 +08:00
|
|
|
//@ts-ignore
|
|
|
|
const legendOptions = __inline('./option-parts/option.legend.json');
|
|
|
|
|
2020-10-30 17:58:23 +08:00
|
|
|
export default {
|
|
|
|
type: 'tabs',
|
|
|
|
tabs: [
|
|
|
|
{
|
|
|
|
title: '基础',
|
2020-11-01 00:26:47 +08:00
|
|
|
className: 'echarts-tab',
|
2020-11-02 19:39:21 +08:00
|
|
|
controls: buildOptions('legend.', legendOptions)
|
2020-11-01 00:26:47 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
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: '文字样式',
|
2020-11-01 00:26:47 +08:00
|
|
|
controls: [
|
2020-11-01 22:35:09 +08:00
|
|
|
textStyleControls('legend.textStyle', '图例'),
|
|
|
|
textStyleControls('legend.pageTextStyle', '图例页信息')
|
2020-11-01 00:26:47 +08:00
|
|
|
]
|
2020-10-30 17:58:23 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '数据',
|
2020-11-01 00:26:47 +08:00
|
|
|
controls: [createHierarchy('legend', [])]
|
2020-10-30 17:58:23 +08:00
|
|
|
}
|
|
|
|
]
|
|
|
|
};
|