Browse Source

fix:图表组件y轴标题可旋转

liu.shiyi 1 year ago
parent
commit
2e66372c4b
37 changed files with 218 additions and 38 deletions
  1. 12 1
      data-room-ui/packages/G2Plots/折线图/基础折线图.js
  2. 12 1
      data-room-ui/packages/G2Plots/折线图/基础折线点图.js
  3. 12 1
      data-room-ui/packages/G2Plots/折线图/基础曲线图.js
  4. 12 1
      data-room-ui/packages/G2Plots/折线图/多折线动画图.js
  5. 12 1
      data-room-ui/packages/G2Plots/折线图/多折线图.js
  6. 12 1
      data-room-ui/packages/G2Plots/折线图/多阶梯折线图.js
  7. 12 1
      data-room-ui/packages/G2Plots/折线图/折线趋势填充图.js
  8. 1 1
      data-room-ui/packages/G2Plots/折线图/迷你基础折线图.js
  9. 1 1
      data-room-ui/packages/G2Plots/折线图/迷你面积图.js
  10. 12 1
      data-room-ui/packages/G2Plots/条形图/分组条形图.js
  11. 12 1
      data-room-ui/packages/G2Plots/条形图/基础条形图.js
  12. 12 1
      data-room-ui/packages/G2Plots/柱状图/分组柱状图.js
  13. 12 1
      data-room-ui/packages/G2Plots/柱状图/圆角柱状图.js
  14. 12 1
      data-room-ui/packages/G2Plots/柱状图/基础柱状图.js
  15. 12 1
      data-room-ui/packages/G2Plots/柱状图/堆叠柱状图.js
  16. 1 1
      data-room-ui/packages/G2Plots/漏斗图/分面漏斗图.js
  17. 1 1
      data-room-ui/packages/G2Plots/漏斗图/对比漏斗图.js
  18. 1 1
      data-room-ui/packages/G2Plots/矩形树图/基础矩形树图.js
  19. 1 1
      data-room-ui/packages/G2Plots/词云图/词云图.js
  20. 1 1
      data-room-ui/packages/G2Plots/进度图/仪表盘.js
  21. 1 1
      data-room-ui/packages/G2Plots/进度图/圆角进度条.js
  22. 1 1
      data-room-ui/packages/G2Plots/进度图/水波图.js
  23. 1 1
      data-room-ui/packages/G2Plots/进度图/矩形水波图.js
  24. 1 1
      data-room-ui/packages/G2Plots/进度图/进度仪表盘.js
  25. 1 1
      data-room-ui/packages/G2Plots/进度图/进度指标环图.js
  26. 1 1
      data-room-ui/packages/G2Plots/进度图/进度条.js
  27. 1 1
      data-room-ui/packages/G2Plots/进度图/进度环图.js
  28. 1 1
      data-room-ui/packages/G2Plots/进度图/钻石水波图.js
  29. 1 1
      data-room-ui/packages/G2Plots/雷达图/分组雷达图.js
  30. 1 1
      data-room-ui/packages/G2Plots/雷达图/基础雷达图.js
  31. 12 1
      data-room-ui/packages/G2Plots/面积图/基础面积图.js
  32. 12 1
      data-room-ui/packages/G2Plots/面积图/堆叠面积图.js
  33. 12 1
      data-room-ui/packages/G2Plots/面积图/渐变色面积图.js
  34. 1 1
      data-room-ui/packages/G2Plots/饼图/基础环图.js
  35. 1 1
      data-room-ui/packages/G2Plots/饼图/基础饼图.js
  36. 1 1
      data-room-ui/packages/G2Plots/饼图/玫瑰图.js
  37. 6 2
      data-room-ui/packages/js/store/actions.js

+ 12 - 1
data-room-ui/packages/G2Plots/折线图/基础折线图.js

@@ -4,7 +4,7 @@
  * @Author: xing.heng
  */
 // 配置版本号
-const version = '2023071001'
+const version = '2023092201'
 // 分类
 const category = 'Line'
 // 标题
@@ -359,6 +359,17 @@ const setting = [
     tabName: 'custom',
     groupName: 'yAxis'
   },
+  {
+    label: '标题过长时旋转',
+    type: 'switch',
+    field: 'yAxis_title_autoRotate',
+    optionField: 'yAxis.title.autoRotate',
+    value: true,
+    active: true,
+    inactive: false,
+    tabName: 'custom',
+    groupName: 'yAxis'
+  },
   {
     label: '标题位置',
     type: 'select',

+ 12 - 1
data-room-ui/packages/G2Plots/折线图/基础折线点图.js

@@ -5,7 +5,7 @@
  */
 
 // 配置版本号
-const version = '2023071001'
+const version = '2023092201'
 // 分类
 const category = 'Line'
 // 标题
@@ -350,6 +350,17 @@ const setting = [
     tabName: 'custom',
     groupName: 'yAxis'
   },
+  {
+    label: '标题过长时旋转',
+    type: 'switch',
+    field: 'yAxis_title_autoRotate',
+    optionField: 'yAxis.title.autoRotate',
+    value: true,
+    active: true,
+    inactive: false,
+    tabName: 'custom',
+    groupName: 'yAxis'
+  },
   {
     label: '标题位置',
     type: 'select',

+ 12 - 1
data-room-ui/packages/G2Plots/折线图/基础曲线图.js

@@ -5,7 +5,7 @@
  */
 
 // 配置版本号
-const version = '2023071001'
+const version = '2023092201'
 // 分类
 const category = 'Line'
 // 标题
@@ -250,6 +250,17 @@ const setting = [
     tabName: 'custom',
     groupName: 'yAxis'
   },
+  {
+    label: '标题过长时旋转',
+    type: 'switch',
+    field: 'yAxis_title_autoRotate',
+    optionField: 'yAxis.title.autoRotate',
+    value: true,
+    active: true,
+    inactive: false,
+    tabName: 'custom',
+    groupName: 'yAxis'
+  },
   {
     label: '标题位置',
     type: 'select',

+ 12 - 1
data-room-ui/packages/G2Plots/折线图/多折线动画图.js

@@ -5,7 +5,7 @@
  */
 
 // 配置版本号
-const version = '2023071001'
+const version = '2023092201'
 // 分类
 const category = 'Line'
 // 标题
@@ -365,6 +365,17 @@ const setting = [
     tabName: 'custom',
     groupName: 'yAxis'
   },
+  {
+    label: '标题过长时旋转',
+    type: 'switch',
+    field: 'yAxis_title_autoRotate',
+    optionField: 'yAxis.title.autoRotate',
+    value: true,
+    active: true,
+    inactive: false,
+    tabName: 'custom',
+    groupName: 'yAxis'
+  },
   {
     label: '标题位置',
     type: 'select',

+ 12 - 1
data-room-ui/packages/G2Plots/折线图/多折线图.js

@@ -5,7 +5,7 @@
  */
 
 // 配置版本号
-const version = '2023071001'
+const version = '2023092201'
 // 分类
 const category = 'Line'
 // 标题
@@ -327,6 +327,17 @@ const setting = [
     tabName: 'custom',
     groupName: 'yAxis'
   },
+  {
+    label: '标题过长时旋转',
+    type: 'switch',
+    field: 'yAxis_title_autoRotate',
+    optionField: 'yAxis.title.autoRotate',
+    value: true,
+    active: true,
+    inactive: false,
+    tabName: 'custom',
+    groupName: 'yAxis'
+  },
   {
     label: '标题位置',
     type: 'select',

+ 12 - 1
data-room-ui/packages/G2Plots/折线图/多阶梯折线图.js

@@ -1,6 +1,6 @@
 
 // 配置版本号
-const version = '2023071001'
+const version = '2023092201'
 // 分类
 const category = 'Line'
 // 标题
@@ -323,6 +323,17 @@ const setting = [
     tabName: 'custom',
     groupName: 'yAxis'
   },
+  {
+    label: '标题过长时旋转',
+    type: 'switch',
+    field: 'yAxis_title_autoRotate',
+    optionField: 'yAxis.title.autoRotate',
+    value: true,
+    active: true,
+    inactive: false,
+    tabName: 'custom',
+    groupName: 'yAxis'
+  },
   {
     label: '标题位置',
     type: 'select',

+ 12 - 1
data-room-ui/packages/G2Plots/折线图/折线趋势填充图.js

@@ -5,7 +5,7 @@
  */
 
 // 配置版本号
-const version = '2023071001'
+const version = '2023092201'
 // 分类
 const category = 'Line'
 // 标题
@@ -379,6 +379,17 @@ const setting = [
     tabName: 'custom',
     groupName: 'yAxis'
   },
+  {
+    label: '标题过长时旋转',
+    type: 'switch',
+    field: 'yAxis_title_autoRotate',
+    optionField: 'yAxis.title.autoRotate',
+    value: true,
+    active: true,
+    inactive: false,
+    tabName: 'custom',
+    groupName: 'yAxis'
+  },
   {
     label: '标题位置',
     type: 'select',

+ 1 - 1
data-room-ui/packages/G2Plots/折线图/迷你基础折线图.js

@@ -5,7 +5,7 @@
  */
 
 // 配置版本号
-const version = '2023071001'
+const version = '2023092201'
 // 分类
 const category = 'TinyLine'
 // 标题

+ 1 - 1
data-room-ui/packages/G2Plots/折线图/迷你面积图.js

@@ -5,7 +5,7 @@
  */
 
 // 配置版本号
-const version = '2023071001'
+const version = '2023092201'
 // 分类
 const category = 'TinyArea'
 // 标题

+ 12 - 1
data-room-ui/packages/G2Plots/条形图/分组条形图.js

@@ -5,7 +5,7 @@
  */
 
 // 配置版本号
-const version = '2023071001'
+const version = '2023092201'
 // 分类
 const category = 'Bar'
 // 标题
@@ -341,6 +341,17 @@ const setting = [
     tabName: 'custom',
     groupName: 'yAxis'
   },
+  {
+    label: '标题过长时旋转',
+    type: 'switch',
+    field: 'yAxis_title_autoRotate',
+    optionField: 'yAxis.title.autoRotate',
+    value: true,
+    active: true,
+    inactive: false,
+    tabName: 'custom',
+    groupName: 'yAxis'
+  },
   {
     label: '标题位置',
     type: 'select',

+ 12 - 1
data-room-ui/packages/G2Plots/条形图/基础条形图.js

@@ -5,7 +5,7 @@
  */
 
 // 配置版本号
-const version = '2023071001'
+const version = '2023092201'
 // 分类
 const category = 'Bar'
 // 标题
@@ -329,6 +329,17 @@ const setting = [
     tabName: 'custom',
     groupName: 'yAxis'
   },
+  {
+    label: '标题过长时旋转',
+    type: 'switch',
+    field: 'yAxis_title_autoRotate',
+    optionField: 'yAxis.title.autoRotate',
+    value: true,
+    active: true,
+    inactive: false,
+    tabName: 'custom',
+    groupName: 'yAxis'
+  },
   {
     label: '标题位置',
     type: 'select',

+ 12 - 1
data-room-ui/packages/G2Plots/柱状图/分组柱状图.js

@@ -5,7 +5,7 @@
  */
 
 // 配置版本号
-const version = '2023071001'
+const version = '2023092201'
 // 分类
 const category = 'Column'
 // 标题
@@ -365,6 +365,17 @@ const setting = [
     tabName: 'custom',
     groupName: 'yAxis'
   },
+  {
+    label: '标题过长时旋转',
+    type: 'switch',
+    field: 'yAxis_title_autoRotate',
+    optionField: 'yAxis.title.autoRotate',
+    value: true,
+    active: true,
+    inactive: false,
+    tabName: 'custom',
+    groupName: 'yAxis'
+  },
   {
     label: '标题位置',
     type: 'select',

+ 12 - 1
data-room-ui/packages/G2Plots/柱状图/圆角柱状图.js

@@ -5,7 +5,7 @@
  */
 
 // 配置版本号
-const version = '2023071001'
+const version = '2023092201'
 // 分类
 const category = 'Column'
 // 标题
@@ -365,6 +365,17 @@ const setting = [
     tabName: 'custom',
     groupName: 'yAxis'
   },
+  {
+    label: '标题过长时旋转',
+    type: 'switch',
+    field: 'yAxis_title_autoRotate',
+    optionField: 'yAxis.title.autoRotate',
+    value: true,
+    active: true,
+    inactive: false,
+    tabName: 'custom',
+    groupName: 'yAxis'
+  },
   {
     label: '标题位置',
     type: 'select',

+ 12 - 1
data-room-ui/packages/G2Plots/柱状图/基础柱状图.js

@@ -5,7 +5,7 @@
  */
 
 // 配置版本号
-const version = '2023071001'
+const version = '2023092201'
 // 分类
 const category = 'Column'
 // 标题
@@ -286,6 +286,17 @@ const setting = [
     tabName: 'custom',
     groupName: 'yAxis'
   },
+  {
+    label: '标题过长时旋转',
+    type: 'switch',
+    field: 'yAxis_title_autoRotate',
+    optionField: 'yAxis.title.autoRotate',
+    value: true,
+    active: true,
+    inactive: false,
+    tabName: 'custom',
+    groupName: 'yAxis'
+  },
   {
     label: '标题位置',
     type: 'select',

+ 12 - 1
data-room-ui/packages/G2Plots/柱状图/堆叠柱状图.js

@@ -5,7 +5,7 @@
  */
 
 // 配置版本号
-const version = '2023071001'
+const version = '2023092201'
 // 分类
 const category = 'Column'
 // 标题
@@ -365,6 +365,17 @@ const setting = [
     tabName: 'custom',
     groupName: 'yAxis'
   },
+  {
+    label: '标题过长时旋转',
+    type: 'switch',
+    field: 'yAxis_title_autoRotate',
+    optionField: 'yAxis.title.autoRotate',
+    value: true,
+    active: true,
+    inactive: false,
+    tabName: 'custom',
+    groupName: 'yAxis'
+  },
   {
     label: '标题位置',
     type: 'select',

+ 1 - 1
data-room-ui/packages/G2Plots/漏斗图/分面漏斗图.js

@@ -1,6 +1,6 @@
 
 // 配置版本号
-const version = '2023071001'
+const version = '2023092201'
 // 分类
 const category = 'Funnel'
 // 标题

+ 1 - 1
data-room-ui/packages/G2Plots/漏斗图/对比漏斗图.js

@@ -1,6 +1,6 @@
 
 // 配置版本号
-const version = '2023071001'
+const version = '2023092201'
 // 分类
 const category = 'Funnel'
 // 标题

+ 1 - 1
data-room-ui/packages/G2Plots/矩形树图/基础矩形树图.js

@@ -1,6 +1,6 @@
 
 // 配置版本号
-const version = '2023071001'
+const version = '2023092201'
 // 分类
 const category = 'Treemap'
 // 标题

+ 1 - 1
data-room-ui/packages/G2Plots/词云图/词云图.js

@@ -1,6 +1,6 @@
 
 // 配置版本号
-const version = '2023071001'
+const version = '2023092201'
 // 分类
 const category = 'WordCloud'
 // 标题

+ 1 - 1
data-room-ui/packages/G2Plots/进度图/仪表盘.js

@@ -1,6 +1,6 @@
 
 // 配置版本号
-const version = '2023071001'
+const version = '2023092201'
 // 分类
 const category = 'Gauge'
 // 标题

+ 1 - 1
data-room-ui/packages/G2Plots/进度图/圆角进度条.js

@@ -1,6 +1,6 @@
 
 // 配置版本号
-const version = '2023071001'
+const version = '2023092201'
 // 分类
 const category = 'Progress'
 // 标题

+ 1 - 1
data-room-ui/packages/G2Plots/进度图/水波图.js

@@ -1,6 +1,6 @@
 
 // 配置版本号
-const version = '2023071001'
+const version = '2023092201'
 // 分类
 const category = 'Liquid'
 // 标题

+ 1 - 1
data-room-ui/packages/G2Plots/进度图/矩形水波图.js

@@ -1,6 +1,6 @@
 
 // 配置版本号
-const version = '2023090801'
+const version = '2023092201'
 // 分类
 const category = 'Liquid'
 // 标题

+ 1 - 1
data-room-ui/packages/G2Plots/进度图/进度仪表盘.js

@@ -1,6 +1,6 @@
 
 // 配置版本号
-const version = '2023071001'
+const version = '2023092201'
 // 分类
 const category = 'Gauge'
 // 标题

+ 1 - 1
data-room-ui/packages/G2Plots/进度图/进度指标环图.js

@@ -1,5 +1,5 @@
 // 配置版本号
-const version = '2023071001'
+const version = '2023092201'
 // 分类
 const category = 'RingProgress'
 // 标题

+ 1 - 1
data-room-ui/packages/G2Plots/进度图/进度条.js

@@ -1,6 +1,6 @@
 
 // 配置版本号
-const version = '2023071001'
+const version = '2023092201'
 // 分类
 const category = 'Progress'
 // 标题

+ 1 - 1
data-room-ui/packages/G2Plots/进度图/进度环图.js

@@ -1,5 +1,5 @@
 // 配置版本号
-const version = '2023071001'
+const version = '2023092201'
 // 分类
 const category = 'RingProgress'
 // 标题

+ 1 - 1
data-room-ui/packages/G2Plots/进度图/钻石水波图.js

@@ -1,6 +1,6 @@
 
 // 配置版本号
-const version = '2023071001'
+const version = '2023092201'
 // 分类
 const category = 'Liquid'
 // 标题

+ 1 - 1
data-room-ui/packages/G2Plots/雷达图/分组雷达图.js

@@ -1,6 +1,6 @@
 
 // 配置版本号
-const version = '2023071001'
+const version = '2023092201'
 // 分类
 const category = 'Radar'
 // 标题

+ 1 - 1
data-room-ui/packages/G2Plots/雷达图/基础雷达图.js

@@ -1,6 +1,6 @@
 
 // 配置版本号
-const version = '2023071001'
+const version = '2023092201'
 // 分类
 const category = 'Radar'
 // 标题

+ 12 - 1
data-room-ui/packages/G2Plots/面积图/基础面积图.js

@@ -5,7 +5,7 @@
  */
 
 // 配置版本号
-const version = '2023071001'
+const version = '2023092201'
 // 分类
 const category = 'Area'
 // 标题
@@ -372,6 +372,17 @@ const setting = [
     tabName: 'custom',
     groupName: 'yAxis'
   },
+  {
+    label: '标题过长时旋转',
+    type: 'switch',
+    field: 'yAxis_title_autoRotate',
+    optionField: 'yAxis.title.autoRotate',
+    value: true,
+    active: true,
+    inactive: false,
+    tabName: 'custom',
+    groupName: 'yAxis'
+  },
   {
     label: '标题位置',
     type: 'select',

+ 12 - 1
data-room-ui/packages/G2Plots/面积图/堆叠面积图.js

@@ -5,7 +5,7 @@
  */
 
 // 配置版本号
-const version = '2023071001'
+const version = '2023092201'
 // 分类
 const category = 'Area'
 // 标题
@@ -330,6 +330,17 @@ const setting = [
     tabName: 'custom',
     groupName: 'yAxis'
   },
+  {
+    label: '标题过长时旋转',
+    type: 'switch',
+    field: 'yAxis_title_autoRotate',
+    optionField: 'yAxis.title.autoRotate',
+    value: true,
+    active: true,
+    inactive: false,
+    tabName: 'custom',
+    groupName: 'yAxis'
+  },
   {
     label: '标题位置',
     type: 'select',

+ 12 - 1
data-room-ui/packages/G2Plots/面积图/渐变色面积图.js

@@ -5,7 +5,7 @@
  */
 
 // 配置版本号
-const version = '2023071001'
+const version = '2023092201'
 // 分类
 const category = 'Area'
 // 标题
@@ -276,6 +276,17 @@ const setting = [
     tabName: 'custom',
     groupName: 'yAxis'
   },
+  {
+    label: '标题过长时旋转',
+    type: 'switch',
+    field: 'yAxis_title_autoRotate',
+    optionField: 'yAxis.title.autoRotate',
+    value: true,
+    active: true,
+    inactive: false,
+    tabName: 'custom',
+    groupName: 'yAxis'
+  },
   {
     label: '标题位置',
     type: 'select',

+ 1 - 1
data-room-ui/packages/G2Plots/饼图/基础环图.js

@@ -1,6 +1,6 @@
 
 // 配置版本号
-const version = '2023071001'
+const version = '2023092201'
 // 分类
 const category = 'Pie'
 // 标题

+ 1 - 1
data-room-ui/packages/G2Plots/饼图/基础饼图.js

@@ -1,6 +1,6 @@
 
 // 配置版本号
-const version = '2023071001'
+const version = '2023092201'
 // 分类
 const category = 'Pie'
 // 标题

+ 1 - 1
data-room-ui/packages/G2Plots/饼图/玫瑰图.js

@@ -1,6 +1,6 @@
 
 // 配置版本号
-const version = '2023071001'
+const version = '2023092201'
 // 分类
 const category = 'Rose'
 // 标题

+ 6 - 2
data-room-ui/packages/js/store/actions.js

@@ -14,8 +14,11 @@ export default {
   initLayout ({ commit, dispatch }, code) {
     return new Promise(resolve => {
       getScreenInfo(code).then(data => {
+        // 配置兼容
+        const pageInfo = handleResData(data)
         // 兼容边框配置
-        data.chartList.forEach((item) => {
+        pageInfo.chartList.forEach((item) => {
+          console.log(item)
           if (!item.border) {
             item.border={type:'',titleHeight:60,fontSize:30,isTitle:true,padding:[0,0,0,0]}
           }
@@ -34,6 +37,7 @@ export default {
                 const settings=JSON.parse(JSON.stringify(value.setting))
                 item.setting=settings.map((x)=>{
                   const index=item.setting.findIndex(y=>y.field==x.field)
+                  console.log(item.setting[index].field)
                   x.field = item.setting[index].field
                   x.value=item.setting[index].value
                   return x
@@ -42,7 +46,7 @@ export default {
             }
           }
         })
-        const pageInfo = handleResData(data)
+
         // 改变页面数据
         commit('changePageInfo', pageInfo)
         commit('changeZIndex', pageInfo.chartList)