@antv/adjust
- Version 0.2.5
- Published
- 132 kB
- 2 dependencies
- MIT license
Install
npm i @antv/adjustyarn add @antv/adjustpnpm add @antv/adjustOverview
The adjust module for G2, F2.
Index
Functions
Classes
Interfaces
Functions
function getAdjust
getAdjust: (type: string) => AdjustConstructor;根据类型获取 Adjust 类
Parameter type
function registerAdjust
registerAdjust: (type: string, ctor: AdjustConstructor) => void;注册自定义 Adjust
Parameter type
Parameter ctor
Classes
class Adjust
abstract class Adjust {}constructor
constructor(cfg: AdjustCfg & { dimValuesMap?: DimValuesMapType });property adjustNames
adjustNames: string[];参与调整的维度
property columnWidthRatio
columnWidthRatio: number;宽度比例
property customOffset
customOffset: number | ((data: any, range: any) => number);自定义 offset
property defaultSize
defaultSize: number;用户配置宽度
property dimValuesMap
dimValuesMap: DimValuesMapType;用户自定义的dimValuesMap
property dodgeBy
dodgeBy: string;指定进行 dodge 的字段
property dodgePadding
dodgePadding: number;像素级组内间距
property dodgeRatio
dodgeRatio: number;调整占单位宽度的比例,例如:占 2 个分类间距的 1 / 2
property groupNum
groupNum: number;分组数
property height
height: number;property intervalPadding
intervalPadding: number;像素级组间距
property marginRatio
marginRatio: number;调整过程中 2 个数据的间距,以 dodgeRatio 为分母
property maxColumnWidth
maxColumnWidth: number;最大宽度约束
property minColumnWidth
minColumnWidth: number;最小宽度约束
property reverseOrder
reverseOrder: boolean;property size
size: number;property xDimensionLegenth
xDimensionLegenth: number;x维度长度,计算归一化padding使用
property xField
xField: string;x 维度对应的字段
property yField
yField: string;y 维度对应的字段
method adjustData
protected adjustData: (groupedDataArray: Data[][], mergedData: Data[]) => void;method adjustDim
protected adjustDim: ( dim: string, values: number[], data: Data[], index?: number) => void;Modifiers
@override
method getAdjustRange
protected getAdjustRange: ( dim: string, dimValue: number, values: number[]) => Range;method groupData
protected groupData: (data: Data[], dim: string) => { [dim: string]: Data[] };对数据进行分组adjustData
Parameter data
数据
Parameter dim
分组的字段 分组结果
method isAdjust
isAdjust: (dim: string) => boolean;查看维度是否是 adjust 字段
Parameter dim
method process
abstract process: (dataArray: Data[][]) => Data[][];Interfaces
interface AdjustCfg
interface AdjustCfg {}property adjustNames
readonly adjustNames?: string[];property dodgeBy
readonly dodgeBy?: string;property dodgeRatio
readonly dodgeRatio?: number;property height
readonly height?: number;property marginRatio
readonly marginRatio?: number;property reverseOrder
readonly reverseOrder?: boolean;property size
readonly size?: number;property xField
readonly xField?: string;property yField
readonly yField?: string;interface Data
interface Data {}index signature
[key: string]: any;interface DodgeCfg
interface DodgeCfg {}property adjustNames
readonly adjustNames?: string[];property columnWidthRatio
readonly columnWidthRatio?: number;property customOffset
readonly customOffset?: ((data: any, range: any) => number) | number;property defaultSize
readonly defaultSize?: number;property dodgeBy
readonly dodgeBy?: string;property dodgePadding
readonly dodgePadding?: number;property dodgeRatio
readonly dodgeRatio?: number;property groupNum
readonly groupNum?: number;property intervalPadding
readonly intervalPadding?: number;property marginRatio
readonly marginRatio?: number;property maxColumnWidth
readonly maxColumnWidth?: number;property minColumnWidth
readonly minColumnWidth?: number;property xDimensionLength
readonly xDimensionLength?: number;property xField
readonly xField: string;property yField
readonly yField?: string;interface StackCfg
interface StackCfg {}property adjustNames
readonly adjustNames?: string[];property height
readonly height?: number;property reverseOrder
readonly reverseOrder?: boolean;property size
readonly size?: number;property xField
readonly xField: string;property yField
readonly yField?: string;Package Files (4)
Dependencies (2)
Dev Dependencies (15)
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/adjust.
- Markdown[](https://www.jsdocs.io/package/@antv/adjust)
- HTML<a href="https://www.jsdocs.io/package/@antv/adjust"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 3189 ms. - Missing or incorrect documentation? Open an issue for this package.
