ecomfe / echarts-dagre

ECharts graph layout extension using dagre.js
12 stars 7 forks source link

graph layout extension integrated with dagre.js and Apache ECharts (incubating)

Install

<script src="https://github.com/ecomfe/echarts-dagre/raw/master/echarts.min.js"></script>
<script src="https://github.com/ecomfe/echarts-dagre/raw/master/echarts-dagre.min.js"></script>

Or

npm install echarts-dagre
var echarts = require('echarts');
require('echarts-dagre');

Usage


...

chart.setOption({
    ...
    series: [{
        type: 'graph',
        // Change the layout to dagre, that's all you need to do.
        layout: 'dagre',
        nodes: [...],
        links: [...]
    }]
});