npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@inbiz/graph

v1.0.0-beta.0

Published

![image](https://raw.githubusercontent.com/ljy15802316943/inbiz-graph/main/src/img/r.png)

Readme

组件使用tsdx框架开发的npm包。

image

安装依赖

npm install inbiz-graph --save

页面引入

import { InbizGraph } from 'inbiz-graph';
// 示例1 使用inwise的服务。
 <InbizGraph
    graphUrl={`http://172.16.2.39:1532/inwise/graph2.jsp`}
    params={{
      type: 'file',
      anchor: "'16847','17288','17294'",
      searchVal: "文档",
      showMarker: true,
       markerColor: 'red',
    }}
    showRightMenu={true}
    tooltipsRender={true}
      />
```bash
// 示例2 使用自定义逻辑。
 <InbizGraph 
    params={{
      showMarker: true,
      markerColor: 'red',
      }}
  GraphData={{
    "nodes": {
      "7766065713332071222": {
        "conceptId": -1298275357,
        "attributes": {
          "_id": "背景",
          "type": "baidu",
          "ref_count": 41
        },
        "title": "背景",
        "type": "entity"
      },
      "1328350470430427987": {
        "anchor": true,
        "conceptId": -1298275357,
        "attributes": {
          "_id": "蓝色背景",
          "type": "baidu",
          "ref_count": 4
        },
        "title": "蓝色背景",
        "type": "entity"
      }
    },
    "edges": {
      "3364276357013955879": {
        "from": "7766065713332071222",
        "attributes": {
          "rank": 6,
          "weight": 0.609552
        },
        "to": "1328350470430427987",
        "type": "相关"
      }
    },
  }}
  showRightMenu={true}
  tooltipsRender={true}
/>

参数描述

interface propsType {
  //不重要的控制
  className?: string;//控制图谱样式
  loading?: boolean;//控制加载
  visible?: boolean;//手动控制暂无数据(visible)
  checkedClick?: boolean;//手动控制暂边属性显现
  checked?: boolean;//手动控制暂边属性状态
  noData?: boolean;//手动控制组件是否显现
  //比较重要
  width?: number;//图谱宽度
  height?: number;//图谱高度
  lineDistance?: number;//线的距离
  nodeSizeTopic?: number;//主题圆半径
  nodeSize?: number;//节点半径
  children?: any;//传入自定义元素。
  showRightMenu?: boolean;//显示右侧菜单
  noShowDimension?: boolean;//控制图谱显示维度是否显现
  tooltipsRender?: boolean;//控制图谱操作幕布是否显现
  GraphData?: {
    noce: boolean; //第一次不加载
    nodes: any; //节点数据
    edges: any; //线的数据
    forceData: any; //自定义力的作用
  };
  optEvent?: {
    dimension?: Function;//菜单点击维度
    hierarchyClick?: Function;//菜单点击层级
    checkedClick?: any;//菜单点击边属性

    loadMore?: Function;//双击元素加载更多
    openFile?: Function;//弹窗打开文件
    searchDoc?: Function;//弹窗搜索文档
    setCore?: Function;//弹窗设为中心
    openMoreNode?: Function;//弹窗展开更多节点
  }
  color?: any;//节点颜色
  //重要
  graphUrl: string;//图谱请求url。
  EDOC2_URL?: string;//跳转ecm预览文件地址。
  params?: {
    type?: string;//查询类型******
    searchVal?: any;//文件名称*****
    anchor?: string | number;//关键字 | 文件id。******
    //按需求修改
    checked?: boolean; //节点关系
    markerColor?: string; //箭头颜色
    showMarker?: boolean; //是否显示箭头
    onDeleteRelNode?: Function; //节点关系删除回调
    onNodeClick?: Function; //点击节点回调
    onLineClick?: Function; //点击线
  };
};