Переглянути джерело

数据产品:可视化图谱布局调整

Xiao_123 1 день тому
батько
коміт
ce71ae6fcd

+ 7 - 3
src/views/dataService/dataProduct/components/mGraph.vue

@@ -252,7 +252,7 @@ export default {
         defaultShowLineLabel: true, // 默认是否显示连线文字,v2版本此选项已无效,主要是这个选项没什么用
         hideNodeContentByZoom: true, // 是否根据缩放比例隐藏节点内容
         // disableDragCanvas: false,
-        // lineUseTextPath: false,
+        lineUseTextPath: true,
         defaultLineMarker: { // 默认的线条箭头样式,示例参考:配置工具中的选项:连线箭头样式
           markerWidth: 24,
           markerHeight: 24,
@@ -262,8 +262,8 @@ export default {
         },
         layouts: [
           {
-            label: '自动布局',
-            layoutName: 'center', // 布局方式(tree树状布局/center中心布局/force自动布局)
+            label: '树状布局',
+            layoutName: 'tree', // 布局方式(tree树状布局/center中心布局/force自动布局)
             from: 'left',
             maxLayoutTimes: 20,
             layoutClassName: 'seeks-layout-force',
@@ -275,6 +275,10 @@ export default {
             defaultLineColor: '#FD8B37',
             defaultLineWidth: 1,
             defaultShowLineLabel: true,
+            min_per_width: 200, // 节点横向距离最小限制
+            max_per_width: 300, // 节点横向距离最大限制
+            min_per_height: 200, // 节点纵向距离最小限制
+            max_per_height: 300, // 节点纵向距离最大限制
             defaultLineMarker: {
               markerWidth: 12,
               markerHeight: 12,