Socket
Socket
Sign inDemoInstall

@antv/g2

Package Overview
Dependencies
5
Maintainers
4
Versions
366
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.0.0-rc5.6 to 3.0.0-rc5.7

.idea/deployment.xml

4

package.json
{
"name": "@antv/g2",
"version": "3.0.0-rc5.6",
"version": "3.0.0-rc5.7",
"description": "the Grammar of Graphics in Javascript",

@@ -51,3 +51,3 @@ "main": "build/g2.js",

"ci": "tnpm run lint && tnpm run test",
"compress": "uglifyjs -c -m -o dist/g2-$npm_package_version.min.js -- build/g2.js",
"compress": "uglifyjs -c -m -o dist/g2.min.js -- build/g2.js",
"coverage": "npm run coverage-generator && npm run coverage-viewer",

@@ -54,0 +54,0 @@ "coverage-viewer": "torch-coverage",

@@ -20,4 +20,6 @@ /**

if ((Util.isArray(yValue) && Util.isNil(yValue[0])) || Util.isNil(yValue)) {
arr.push(tmp);
tmp = [];
if (tmp.length) {
arr.push(tmp);
tmp = [];
}
} else {

@@ -27,6 +29,7 @@ tmp.push(obj);

});
arr.push(tmp);
if (tmp.length) {
arr.push(tmp);
}
return arr;
}
};

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

const Default = {
version: '3.0.0-rc5.6',
version: '3.0.0-rc5.5',
trackable: true,
animate: true,
snapArray: [ 0, 1, 2, 4, 5, 10 ],
// 指定固定 tick 数的逼近值
snapCountArray: [ 0, 1, 1.2, 1.5, 1.6, 2, 2.2, 2.4, 3, 4, 5, 6, 7.5, 8, 10 ],
widthRatio: { // 宽度所占的分类的比例

@@ -18,0 +15,0 @@ column: 1 / 2, // 一般的柱状图占比 1/2

@@ -10,5 +10,3 @@ /**

const MAX_COUNT = 7;
const Global = require('../../global');
const INTERVAL_ARRAY = Global.snapArray;
const INTERVAL_ARRAY_COUNT = Global.snapCountArray; // 指定了坐标个数的逼近数组
const INTERVAL_ARRAY = [ 0, 1, 2, 4, 5, 10 ];

@@ -24,3 +22,2 @@ module.exports = function(info) {

let count;
const snapArray = info.minCount ? INTERVAL_ARRAY_COUNT : INTERVAL_ARRAY;

@@ -51,3 +48,3 @@ if (Util.isNil(min)) {

const temp = (max - min) / (avgCount - 1);
interval = AutoUtil.snapFactorTo(temp, snapArray, 'ceil');
interval = AutoUtil.snapFactorTo(temp, INTERVAL_ARRAY, 'ceil');
if (maxCount !== minCount) {

@@ -62,3 +59,3 @@ count = parseInt((max - min) / interval, 10);

// 不确定tick的个数时,使得tick偏小
interval = AutoUtil.snapFactorTo((max - min) / (count - 1), snapArray, 'floor');
interval = AutoUtil.snapFactorTo((max - min) / (count - 1), INTERVAL_ARRAY, 'floor');
} else {

@@ -65,0 +62,0 @@ count = avgCount;

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc