Graphin: A library of React components based on G6 wrappers

Graphin: A library of React components based on G6 wrappers

2022-09-05 0 974
Resource Number 38218 Last Updated 2025-02-24
¥ 0USD 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/kyym/graphin-a-library-of-react-components-based-on-g6-wrappers.html

Share free open-source source code

Q&A
  • 1, automatic: after taking the photo, click the (download) link to download; 2. Manual: After taking the photo, contact the seller to issue it or contact the official to find the developer to ship.
View details
  • 1, the default transaction cycle of the source code: manual delivery of goods for 1-3 days, and the user payment amount will enter the platform guarantee until the completion of the transaction or 3-7 days can be issued, in case of disputes indefinitely extend the collection amount until the dispute is resolved or refunded!
View details
  • 1. Heptalon will permanently archive the process of trading between the two parties and the snapshots of the traded goods to ensure that the transaction is true, effective and safe! 2, Seven PAWS can not guarantee such as "permanent package update", "permanent technical support" and other similar transactions after the merchant commitment, please identify the buyer; 3, in the source code at the same time there is a website demonstration and picture demonstration, and the site is inconsistent with the diagram, the default according to the diagram as the dispute evaluation basis (except for special statements or agreement); 4, in the absence of "no legitimate basis for refund", the commodity written "once sold, no support for refund" and other similar statements, shall be deemed invalid; 5, before the shooting, the transaction content agreed by the two parties on QQ can also be the basis for dispute judgment (agreement and description of the conflict, the agreement shall prevail); 6, because the chat record can be used as the basis for dispute judgment, so when the two sides contact, only communicate with the other party on the QQ and mobile phone number left on the systemhere, in case the other party does not recognize self-commitment. 7, although the probability of disputes is very small, but be sure to retain such important information as chat records, mobile phone messages, etc., in case of disputes, it is convenient for seven PAWS to intervene in rapid processing.
View details
  • 1. As a third-party intermediary platform, Qichou protects the security of the transaction and the rights and interests of both buyers and sellers according to the transaction contract (commodity description, content agreed before the transaction); 2, non-platform online trading projects, any consequences have nothing to do with mutual site; No matter the seller for any reason to require offline transactions, please contact the management report.
View details

Related Article

make a comment
No comments available at the moment
Official customer service team

To solve your worries - 24 hours online professional service