diff --git a/data-room-ui/packages/BigScreenDesign/RightSetting/G2CustomSetting.vue b/data-room-ui/packages/BigScreenDesign/RightSetting/G2CustomSetting.vue index d290a8b0..23be8c1d 100644 --- a/data-room-ui/packages/BigScreenDesign/RightSetting/G2CustomSetting.vue +++ b/data-room-ui/packages/BigScreenDesign/RightSetting/G2CustomSetting.vue @@ -138,6 +138,12 @@ :active-value="1" :inactive-value="0" /> + settingItem.field === \'yAxis_grid_line_style_lineDash\').value]' // 数据处理脚本 const dataHandler = '' @@ -614,6 +626,7 @@ const option = { style: { stroke: '#d0d0d0', lineWidth: 1, + lineDash: [4, 5], strokeOpacity: 0.7 } } diff --git a/data-room-ui/packages/G2Plots/折线图/多折线图.js b/data-room-ui/packages/G2Plots/折线图/多折线图.js index a09f713d..c52c31d6 100644 --- a/data-room-ui/packages/G2Plots/折线图/多折线图.js +++ b/data-room-ui/packages/G2Plots/折线图/多折线图.js @@ -79,6 +79,17 @@ const setting = [ groupName: 'graph' }, // 网格线 grid + { + label: '虚线', + type: 'switchCustom', + field: 'yAxis_grid_line_style_lineDash', + optionField: 'yAxis.grid.line.style.lineDash', + value: 0, + active: 5, + inactive: 0, + tabName: 'custom', + groupName: 'grid' + }, { label: '宽度', type: 'inputNumber', @@ -1246,7 +1257,8 @@ 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 dataHandler = '' @@ -1319,6 +1331,7 @@ const option = { style: { stroke: '#d0d0d0', lineWidth: 1, + lineDash: [4, 5], strokeOpacity: 0.7 } } diff --git a/data-room-ui/packages/G2Plots/折线图/多阶梯折线图.js b/data-room-ui/packages/G2Plots/折线图/多阶梯折线图.js index bbfc04bb..165c4964 100644 --- a/data-room-ui/packages/G2Plots/折线图/多阶梯折线图.js +++ b/data-room-ui/packages/G2Plots/折线图/多阶梯折线图.js @@ -75,6 +75,17 @@ const setting = [ groupName: 'graph' }, // 网格线 grid + { + label: '虚线', + type: 'switchCustom', + field: 'yAxis_grid_line_style_lineDash', + optionField: 'yAxis.grid.line.style.lineDash', + value: 0, + active: 5, + inactive: 0, + tabName: 'custom', + groupName: 'grid' + }, { label: '宽度', type: 'inputNumber', @@ -441,7 +452,8 @@ 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 dataHandler = '' @@ -515,6 +527,7 @@ const option = { style: { stroke: '#d0d0d0', lineWidth: 1, + lineDash: [4, 5], strokeOpacity: 0.7 } } diff --git a/data-room-ui/packages/G2Plots/折线图/折线趋势填充图.js b/data-room-ui/packages/G2Plots/折线图/折线趋势填充图.js index 8c511880..65cd2f37 100644 --- a/data-room-ui/packages/G2Plots/折线图/折线趋势填充图.js +++ b/data-room-ui/packages/G2Plots/折线图/折线趋势填充图.js @@ -131,6 +131,17 @@ const setting = [ step: 1 }, // 网格线 grid + { + label: '虚线', + type: 'switchCustom', + field: 'yAxis_grid_line_style_lineDash', + optionField: 'yAxis.grid.line.style.lineDash', + value: 0, + active: 5, + inactive: 0, + tabName: 'custom', + groupName: 'grid' + }, { label: '宽度', type: 'inputNumber', @@ -568,7 +579,8 @@ 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 dataHandler = '' @@ -630,6 +642,7 @@ const option = { style: { stroke: '#d0d0d0', lineWidth: 1, + lineDash: [4, 5], strokeOpacity: 0.7 } } diff --git a/data-room-ui/packages/G2Plots/条形图/分组条形图.js b/data-room-ui/packages/G2Plots/条形图/分组条形图.js index 4c9a5a86..33f4e488 100644 --- a/data-room-ui/packages/G2Plots/条形图/分组条形图.js +++ b/data-room-ui/packages/G2Plots/条形图/分组条形图.js @@ -140,6 +140,17 @@ const setting = [ groupName: 'graph' }, // 网格线 grid + { + label: '虚线', + type: 'switchCustom', + field: 'yAxis_grid_line_style_lineDash', + optionField: 'yAxis.grid.line.style.lineDash', + value: 0, + active: 5, + inactive: 0, + tabName: 'custom', + groupName: 'grid' + }, { label: '宽度', type: 'inputNumber', @@ -530,7 +541,8 @@ const data = [ // 配置处理脚本 const optionHandler = '\noption.legend = option.legendEnable ? {position: setting.find(settingItem=>settingItem.field === \'legendPosition\').value} : false;' + - '\nconst radiusNum = setting.find(settingItem=>settingItem.field === \'radiusNum\').value; option.barStyle.radius = [radiusNum,radiusNum,0,0]' + '\nconst radiusNum = setting.find(settingItem=>settingItem.field === \'radiusNum\').value; option.barStyle.radius = [radiusNum,radiusNum,0,0];' + + 'option.yAxis.grid.line.style.lineDash = [4,setting.find(settingItem=>settingItem.field === \'yAxis_grid_line_style_lineDash\').value]' // 数据处理脚本 const dataHandler = '' diff --git a/data-room-ui/packages/G2Plots/条形图/基础条形图.js b/data-room-ui/packages/G2Plots/条形图/基础条形图.js index 8048c907..977046f5 100644 --- a/data-room-ui/packages/G2Plots/条形图/基础条形图.js +++ b/data-room-ui/packages/G2Plots/条形图/基础条形图.js @@ -128,6 +128,17 @@ const setting = [ groupName: 'graph' }, // 网格线 grid + { + label: '虚线', + type: 'switchCustom', + field: 'yAxis_grid_line_style_lineDash', + optionField: 'yAxis.grid.line.style.lineDash', + value: 0, + active: 5, + inactive: 0, + tabName: 'custom', + groupName: 'grid' + }, { label: '宽度', type: 'inputNumber', @@ -472,7 +483,7 @@ const data = [ ] // 配置处理脚本 -const optionHandler = '' +const optionHandler = 'option.yAxis.grid.line.style.lineDash = [4,setting.find(settingItem=>settingItem.field === \'yAxis_grid_line_style_lineDash\').value]' // 数据处理脚本 const dataHandler = 'const yFieldValue = setting.find(settingItem=>settingItem.field === \'yField\').value\n' + diff --git a/data-room-ui/packages/G2Plots/柱状图/分组柱状图.js b/data-room-ui/packages/G2Plots/柱状图/分组柱状图.js index 9d0117ce..c72f0005 100644 --- a/data-room-ui/packages/G2Plots/柱状图/分组柱状图.js +++ b/data-room-ui/packages/G2Plots/柱状图/分组柱状图.js @@ -115,6 +115,17 @@ const setting = [ groupName: 'graph' }, // 网格线 grid + { + label: '虚线', + type: 'switchCustom', + field: 'yAxis_grid_line_style_lineDash', + optionField: 'yAxis.grid.line.style.lineDash', + value: 0, + active: 5, + inactive: 0, + tabName: 'custom', + groupName: 'grid' + }, { label: '宽度', type: 'inputNumber', @@ -473,7 +484,8 @@ 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 dataHandler = '' @@ -554,6 +566,7 @@ const option = { style: { stroke: '#d0d0d0', lineWidth: 1, + lineDash: [4, 5], strokeOpacity: 0.7 } } diff --git a/data-room-ui/packages/G2Plots/柱状图/圆角柱状图.js b/data-room-ui/packages/G2Plots/柱状图/圆角柱状图.js index 9009562e..eebce4d8 100644 --- a/data-room-ui/packages/G2Plots/柱状图/圆角柱状图.js +++ b/data-room-ui/packages/G2Plots/柱状图/圆角柱状图.js @@ -115,6 +115,17 @@ const setting = [ groupName: 'graph' }, // 网格线 grid + { + label: '虚线', + type: 'switchCustom', + field: 'yAxis_grid_line_style_lineDash', + optionField: 'yAxis.grid.line.style.lineDash', + value: 0, + active: 5, + inactive: 0, + tabName: 'custom', + groupName: 'grid' + }, { label: '宽度', type: 'inputNumber', @@ -489,7 +500,8 @@ const data = [ const optionHandler = 'option.legend = option.legendEnable ? {position: setting.find(settingItem=>settingItem.field === \'legendPosition\').value} : false;' + ' 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 dataHandler = '' @@ -579,6 +591,7 @@ const option = { style: { stroke: '#d0d0d0', lineWidth: 1, + lineDash: [4, 5], strokeOpacity: 0.7 } } diff --git a/data-room-ui/packages/G2Plots/柱状图/基础柱状图.js b/data-room-ui/packages/G2Plots/柱状图/基础柱状图.js index d20273c9..2e78a4ea 100644 --- a/data-room-ui/packages/G2Plots/柱状图/基础柱状图.js +++ b/data-room-ui/packages/G2Plots/柱状图/基础柱状图.js @@ -102,6 +102,17 @@ const setting = [ groupName: 'graph' }, // 网格线 grid + { + label: '虚线', + type: 'switchCustom', + field: 'yAxis_grid_line_style_lineDash', + optionField: 'yAxis.grid.line.style.lineDash', + value: 0, + active: 5, + inactive: 0, + tabName: 'custom', + groupName: 'grid' + }, { label: '宽度', type: 'inputNumber', @@ -407,6 +418,8 @@ const data = [ sales: 38 } ] +// 配置处理脚本 +const optionHandler = 'option.yAxis.grid.line.style.lineDash = [4,setting.find(settingItem=>settingItem.field === \'yAxis_grid_line_style_lineDash\').value]' // 数据处理脚本 const dataHandler = '' @@ -480,6 +493,7 @@ const option = { style: { stroke: '#d0d0d0', lineWidth: 1, + lineDash: [4, 5], strokeOpacity: 0.7 } } @@ -529,5 +543,6 @@ export default { name, option, setting, - dataHandler + dataHandler, + optionHandler } diff --git a/data-room-ui/packages/G2Plots/柱状图/堆叠柱状图.js b/data-room-ui/packages/G2Plots/柱状图/堆叠柱状图.js index 60f9a6c9..10dd5820 100644 --- a/data-room-ui/packages/G2Plots/柱状图/堆叠柱状图.js +++ b/data-room-ui/packages/G2Plots/柱状图/堆叠柱状图.js @@ -115,6 +115,17 @@ const setting = [ groupName: 'graph' }, // 网格线 grid + { + label: '虚线', + type: 'switchCustom', + field: 'yAxis_grid_line_style_lineDash', + optionField: 'yAxis.grid.line.style.lineDash', + value: 0, + active: 5, + inactive: 0, + tabName: 'custom', + groupName: 'grid' + }, { label: '宽度', type: 'inputNumber', @@ -475,7 +486,8 @@ const data = [ const optionHandler = 'option.legend = option.legendEnable ? {position: setting.find(settingItem=>settingItem.field === \'legendPosition\').value} : false;' + ' 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 dataHandler = '' @@ -562,6 +574,7 @@ const option = { style: { stroke: '#d0d0d0', lineWidth: 1, + lineDash: [4, 5], strokeOpacity: 0.7 } } diff --git a/data-room-ui/packages/G2Plots/面积图/基础面积图.js b/data-room-ui/packages/G2Plots/面积图/基础面积图.js index bc0c3c71..c261570e 100644 --- a/data-room-ui/packages/G2Plots/面积图/基础面积图.js +++ b/data-room-ui/packages/G2Plots/面积图/基础面积图.js @@ -176,6 +176,17 @@ const setting = [ groupName: 'graph' }, // 网格线 grid + { + label: '虚线', + type: 'switchCustom', + field: 'yAxis_grid_line_style_lineDash', + optionField: 'yAxis.grid.line.style.lineDash', + value: 0, + active: 5, + inactive: 0, + tabName: 'custom', + groupName: 'grid' + }, { label: '宽度', type: 'inputNumber', @@ -469,7 +480,8 @@ const optionHandler = ' let pointEnable = setting.find(settingItem=>settingItem ' option.point = {shape: pointEnable}\n' + ' let pointColor = setting.find(settingItem=>settingItem.field === \'point_color\').value\n' + ' option.point.color = pointColor\n' + - ' }' + ' };' + + 'option.yAxis.grid.line.style.lineDash = [4,setting.find(settingItem=>settingItem.field === \'yAxis_grid_line_style_lineDash\').value]' // 数据处理脚本 const dataHandler = '' @@ -548,6 +560,7 @@ const option = { style: { stroke: '#d0d0d0', lineWidth: 1, + lineDash: [4, 5], strokeOpacity: 0.7 } } diff --git a/data-room-ui/packages/G2Plots/面积图/堆叠面积图.js b/data-room-ui/packages/G2Plots/面积图/堆叠面积图.js index cf5e6c3b..4a57ad3e 100644 --- a/data-room-ui/packages/G2Plots/面积图/堆叠面积图.js +++ b/data-room-ui/packages/G2Plots/面积图/堆叠面积图.js @@ -80,6 +80,17 @@ const setting = [ groupName: 'graph' }, // 网格线 grid + { + label: '虚线', + type: 'switchCustom', + field: 'yAxis_grid_line_style_lineDash', + optionField: 'yAxis.grid.line.style.lineDash', + value: 0, + active: 5, + inactive: 0, + tabName: 'custom', + groupName: 'grid' + }, { label: '宽度', type: 'inputNumber', @@ -571,7 +582,8 @@ 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 dataHandler = '' @@ -646,6 +658,7 @@ const option = { style: { stroke: '#d0d0d0', lineWidth: 1, + lineDash: [4, 5], strokeOpacity: 0.7 } } diff --git a/data-room-ui/packages/G2Plots/面积图/渐变色面积图.js b/data-room-ui/packages/G2Plots/面积图/渐变色面积图.js index 9c4806e3..1b9abae8 100644 --- a/data-room-ui/packages/G2Plots/面积图/渐变色面积图.js +++ b/data-room-ui/packages/G2Plots/面积图/渐变色面积图.js @@ -91,6 +91,17 @@ const setting = [ }, // 网格线 grid + { + label: '虚线', + type: 'switchCustom', + field: 'yAxis_grid_line_style_lineDash', + optionField: 'yAxis.grid.line.style.lineDash', + value: 0, + active: 5, + inactive: 0, + tabName: 'custom', + groupName: 'grid' + }, { label: '宽度', type: 'inputNumber', @@ -451,7 +462,7 @@ const data = [ { Date: '2017-01', scales: 145 }, { Date: '2017-02', scales: 207 } ] - +const optionHandler = 'option.yAxis.grid.line.style.lineDash = [4,setting.find(settingItem=>settingItem.field === \'yAxis_grid_line_style_lineDash\').value]' // 数据处理脚本 const dataHandler = '' @@ -519,6 +530,7 @@ const option = { style: { stroke: '#d0d0d0', lineWidth: 1, + lineDash: [4, 5], strokeOpacity: 0.7 } } @@ -549,5 +561,6 @@ export default { name, option, setting, - dataHandler + dataHandler, + optionHandler }