New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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.1 to 1.0.0-alpha.7

11

CHANGELOG.md

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

# [1.0.0-alpha.7](https://github.com/reactivemarkets/react-financial-charts/compare/v1.0.0-alpha.6...v1.0.0-alpha.7) (2020-07-26)
### Bug Fixes
* updating prop types ([425b0b4](https://github.com/reactivemarkets/react-financial-charts/commit/425b0b459de229770e7608aff4f397b9bb00de5e))
# [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)

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

7

lib/discontinuousTimeScaleProvider.js

@@ -5,3 +5,3 @@ import { identity, isNotDefined, slidingWindow, zipper } from "@react-financial-charts/core";

import { defaultFormatters, levelDefinition } from "./levels";
function evaluateLevel(d, date, i, formatters) {
const evaluateLevel = (d, date, i, formatters) => {
return levelDefinition

@@ -15,4 +15,4 @@ .map((eachLevel, idx) => {

})
.find((l) => !!l.format);
}
.find((level) => !!level.format);
};
const discontinuousIndexCalculator = slidingWindow()

@@ -115,3 +115,2 @@ .windowSize(2)

const inputIndex = index;
// @ts-ignore
const xScale = financeDiscontinuousScale(inputIndex);

@@ -118,0 +117,0 @@ const mergedData = zipper().combine(indexMutator);

@@ -1,2 +0,2 @@

export default function financeDiscontinuousScale(index: any, futureProvider: any, backingLinearScale?: import("d3-scale").ScaleLinear<number, number>): {
export default function financeDiscontinuousScale(index: any, backingLinearScale?: import("d3-scale").ScaleLinear<number, number>): {
(x: any): number;

@@ -3,0 +3,0 @@ invert(x: any): number;

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

const MAX_LEVEL = levelDefinition.length - 1;
export default function financeDiscontinuousScale(index, futureProvider, backingLinearScale = scaleLinear()) {
export default function financeDiscontinuousScale(index, backingLinearScale = scaleLinear()) {
if (isNotDefined(index)) {

@@ -121,3 +121,3 @@ throw new Error("Use the discontinuousTimeScaleProvider to create financeDiscontinuousScale");

scale.copy = function () {
return financeDiscontinuousScale(index, futureProvider, backingLinearScale.copy());
return financeDiscontinuousScale(index, backingLinearScale.copy());
};

@@ -124,0 +124,0 @@ return scale;

export { default as discontinuousTimeScaleProvider, discontinuousTimeScaleProviderBuilder, } from "./discontinuousTimeScaleProvider";
export { default as financeDiscontinuousScale } from "./financeDiscontinuousScale";
export declare function defaultScaleProvider(xScale: any): (data: any, xAccessor: any) => {
export declare const defaultScaleProvider: (xScale: any) => (data: any, xAccessor: any) => {
data: any;

@@ -5,0 +5,0 @@ xScale: any;

export { default as discontinuousTimeScaleProvider, discontinuousTimeScaleProviderBuilder, } from "./discontinuousTimeScaleProvider";
export { default as financeDiscontinuousScale } from "./financeDiscontinuousScale";
export function defaultScaleProvider(xScale) {
export const defaultScaleProvider = (xScale) => {
return (data, xAccessor) => ({ data, xScale, xAccessor, displayXAccessor: xAccessor });
}
};
//# sourceMappingURL=index.js.map

@@ -10,3 +10,3 @@ export const defaultFormatters = {

secondFormat: "%H:%M:%S",
milliSecondFormat: "%L",
milliSecondFormat: "%H:%M:%S.%L",
};

@@ -13,0 +13,0 @@ export const levelDefinition = [

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

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

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

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

},
"gitHead": "b9b1295b8eca8b4f2ceb4c7be53554b4badd4a6b"
"gitHead": "71acd57b6a52ae3fd2376fc19153d2a4f78079c3"
}
import { identity, isNotDefined, slidingWindow, zipper } from "@react-financial-charts/core";
import { timeFormat, timeFormatDefaultLocale } from "d3-time-format";
import financeDiscontinuousScale from "./financeDiscontinuousScale";
import { defaultFormatters, levelDefinition } from "./levels";
function evaluateLevel(d, date, i, formatters) {
const evaluateLevel = (d, date, i, formatters) => {
return levelDefinition

@@ -17,4 +16,4 @@ .map((eachLevel, idx) => {

})
.find((l) => !!l.format);
}
.find((level) => !!level.format);
};

@@ -139,3 +138,2 @@ const discontinuousIndexCalculator = slidingWindow()

// @ts-ignore
const xScale = financeDiscontinuousScale(inputIndex);

@@ -142,0 +140,0 @@

@@ -9,3 +9,3 @@ import { head, isDefined, isNotDefined, last } from "@react-financial-charts/core";

export default function financeDiscontinuousScale(index, futureProvider, backingLinearScale = scaleLinear()) {
export default function financeDiscontinuousScale(index, backingLinearScale = scaleLinear()) {
if (isNotDefined(index)) {

@@ -141,5 +141,5 @@ throw new Error("Use the discontinuousTimeScaleProvider to create financeDiscontinuousScale");

scale.copy = function () {
return financeDiscontinuousScale(index, futureProvider, backingLinearScale.copy());
return financeDiscontinuousScale(index, backingLinearScale.copy());
};
return scale;
}

@@ -7,4 +7,4 @@ export {

export function defaultScaleProvider(xScale) {
export const defaultScaleProvider = (xScale) => {
return (data, xAccessor) => ({ data, xScale, xAccessor, displayXAccessor: xAccessor });
}
};

@@ -10,3 +10,3 @@ export const defaultFormatters = {

secondFormat: "%H:%M:%S",
milliSecondFormat: "%L",
milliSecondFormat: "%H:%M:%S.%L",
};

@@ -13,0 +13,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