'how to determine x and y position for graph type in echart

From the given examples for graph series, I see the graph nodes are getting loaded from JSON files, where each node has corresponding x and y position hard-coded.

"nodes": [
      {
        "id": "0",
        "name": "Myriel",
        "symbolSize": 19.12381,
        "x": -266.82776,
        "y": 299.6904,
        "value": 28.685715,
        "category": 0
      },
 ...

How do I get to determine the position for my given dataset? Do i need to iterate through all my nodes and do some logic to dynamically determine those position so that the node wont get overlapped?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source