diff --git a/package.json b/package.json index 4c7c544..f624ea4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-wagmi-charts", - "version": "2.2.0", + "version": "2.3.0", "description": "A sweet candlestick chart for React Native", "main": "lib/commonjs/index.js", "module": "lib/module/index.js", @@ -45,6 +45,8 @@ "devDependencies": { "@commitlint/config-conventional": "^12.0.4", "@react-native-community/eslint-config": "^3.0.0", + "@types/d3-array": "^3.0.4", + "@types/d3-scale": "^4.0.3", "@types/jest": "^26.0.24", "@types/react": "^17.0.14", "@types/react-native": "^0.64.12", @@ -60,8 +62,8 @@ "react-native": "0.63.4", "react-native-builder-bob": "^0.18.1", "react-native-gesture-handler": "^2.1.0", - "react-native-svg": "^12.1.1", "react-native-reanimated": "~2.3.1", + "react-native-svg": "^12.1.1", "typescript": "^4.3.5" }, "peerDependencies": { diff --git a/src/charts/line/utils/getArea.ts b/src/charts/line/utils/getArea.ts index d3658e9..61d8ca6 100644 --- a/src/charts/line/utils/getArea.ts +++ b/src/charts/line/utils/getArea.ts @@ -31,7 +31,7 @@ export function getArea({ const area = shape .area() .x((_: unknown, i: number) => scaleX(i)) - .y0((d: { value: unknown }) => scaleY(d.value)) + .y0((d: { value: unknown }) => scaleY(d.value as number)) .y1(() => height) .curve(_shape)(data); return area; diff --git a/yarn.lock b/yarn.lock index 237398d..99c23a4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2165,6 +2165,23 @@ dependencies: "@babel/types" "^7.3.0" +"@types/d3-array@^3.0.4": + version "3.0.4" + resolved "https://registry.yarnpkg.com/@types/d3-array/-/d3-array-3.0.4.tgz#44eebe40be57476cad6a0cd6a85b0f57d54185a2" + integrity sha512-nwvEkG9vYOc0Ic7G7kwgviY4AQlTfYGIZ0fqB7CQHXGyYM6nO7kJh5EguSNA3jfh4rq7Sb7eMVq8isuvg2/miQ== + +"@types/d3-scale@^4.0.3": + version "4.0.3" + resolved "https://registry.yarnpkg.com/@types/d3-scale/-/d3-scale-4.0.3.tgz#7a5780e934e52b6f63ad9c24b105e33dd58102b5" + integrity sha512-PATBiMCpvHJSMtZAMEhc2WyL+hnzarKzI6wAHYjhsonjWJYGq5BXTzQjv4l8m2jO183/4wZ90rKvSeT7o72xNQ== + dependencies: + "@types/d3-time" "*" + +"@types/d3-time@*": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@types/d3-time/-/d3-time-3.0.0.tgz#e1ac0f3e9e195135361fa1a1d62f795d87e6e819" + integrity sha512-sZLCdHvBUcNby1cB6Fd3ZBrABbjz3v1Vm90nysCQ6Vt7vd6e/h9Lt7SiJUoEX0l4Dzc7P5llKyhqSi1ycSf1Hg== + "@types/graceful-fs@^4.1.2": version "4.1.5" resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.5.tgz#21ffba0d98da4350db64891f92a9e5db3cdb4e15"