ecomfe / echarts-graph-modularity Goto Github PK
View Code? Open in Web Editor NEWGraph modularity extension for community detection with Apache ECharts
Graph modularity extension for community detection with Apache ECharts
Thanks to echarts
, echarts-gl
and echarts-graph-modularity
, I've succeeded in displaying a complex weighted network with partitioned communities distinguished by colors. ๐
However, in addition to network modularity display, I needed to obtain the detailed data of each community composition, such as the members which could be used for further analysis. ๐
As far as I know, no existing method is provided to access the graph resolution result, which I think it's a missing valuable feature. ๐
To obtain the community data, I cloned the repo, opened the main.js
, allocated a variable to collect resolution result, and exposed it as payload through a custom event.
Pretty damage to the source code! ๐จ
May it extends an echarts instance method (or a better way you say), so that I just need to write simple as follows: ๐ค
require('echarts-graph-modularity')
...
// when I want community data
var result = chart.getCommunitiesData()
// result
[
{
color: '#c23632',
members: ['nodeA', 'nodeB', ...]
},
...
]
So, what's your opinion?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.