New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@antv/scale

Package Overview
Dependencies
Maintainers
57
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@antv/scale - npm Package Compare versions

Comparing version 0.3.15 to 0.3.16

6

CHANGELOG.md

@@ -0,1 +1,7 @@

#### 0.3.16 (2022-03-25)
#### Bug Fixes
- **ticks:** 修复 time, time-pretty 下, 大数据量 ticks 导致的 crash 问题
#### 0.3.15 (2022-03-15)

@@ -2,0 +8,0 @@

1

esm/tick-method/time-pretty.js

@@ -47,2 +47,3 @@ import { DAY, HOUR, MINUTE, MONTH, SECOND, YEAR } from '../util/time';

}
tickInterval = Math.max(Math.floor((max - min) / (Math.pow(2, 12) - 1)), tickInterval);
var minYear = getYear(min);

@@ -49,0 +50,0 @@ // 如果间距大于 1 年,则将开始日期从整年开始

@@ -22,2 +22,3 @@ import { getTickInterval } from '../util/time';

}
tickInterval = Math.max(Math.floor((max - min) / (Math.pow(2, 12) - 1)), tickInterval);
var ticks = [];

@@ -24,0 +25,0 @@ for (var i = min; i < max + tickInterval; i += tickInterval) {

6

esm/util/interval.js

@@ -24,5 +24,5 @@ import { fixedBase } from '@antv/util';

// https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Errors/Invalid_array_length
var avaliableInterval = Math.max((maxTick - minTick) / (Math.pow(2, 12) - 1), interval);
for (var i = minTick; i <= maxTick; i = i + avaliableInterval) {
var tickValue = fixedBase(i, avaliableInterval); // 防止浮点数加法出现问题
var availableInterval = Math.max((maxTick - minTick) / (Math.pow(2, 12) - 1), interval);
for (var i = minTick; i <= maxTick; i = i + availableInterval) {
var tickValue = fixedBase(i, availableInterval); // 防止浮点数加法出现问题
ticks.push(tickValue);

@@ -29,0 +29,0 @@ }

@@ -49,2 +49,3 @@ "use strict";

}
tickInterval = Math.max(Math.floor((max - min) / (Math.pow(2, 12) - 1)), tickInterval);
var minYear = getYear(min);

@@ -51,0 +52,0 @@ // 如果间距大于 1 年,则将开始日期从整年开始

@@ -24,2 +24,3 @@ "use strict";

}
tickInterval = Math.max(Math.floor((max - min) / (Math.pow(2, 12) - 1)), tickInterval);
var ticks = [];

@@ -26,0 +27,0 @@ for (var i = min; i < max + tickInterval; i += tickInterval) {

@@ -26,5 +26,5 @@ "use strict";

// https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Errors/Invalid_array_length
var avaliableInterval = Math.max((maxTick - minTick) / (Math.pow(2, 12) - 1), interval);
for (var i = minTick; i <= maxTick; i = i + avaliableInterval) {
var tickValue = util_1.fixedBase(i, avaliableInterval); // 防止浮点数加法出现问题
var availableInterval = Math.max((maxTick - minTick) / (Math.pow(2, 12) - 1), interval);
for (var i = minTick; i <= maxTick; i = i + availableInterval) {
var tickValue = util_1.fixedBase(i, availableInterval); // 防止浮点数加法出现问题
ticks.push(tickValue);

@@ -31,0 +31,0 @@ }

{
"name": "@antv/scale",
"version": "0.3.15",
"version": "0.3.16",
"description": "The scale module for G2",

@@ -5,0 +5,0 @@ "author": "https://github.com/orgs/antvis/people",

@@ -57,2 +57,3 @@ import { ScaleConfig } from '../types';

}
tickInterval = Math.max(Math.floor((max - min) / (2 ** 12 - 1)), tickInterval);
const minYear = getYear(min);

@@ -59,0 +60,0 @@ // 如果间距大于 1 年,则将开始日期从整年开始

@@ -23,2 +23,4 @@ import { ScaleConfig } from '../types';

}
tickInterval = Math.max(Math.floor((max - min) / (2 ** 12 - 1)), tickInterval);
const ticks = [];

@@ -25,0 +27,0 @@ for (let i = min; i < max + tickInterval; i += tickInterval) {

@@ -25,5 +25,5 @@

// https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Errors/Invalid_array_length
const avaliableInterval = Math.max((maxTick - minTick) / (2 ** 12 - 1), interval);
for (let i = minTick; i <= maxTick; i = i + avaliableInterval) {
const tickValue = fixedBase(i, avaliableInterval); // 防止浮点数加法出现问题
const availableInterval = Math.max((maxTick - minTick) / (2 ** 12 - 1), interval);
for (let i = minTick; i <= maxTick; i = i + availableInterval) {
const tickValue = fixedBase(i, availableInterval); // 防止浮点数加法出现问题
ticks.push(tickValue);

@@ -30,0 +30,0 @@ }

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc