Socket
Socket
Sign inDemoInstall

@antv/adjust

Package Overview
Dependencies
3
Maintainers
15
Versions
19
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.2.1-beta.1 to 0.2.1-beta.2

13

esm/adjusts/adjust.d.ts

@@ -10,5 +10,14 @@ import { AdjustCfg, Data, Range } from '../interface';

/** x 维度对应的字段 */
readonly xField: string;
xField: string;
/** y 维度对应的字段 */
readonly yField: string;
yField: string;
/** 调整占单位宽度的比例,例如:占 2 个分类间距的 1 / 2 */
dodgeRatio: number;
/** 调整过程中 2 个数据的间距,以 dodgeRatio 为分母 */
marginRatio: number;
/** 指定进行 dodge 的字段 */
dodgeBy: string;
height: number;
size: number;
reverseOrder: boolean;
constructor(cfg: AdjustCfg);

@@ -15,0 +24,0 @@ abstract process(dataArray: Data[][]): Data[][];

6

esm/adjusts/dodge.d.ts
import { Data, DodgeCfg } from '../interface';
import Adjust from './adjust';
export default class Dodge extends Adjust {
/** 调整占单位宽度的比例,例如:占 2 个分类间距的 1 / 2 */
readonly dodgeRatio: number;
/** 调整过程中 2 个数据的间距,以 dodgeRatio 为分母 */
readonly marginRatio: number;
/** 指定进行 dodge 的字段 */
readonly dodgeBy: string;
private cacheMap;

@@ -11,0 +5,0 @@ private adjustDataArray;

@@ -12,5 +12,6 @@ import { __extends } from "tslib";

_this.mergeData = [];
var _a = cfg.marginRatio, marginRatio = _a === void 0 ? MARGIN_RATIO : _a, _b = cfg.dodgeRatio, dodgeRatio = _b === void 0 ? DODGE_RATIO : _b;
var _a = cfg.marginRatio, marginRatio = _a === void 0 ? MARGIN_RATIO : _a, _b = cfg.dodgeRatio, dodgeRatio = _b === void 0 ? DODGE_RATIO : _b, dodgeBy = cfg.dodgeBy;
_this.marginRatio = marginRatio;
_this.dodgeRatio = dodgeRatio;
_this.dodgeBy = dodgeBy;
return _this;

@@ -17,0 +18,0 @@ }

import { Data, StackCfg } from '../interface';
import Adjust from './adjust';
export default class Stack extends Adjust {
readonly height: number;
readonly size: number;
readonly reverseOrder: boolean;
constructor(cfg: StackCfg);

@@ -8,0 +5,0 @@ /**

@@ -10,5 +10,14 @@ import { AdjustCfg, Data, Range } from '../interface';

/** x 维度对应的字段 */
readonly xField: string;
xField: string;
/** y 维度对应的字段 */
readonly yField: string;
yField: string;
/** 调整占单位宽度的比例,例如:占 2 个分类间距的 1 / 2 */
dodgeRatio: number;
/** 调整过程中 2 个数据的间距,以 dodgeRatio 为分母 */
marginRatio: number;
/** 指定进行 dodge 的字段 */
dodgeBy: string;
height: number;
size: number;
reverseOrder: boolean;
constructor(cfg: AdjustCfg);

@@ -15,0 +24,0 @@ abstract process(dataArray: Data[][]): Data[][];

import { Data, DodgeCfg } from '../interface';
import Adjust from './adjust';
export default class Dodge extends Adjust {
/** 调整占单位宽度的比例,例如:占 2 个分类间距的 1 / 2 */
readonly dodgeRatio: number;
/** 调整过程中 2 个数据的间距,以 dodgeRatio 为分母 */
readonly marginRatio: number;
/** 指定进行 dodge 的字段 */
readonly dodgeBy: string;
private cacheMap;

@@ -11,0 +5,0 @@ private adjustDataArray;

@@ -14,5 +14,6 @@ "use strict";

_this.mergeData = [];
var _a = cfg.marginRatio, marginRatio = _a === void 0 ? constant_1.MARGIN_RATIO : _a, _b = cfg.dodgeRatio, dodgeRatio = _b === void 0 ? constant_1.DODGE_RATIO : _b;
var _a = cfg.marginRatio, marginRatio = _a === void 0 ? constant_1.MARGIN_RATIO : _a, _b = cfg.dodgeRatio, dodgeRatio = _b === void 0 ? constant_1.DODGE_RATIO : _b, dodgeBy = cfg.dodgeBy;
_this.marginRatio = marginRatio;
_this.dodgeRatio = dodgeRatio;
_this.dodgeBy = dodgeBy;
return _this;

@@ -19,0 +20,0 @@ }

import { Data, StackCfg } from '../interface';
import Adjust from './adjust';
export default class Stack extends Adjust {
readonly height: number;
readonly size: number;
readonly reverseOrder: boolean;
constructor(cfg: StackCfg);

@@ -8,0 +5,0 @@ /**

{
"name": "@antv/adjust",
"version": "0.2.1-beta.1",
"version": "0.2.1-beta.2",
"description": "The adjust module for G2, F2.",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc