@antv/data-set
- Version 0.11.8
- Published
- 5.23 MB
- 16 dependencies
- MIT license
Install
npm i @antv/data-set
yarn add @antv/data-set
pnpm add @antv/data-set
Overview
data set with state management
Index
Classes
class DataSet
class DataSet extends EventEmitter {}
数据集
Modifiers
@public
constructor
constructor(initialProps?: DataSetOptions);
Parameter initialProps
初始状态
property connectors
static connectors: Record<string, any>;
注册的 Connector(key-value 对)
property CONSTANTS
static CONSTANTS: { HIERARCHY: string; GEO: string; HEX: string; GRAPH: string; TABLE: string; GEO_GRATICULE: string; STATISTICS_METHODS: string[];};
常量,譬如 DataSet.CONSTANTS.HIERARCHY 是树形结构的名称
property DataSet
static DataSet: typeof DataSet;
property DataView
static DataView: typeof View;
property isDataSet
isDataSet: boolean;
否是 DataSet
property state
state: Record<string, any>;
存储数据集上的状态量(key-value 对)
property transforms
static transforms: Record<string, any>;
已注册的 Transform(key-value 对)
property version
static version: string;
property View
static View: typeof View;
property views
views: Record<string, View>;
所有挂在数据集上的数据视图(key-value 对)
method createView
createView: { (name: ViewOptions): View; (name?: string, options?: ViewOptions): View;};
创建并返回一个数据视图实例
Parameter name
数据视图名称
Parameter options
视图配置
method getConnector
static getConnector: (name: string) => Function;
method getTransform
static getTransform: (name?: string) => Function;
method getView
getView: (name: string) => View;
返回 name 对应的数据视图实例
Parameter name
name
method registerConnector
static registerConnector: ( name: string, connector: (data: any, options: any, view: View) => any) => void;
注册一个数据连接函数,注册后所有数据视图都可以使用 name 来引用这个数据连接函数,从而接入某种数据源。
Parameter name
类型
Parameter connector
解析逻辑
method registerTransform
static registerTransform: (name: string, transform: any) => void;
注册一个数据处理函数,注册后所有数据视图都可以使用 name 来引用这个数据处理函数,从而进行某种数据处理
Parameter name
transform 类型
Parameter transform
transform逻辑
method setState
setState: (name: string, value: any) => void;
设置状态量 name 的值为 value
Parameter name
状态名
Parameter value
值
method setView
setView: (name: string, view: View) => void;
设置 name 对应的数据视图实例为 dv
Parameter name
名称
Parameter view
data view
Namespaces
namespace @antv/hierarchy
module '@antv/hierarchy' {}
namespace d3-composite-projections
module 'd3-composite-projections' {}
namespace d3-geo-projection
module 'd3-geo-projection' {}
namespace d3-hexjson
module 'd3-hexjson' {}
namespace point-at-length
module 'point-at-length' {}
Package Files (3)
Dependencies (16)
Dev Dependencies (39)
- @antv/torch
- @types/chai
- @types/d3-dsv
- @types/d3-geo
- @types/d3-hierarchy
- @types/d3-sankey
- @types/d3-voronoi
- @types/dagre
- @types/lodash
- @types/regression
- @types/topojson-client
- @typescript-eslint/eslint-plugin
- @typescript-eslint/parser
- awesome-typescript-loader
- body-parser
- chai
- cheerio
- commander
- connect
- d3-queue
- debug
- eslint
- eslint-config-prettier
- eslint-plugin-prettier
- get-port
- jszip
- lodash
- nightmare
- nunjucks
- open
- parseurl
- pre-commit
- prettier
- serve-static
- shelljs
- string-replace-loader
- typescript
- webpack
- webpack-cli
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@antv/data-set
.
- Markdown[](https://www.jsdocs.io/package/@antv/data-set)
- HTML<a href="https://www.jsdocs.io/package/@antv/data-set"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 6192 ms. - Missing or incorrect documentation? Open an issue for this package.