|
|
|
@ -5,7 +5,7 @@
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
// 配置版本号
|
|
|
|
|
const version = '2023111401'
|
|
|
|
|
const version = '2023111501'
|
|
|
|
|
// 分类
|
|
|
|
|
const category = 'Column'
|
|
|
|
|
// 标题
|
|
|
|
@ -327,10 +327,10 @@ const setting = [
|
|
|
|
|
groupName: 'xAxis'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '标签过多时旋转',
|
|
|
|
|
label: '标签过多时隐藏',
|
|
|
|
|
type: 'switch',
|
|
|
|
|
field: 'xAxis_label_autoRotate',
|
|
|
|
|
optionField: 'xAxis.label.autoRotate',
|
|
|
|
|
field: 'xAxis_label_autoHide',
|
|
|
|
|
optionField: 'xAxis.label.autoHideEnable',
|
|
|
|
|
value: true,
|
|
|
|
|
active: true,
|
|
|
|
|
inactive: false,
|
|
|
|
@ -338,11 +338,22 @@ const setting = [
|
|
|
|
|
groupName: 'xAxis'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '标签过多时隐藏',
|
|
|
|
|
label: '标签隐藏判定间隔',
|
|
|
|
|
type: 'inputNumber',
|
|
|
|
|
field: 'xAxis_label_autoHide_minGap',
|
|
|
|
|
optionField: 'xAxis.label.autoHideMinGap',
|
|
|
|
|
value: 0,
|
|
|
|
|
tabName: 'custom',
|
|
|
|
|
groupName: 'xAxis'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '标签过多时旋转',
|
|
|
|
|
type: 'switch',
|
|
|
|
|
field: 'xAxis_label_autoHide',
|
|
|
|
|
optionField: 'xAxis.label.autoHide',
|
|
|
|
|
field: 'xAxis_label_autoRotate',
|
|
|
|
|
optionField: 'xAxis.label.autoRotate',
|
|
|
|
|
value: true,
|
|
|
|
|
active: true,
|
|
|
|
|
inactive: false,
|
|
|
|
|
tabName: 'custom',
|
|
|
|
|
groupName: 'xAxis'
|
|
|
|
|
},
|
|
|
|
@ -498,11 +509,24 @@ const data = [
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
// 配置处理脚本
|
|
|
|
|
const optionHandler = ' option.legend = option.legendEnable ? {position: setting.find(settingItem=>settingItem.field === \'legendPosition\').value} : false;\n' +
|
|
|
|
|
' if (option.legendEnable) {\n' +
|
|
|
|
|
' option.legend.itemName = option.legendItemName\n' +
|
|
|
|
|
' };' +
|
|
|
|
|
'option.yAxis.grid.line.style.lineDash = [4,setting.find(settingItem=>settingItem.field === \'yAxis_grid_line_style_lineDash\').value]'
|
|
|
|
|
const optionHandler =
|
|
|
|
|
`
|
|
|
|
|
option.legend = option.legendEnable ? {position: setting.find(settingItem=>settingItem.field === 'legendPosition').value} : false;
|
|
|
|
|
if (option.legendEnable) {
|
|
|
|
|
option.legend.itemName = option.legendItemName
|
|
|
|
|
};
|
|
|
|
|
option.yAxis.grid.line.style.lineDash = [4,setting.find(settingItem=>settingItem.field === 'yAxis_grid_line_style_lineDash').value]
|
|
|
|
|
let autoHide = setting.find(settingItem=>settingItem.field === 'xAxis_label_autoHide').value
|
|
|
|
|
if(autoHide){
|
|
|
|
|
let minGap = option.xAxis.label.autoHideMinGap
|
|
|
|
|
option.xAxis.label.autoHide = {
|
|
|
|
|
type: 'equidistance',
|
|
|
|
|
cfg: { minGap: minGap }
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
option.xAxis.label.autoHide = false
|
|
|
|
|
}
|
|
|
|
|
`
|
|
|
|
|
|
|
|
|
|
// 数据处理脚本
|
|
|
|
|
const dataHandler = ''
|
|
|
|
@ -551,6 +575,8 @@ const option = {
|
|
|
|
|
autoRotate: false,
|
|
|
|
|
autoHide: true,
|
|
|
|
|
autoEllipsis: true,
|
|
|
|
|
autoHideEnable: true,
|
|
|
|
|
autoHideMinGap: 2,
|
|
|
|
|
style: {
|
|
|
|
|
fill: '#8C8C8C',
|
|
|
|
|
fontSize: 12
|
|
|
|
|