Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关系图中怎么让一个节点指向自己 并且有箭头显示 像这样的 #17612

Closed
History-1024 opened this issue Sep 4, 2022 · 3 comments
Labels
new-feature pending We are not sure about whether this is a bug/new feature.

Comments

@History-1024
Copy link

What problem does this feature solve?

1 在关系图中 怎么让一个节点指向自己 并且有箭头显示 像这样的
image

2怎么现实的label不随着line方向展示 而是调整为水平的呢
image

What does the proposed API look like?

option = {
title: {
text: 'Basic Graph'
},
tooltip: {},
animationDurationUpdate: 1500,
animationEasingUpdate: 'quinticInOut',
series: [
{
type: 'graph',
layout: 'none',
symbol:'rect',
symbolSize: [140,100],
roam: true,
label: {
show: true
},

  edgeSymbol: ['circle', 'arrow'],
  edgeSymbolSize: [2, 10],
  edgeLabel: {
    fontSize: 20
  },
  data: [
    {
      name: '接受',
      value:791,
      x: 100,
      y: 300,
      symbolSize: [140,50],
     label:{
       formatter:'{b|{b}}\n{c|{c}}',
       rich:{
         b:{
           fontSize:20
         },
         c:{
           fontSize:15,
           align:'center'
         }
       }
     }
    },
    {
      name: '接受完成',
      value:700,
      x: 100,
      y: 400,
      symbolSize: [140,50],
     label:{
       formatter:'{b|{b}}\n{c|{c}}',
       rich:{
         b:{
           fontSize:20
         },
         c:{
           fontSize:15,
           align:'center'
         }
       }
     }
    },
    {
      name: '数据收集',
      x: 100,
      y: 900
    },
    {
      name: '批准',
      x: 100,
      y: 1200
    },

  ],
  links: [
    {
      source: '接受',
      target: '接受完成',
      symbolSize: [2, 10],
      value:500,
      label: {
        show: true,
        formatter:'{c}'
      },
       lineStyle:{
         type:'dashed',
         curveness: 5
        }
    }, {
      source: '接受完成',
      target: '数据收集',
      symbolSize: [2, 10],
      value:500,
      label: {
        show: true,
        formatter:'{c}'
      },
      
    },{
      source: '接受完成',
      target: '批准',
      symbolSize: [2, 10],
      value:700,
      label: {
        show: true,
        formatter:'{c}'
      },
       
    },{
      source: '数据收集',
      target: '批准',
      symbolSize: [2, 10],
      value:200,
      label: {
        show: true,
        formatter:'{b|{c}}',
         rich:{
         b:{
           fontSize:200,
         },
         c:{
           fontSize:15,
           align:'center'
         }
       }
      },
     
    }
  ],
  
  lineStyle: {
    opacity: 1,
    width: 5,
    curveness: 0.4
  }
}

]
};

@echarts-bot echarts-bot bot added the missing-title This issue is missing a descriptive title. label Sep 4, 2022
@echarts-bot echarts-bot bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 4, 2022
@echarts-bot

This comment has been minimized.

@History-1024 History-1024 changed the title [Feature] 关系图中怎么让一个节点指向自己 并且有箭头显示 像这样的 Sep 4, 2022
@echarts-bot echarts-bot bot added the pending We are not sure about whether this is a bug/new feature. label Sep 4, 2022
@echarts-bot echarts-bot bot reopened this Sep 4, 2022
@echarts-bot echarts-bot bot removed the missing-title This issue is missing a descriptive title. label Sep 4, 2022
@echarts-bot
Copy link

echarts-bot bot commented Sep 4, 2022

@542473232 It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗

TRANSLATED

TITLE

How to make a node point to itself in the relationship graph and have arrows displayed like this

BODY

What problem does this feature solve?

1 In the relationship graph, how to make a node point to itself and have arrows displayed like this
image

2 How the real label is not displayed with the line direction but adjusted to be horizontal?
image

What does the proposed API look like?

option = {
title: {
text: 'Basic Graph'
},
tooltip: {},
animationDurationUpdate: 1500,
animationEasingUpdate: 'quinticInOut',
series: [
{
type: 'graph',
layout: 'none',
symbol:'rect',
symbolSize: [140,100],
roam: true,
label: {
show: true
},

  edgeSymbol: ['circle', 'arrow'],
  edgeSymbolSize: [2, 10],
  edgeLabel: {
    fontSize: 20
  },
  data: [
    {
      name: 'Accept',
      value:791,
      x: 100,
      y: 300,
      symbolSize: [140,50],
     label:{
       formatter:'{b|{b}}\n{c|{c}}',
       rich:{
         b:{
           fontSize:20
         },
         c:{
           fontSize:15,
           align: 'center'
         }
       }
     }
    },
    {
      name: 'Accept complete',
      value:700,
      x: 100,
      y: 400,
      symbolSize: [140,50],
     label:{
       formatter:'{b|{b}}\n{c|{c}}',
       rich:{
         b:{
           fontSize:20
         },
         c:{
           fontSize:15,
           align: 'center'
         }
       }
     }
    },
    {
      name: 'Data collection',
      x: 100,
      y: 900
    },
    {
      name: 'Approve',
      x: 100,
      y: 1200
    },

  ],
  links: [
    {
      source: 'accept',
      target: 'Accept complete',
      symbolSize: [2, 10],
      value:500,
      label: {
        show: true,
        formatter:'{c}'
      },
       lineStyle:{
         type:'dashed',
         curveness: 5
        }
    }, {
      source: 'Accept complete',
      target: 'data collection',
      symbolSize: [2, 10],
      value:500,
      label: {
        show: true,
        formatter:'{c}'
      },
      
    },{
      source: 'Accept complete',
      target: 'approve',
      symbolSize: [2, 10],
      value:700,
      label: {
        show: true,
        formatter:'{c}'
      },
       
    },{
      source: 'data collection',
      target: 'approve',
      symbolSize: [2, 10],
      value:200,
      label: {
        show: true,
        formatter:'{b|{c}}',
         rich:{
         b:{
           fontSize:200,
         },
         c:{
           fontSize:15,
           align: 'center'
         }
       }
      },
     
    }
  ],
  
  lineStyle: {
    opacity: 1,
    width: 5,
    curveness: 0.4
  }
}

]
};

@Ovilia
Copy link
Contributor

Ovilia commented Sep 5, 2022

Please follow #15405

@Ovilia Ovilia closed this as completed Sep 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-feature pending We are not sure about whether this is a bug/new feature.
Projects
None yet
Development

No branches or pull requests

2 participants