Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@react-financial-charts/scales

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-financial-charts/scales - npm Package Compare versions

Comparing version 1.0.0-alpha.0 to 1.0.0-alpha.1

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

# [1.0.0-alpha.1](https://github.com/reactivemarkets/react-financial-charts/compare/v1.0.0-alpha.0...v1.0.0-alpha.1) (2020-07-10)
### Bug Fixes
* **core:** fixing issues with empty data sets ([23c2458](https://github.com/reactivemarkets/react-financial-charts/commit/23c2458bfe55e97eef96f80030fe32b9cf5ac1e1))
# [1.0.0-alpha.0](https://github.com/reactivemarkets/react-financial-charts/compare/v0.5.1...v1.0.0-alpha.0) (2020-07-08)

@@ -8,0 +19,0 @@

7

lib/financeDiscontinuousScale.js

@@ -49,7 +49,10 @@ import { head, isDefined, isNotDefined, last } from "@react-financial-charts/core";

scale.ticks = function (m) {
var _a, _b;
const backingTicks = backingLinearScale.ticks(m);
const ticksMap = new Map();
const [domainStart, domainEnd] = backingLinearScale.domain();
const start = Math.max(Math.ceil(domainStart), head(index).index) + Math.abs(head(index).index);
const end = Math.min(Math.floor(domainEnd), last(index).index) + Math.abs(head(index).index);
const dStart = Math.ceil(domainStart);
const dHead = (_a = head(index)) === null || _a === void 0 ? void 0 : _a.index;
const start = Math.max(dStart, dHead) + Math.abs(dHead);
const end = Math.min(Math.floor(domainEnd), (_b = last(index)) === null || _b === void 0 ? void 0 : _b.index) + Math.abs(dHead);
const desiredTickCount = Math.ceil(((end - start) / (domainEnd - domainStart)) * backingTicks.length);

@@ -56,0 +59,0 @@ for (let i = MAX_LEVEL; i >= 0; i--) {

{
"name": "@react-financial-charts/scales",
"version": "1.0.0-alpha.0",
"version": "1.0.0-alpha.1",
"description": "Scales for react-financial-charts",

@@ -41,3 +41,3 @@ "publishConfig": {

"dependencies": {
"@react-financial-charts/core": "^1.0.0-alpha.0",
"@react-financial-charts/core": "^1.0.0-alpha.1",
"d3-array": "2.4.0",

@@ -51,3 +51,3 @@ "d3-scale": "3.2.1",

},
"gitHead": "eae3db6fe5be832713f0ef96f01bba6b8ab9b7c6"
"gitHead": "b9b1295b8eca8b4f2ceb4c7be53554b4badd4a6b"
}

@@ -58,4 +58,6 @@ import { head, isDefined, isNotDefined, last } from "@react-financial-charts/core";

const start = Math.max(Math.ceil(domainStart), head(index).index) + Math.abs(head(index).index);
const end = Math.min(Math.floor(domainEnd), last(index).index) + Math.abs(head(index).index);
const dStart = Math.ceil(domainStart);
const dHead = head(index)?.index;
const start = Math.max(dStart, dHead) + Math.abs(dHead);
const end = Math.min(Math.floor(domainEnd), last(index)?.index) + Math.abs(dHead);

@@ -62,0 +64,0 @@ const desiredTickCount = Math.ceil(((end - start) / (domainEnd - domainStart)) * backingTicks.length);

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