|
@@ -1,6 +1,6 @@
|
|
|
|
|
|
// 配置版本号
|
|
// 配置版本号
|
|
-const version = '2023111401'
|
|
|
|
|
|
+const version = '2023111501'
|
|
// 分类
|
|
// 分类
|
|
const category = 'Line'
|
|
const category = 'Line'
|
|
// 标题
|
|
// 标题
|
|
@@ -285,10 +285,10 @@ const setting = [
|
|
groupName: 'xAxis'
|
|
groupName: 'xAxis'
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- label: '标签过多时旋转',
|
|
|
|
|
|
+ label: '标签过多时隐藏',
|
|
type: 'switch',
|
|
type: 'switch',
|
|
- field: 'xAxis_label_autoRotate',
|
|
|
|
- optionField: 'xAxis.label.autoRotate',
|
|
|
|
|
|
+ field: 'xAxis_label_autoHide',
|
|
|
|
+ optionField: 'xAxis.label.autoHideEnable',
|
|
value: true,
|
|
value: true,
|
|
active: true,
|
|
active: true,
|
|
inactive: false,
|
|
inactive: false,
|
|
@@ -296,11 +296,22 @@ const setting = [
|
|
groupName: 'xAxis'
|
|
groupName: 'xAxis'
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- label: '标签过多时隐藏',
|
|
|
|
|
|
+ label: '标签隐藏判定间隔',
|
|
|
|
+ type: 'inputNumber',
|
|
|
|
+ field: 'xAxis_label_autoHide_minGap',
|
|
|
|
+ optionField: 'xAxis.label.autoHideMinGap',
|
|
|
|
+ value: 0,
|
|
|
|
+ tabName: 'custom',
|
|
|
|
+ groupName: 'xAxis'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: '标签过多时旋转',
|
|
type: 'switch',
|
|
type: 'switch',
|
|
- field: 'xAxis_label_autoHide',
|
|
|
|
- optionField: 'xAxis.label.autoHide',
|
|
|
|
|
|
+ field: 'xAxis_label_autoRotate',
|
|
|
|
+ optionField: 'xAxis.label.autoRotate',
|
|
value: true,
|
|
value: true,
|
|
|
|
+ active: true,
|
|
|
|
+ inactive: false,
|
|
tabName: 'custom',
|
|
tabName: 'custom',
|
|
groupName: 'xAxis'
|
|
groupName: 'xAxis'
|
|
},
|
|
},
|
|
@@ -460,11 +471,25 @@ 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 = ''
|
|
const dataHandler = ''
|
|
@@ -506,6 +531,8 @@ const option = {
|
|
autoRotate: false,
|
|
autoRotate: false,
|
|
autoHide: true,
|
|
autoHide: true,
|
|
autoEllipsis: true,
|
|
autoEllipsis: true,
|
|
|
|
+ autoHideEnable: true,
|
|
|
|
+ autoHideMinGap: 0,
|
|
style: {
|
|
style: {
|
|
fill: '#8C8C8C',
|
|
fill: '#8C8C8C',
|
|
fontSize: 12
|
|
fontSize: 12
|