Socket
Socket
Sign inDemoInstall

@antv/g2

Package Overview
Dependencies
Maintainers
4
Versions
373
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@antv/g2 - npm Package Compare versions

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

.npmignore

2

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

@@ -5,0 +5,0 @@ "main": "build/g2.js",

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

const Default = {
version: '3.0.0-rc5.5',
version: '3.0.0-rc5.6',
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: { // 宽度所占的分类的比例

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

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

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

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

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

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

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

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

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

@@ -62,0 +65,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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc