Graphin: A library of React components based on G6 wrappers

Graphin: A library of React components based on G6 wrappers

2022-09-05 0 1,405
Resource Number 38218 Last Updated 2025-02-24
¥ 0HKD Upgrade VIP
Download Now Matters needing attention
Can't download? Please contact customer service to submit a link error!
Value-added Service: Installation Guide Environment Configuration Secondary Development Template Modification Source Code Installation

The Graphin recommended in this issue is named Graph Insight, which is a G6-wrapped React component library. It is a one-stop face recognition research platform open source of JD.com – FaceX-Zoo.

Graphin: A library of React components based on G6 wrappers插图

Features

High-value elements, standardized style configuration

Graphin normalizes the visual mapping of graph elements. A built-in Graphin node contains 5 parts: containers, labels, halos, icons, and logos, each of which can be data-driven. The built-in edges include three parts: path, label, and halo, and there are also responsive data style configurations for commonly used label backgrounds, self-loops, multilaterals, and dashed lines.

 

Graphin: A library of React components based on G6 wrappers插图1

Automatic layout to easily cope with complex scenes

Graphin has 10 built-in network diagram layouts and 4 tree diagram layouts to meet your layout needs for different data types and different analysis scenarios. For complex business scenarios, layout switching, dynamic layout, subgraph layout, etc., can be easily achieved through data-driven layoutGraphin: A library of React components based on G6 wrappers插图2 Graphin: A library of React components based on G6 wrappers插图3

 

 

Delicate interactions, easy to customize

Graphin offers 13 interactions. Including canvas zoom, pan, circle selection, zip, automatic Resize, as well as dragging, selecting, hovering, highlighting, expanding and folding elements to meet your interactive needs for different analysis scenarios.

 

Graphin: A library of React components based on G6 wrappers插图4

A comfortable development experience that fits the minds of React users

Graphin: A library of React components based on G6 wrappers插图5

use

Use the Graphin canvas component

import React from ‘react’;
import Graphin from ‘@antv/graphin’;
mock data
const data = Utils.mock(10).circle().graphin();
export default () => {
return <Graphin data={data} />;
};

Use Graphin to analyze components

import React from ‘react’;
import Graphin from ‘@antv/graphin’;
import { MiniMap } from ‘@antv/graphin-components’;
mock data
const data = Utils.mock(10).circle().graphin();
export default () => {
return (
<Graphin data={data}>
<MiniMap />
</Graphin>
);
};

Use the Graphin font icon

import React from ‘react’;
import Graphin from ‘@antv/graphin’;
import { MiniMap } from ‘@antv/graphin-components’;
Introducing icon resource files
import iconLoader from ‘@antv/graphin-icons’;
import ‘@antv/graphin-icons/dist/index.css’;
mock data
const data = Utils.mock(10).circle().graphin();
Register into Graphin
const { fontFamily, glyphs } = iconLoader();
const icons = Graphin.registerFontFamily(iconLoader);
Use icons
data.nodes.forEach(node => {
node.style = {
icon: {
type: ‘font’, // Specifies that the icon is of font type
fontFamily: fontFamily, // Specify FontFamily
value: icons.home, // Specifies the value of the icon
},
};
});
export default () => {
return (
<Graphin data={data}>
<MiniMap />
</Graphin>
);
};
Installation

Install dependencies

If you’re a web developer using React, you can use Graphin as a normal React component.

yarn add @antv/graphin@latest –save
yarn add @antv/graphin-components@latest –save
yarn add @antv/graphin-icons –save

Visualize relational data

The first step in completing a graph analytics product is to visualize relational data. Relational data is a very typical graph structure consisting of nodes and edges. Only id is a required parameter in Node, and only source and target are required parameters in Edge, which represent the ids of the start node and end node of the edge, respectively

Graphin: A library of React components based on G6 wrappers插图6

Graphin-specific layout

The layout of Graphin 2.0 fully embraces G6, please refer to it for details. However, Graphin also has 2 built-in layouts, graphin-force and preset

Graphin-Force is a force conductance layout algorithm based on the charge spring model, with a built-in Tweak algorithm inside, which can realize the incremental layout of force conductance
Preset is a preset layout as the name suggests, and when the user sets this layout, the Graphin will be internally laid out according to the coordinate information (x,y) in the data nodes given by the user. This layout is useful when you need a layout caching strategy in your business, or when you want to save the canvas and re-enter it.

资源下载此资源为免费资源立即下载
Telegram:@John_Software

Disclaimer: This article is published by a third party and represents the views of the author only and has nothing to do with this website. This site does not make any guarantee or commitment to the authenticity, completeness and timeliness of this article and all or part of its content, please readers for reference only, and please verify the relevant content. The publication or republication of articles by this website for the purpose of conveying more information does not mean that it endorses its views or confirms its description, nor does it mean that this website is responsible for its authenticity.

Ictcoder Free Source Code Graphin: A library of React components based on G6 wrappers https://ictcoder.com/graphin-a-library-of-react-components-based-on-g6-wrappers/

Share free open-source source code

Q&A
  • 1. Automatic: After making an online payment, click the (Download) link to download the source code; 2. Manual: Contact the seller or the official to check if the template is consistent. Then, place an order and make payment online. The seller ships the goods, and both parties inspect and confirm that there are no issues. ICTcoder will then settle the payment for the seller. Note: Please ensure to place your order and make payment through ICTcoder. If you do not place your order and make payment through ICTcoder, and the seller sends fake source code or encounters any issues, ICTcoder will not assist in resolving them, nor can we guarantee your funds!
View details
  • 1. Default transaction cycle for source code: The seller manually ships the goods within 1-3 days. The amount paid by the user will be held in escrow by ICTcoder until 7 days after the transaction is completed and both parties confirm that there are no issues. ICTcoder will then settle with the seller. In case of any disputes, ICTcoder will have staff to assist in handling until the dispute is resolved or a refund is made! If the buyer places an order and makes payment not through ICTcoder, any issues and disputes have nothing to do with ICTcoder, and ICTcoder will not be responsible for any liabilities!
View details
  • 1. ICTcoder will permanently archive the transaction process between both parties and snapshots of the traded goods to ensure the authenticity, validity, and security of the transaction! 2. ICTcoder cannot guarantee services such as "permanent package updates" and "permanent technical support" after the merchant's commitment. Buyers are advised to identify these services on their own. If necessary, they can contact ICTcoder for assistance; 3. When both website demonstration and image demonstration exist in the source code, and the text descriptions of the website and images are inconsistent, the text description of the image shall prevail as the basis for dispute resolution (excluding special statements or agreements); 4. If there is no statement such as "no legal basis for refund" or similar content, any indication on the product that "once sold, no refunds will be supported" or other similar declarations shall be deemed invalid; 5. Before the buyer places an order and makes payment, the transaction details agreed upon by both parties via WhatsApp or email can also serve as the basis for dispute resolution (in case of any inconsistency between the agreement and the description of the conflict, the agreement shall prevail); 6. Since chat records and email records can serve as the basis for dispute resolution, both parties should only communicate with each other through the contact information left on the system when contacting each other, in order to prevent the other party from denying their own commitments. 7. Although the probability of disputes is low, it is essential to retain important information such as chat records, text messages, and email records, in case a dispute arises, so that ICTcoder can intervene quickly.
View details
  • 1. As a third-party intermediary platform, ICTcoder solely protects transaction security and the rights and interests of both buyers and sellers based on the transaction contract (product description, agreed content before the transaction); 2. For online trading projects not on the ICTcoder platform, any consequences are unrelated to this platform; regardless of the reason why the seller requests an offline transaction, please contact the administrator to report.
View details

Related Source code

ICTcoder Customer Service

24-hour online professional services