@react-financial-charts/series
Advanced tools
Comparing version 1.0.1 to 1.1.0
@@ -6,2 +6,18 @@ # Change Log | ||
# [1.1.0](https://github.com/reactivemarkets/react-financial-charts/compare/v1.0.1...v1.1.0) (2021-02-26) | ||
### Bug Fixes | ||
* **series:** fixing volume profile series ([584dd26](https://github.com/reactivemarkets/react-financial-charts/commit/584dd26a074756685d13ac2085667491d3b30899)), closes [#418](https://github.com/reactivemarkets/react-financial-charts/issues/418) | ||
### Features | ||
* adding react 17 as peer dependency ([569209b](https://github.com/reactivemarkets/react-financial-charts/commit/569209b6eb00f3c93eae1b5a9e4f014c055c93c7)), closes [#468](https://github.com/reactivemarkets/react-financial-charts/issues/468) | ||
## [1.0.1](https://github.com/reactivemarkets/react-financial-charts/compare/v1.0.0...v1.0.1) (2021-01-01) | ||
@@ -8,0 +24,0 @@ |
@@ -29,3 +29,3 @@ import * as React from "react"; | ||
width: number; | ||
}) => "#6BA583" | "#FF0000"; | ||
}) => "rgba(38, 166, 154, 0.5)" | "rgba(239, 83, 80, 0.5)"; | ||
maxProfileWidthPercent: number; | ||
@@ -32,0 +32,0 @@ orient: string; |
@@ -59,4 +59,3 @@ import { ascending, descending, histogram as d3Histogram, max, merge, rollup, sum, zip } from "d3-array"; | ||
const { xScale: realXScale, chartConfig: { yScale }, plotData, } = moreProps; | ||
const { sessionStart, bySession, partialStartOK, partialEndOK } = props; | ||
const { bins, maxProfileWidthPercent, source, volume, absoluteChange, orient, fill, stroke } = props; | ||
const { sessionStart, bySession, partialStartOK, partialEndOK, bins, maxProfileWidthPercent, source, volume, absoluteChange, orient, fill, stroke, } = props; | ||
const sessionBuilder = accumulatingWindow() | ||
@@ -78,3 +77,3 @@ .discardTillStart(!partialStartOK) | ||
const sortFunction = orient === "right" ? descending : ascending; | ||
const sortedData = data.sort(sortFunction); | ||
const sortedData = data.sort((a, b) => sortFunction(a.direction, b.direction)); | ||
return rollup(sortedData, (leaves) => sum(leaves, (d) => d.volume), (d) => d.direction); | ||
@@ -99,3 +98,3 @@ }; | ||
const totalVolumes = volumeInBins.map((volumes) => { | ||
const totalVolume = sum(volumes, (d) => d.value); | ||
const totalVolume = sum(volumes, (d) => d[1]); | ||
const totalVolumeX = xScale(totalVolume); | ||
@@ -153,3 +152,3 @@ const widthLocal = base(xScale) - totalVolumeX; | ||
bySession: false, | ||
fill: ({ type }) => (type === "up" ? "#6BA583" : "#FF0000"), | ||
fill: ({ type }) => type === "up" ? "rgba(38, 166, 154, 0.5)" : "rgba(239, 83, 80, 0.5)", | ||
maxProfileWidthPercent: 50, | ||
@@ -156,0 +155,0 @@ orient: "left", |
{ | ||
"name": "@react-financial-charts/series", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"description": "Series for react-financial-charts", | ||
@@ -41,3 +41,3 @@ "publishConfig": { | ||
"dependencies": { | ||
"@react-financial-charts/core": "^1.0.1", | ||
"@react-financial-charts/core": "^1.1.0", | ||
"@types/d3-scale": "^3.2.2", | ||
@@ -49,6 +49,6 @@ "d3-array": "^2.9.1", | ||
"peerDependencies": { | ||
"react": "^16.0.0", | ||
"react-dom": "^16.0.0" | ||
"react": "^16.0.0 || ^17.0.0", | ||
"react-dom": "^16.0.0 || ^17.0.0" | ||
}, | ||
"gitHead": "b41ad206c6ce377ba655af3a3758c3f15655bc56" | ||
"gitHead": "a1a1b311172f8ad818040ccb99c8dc35dbf74212" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
305812
5798
+ Addedreact@17.0.2(transitive)
+ Addedreact-dom@17.0.2(transitive)
+ Addedscheduler@0.20.2(transitive)
- Removedreact@16.14.0(transitive)
- Removedreact-dom@16.14.0(transitive)
- Removedscheduler@0.19.1(transitive)