Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor/improve standards #13

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open

Conversation

Kuncheria-KV
Copy link

  • Change a prop name to make the component more generic
  • Fix type definitions, that were not exported in the final build

STYLE_GUIDELINES.md Outdated Show resolved Hide resolved
…er states, refactored waterfallchart component, util and hook files, fixed an issue where component was getting stuck when value 0 is passed for yAxisPixelsPerUnit
package.json Outdated
@@ -1,6 +1,6 @@
{
"name": "@keyvaluesystems/react-waterfall-chart",
"version": "0.1.5",
"version": "1.0.0",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to change the version manually. There is an option to do it during deployment.Please revert these changes

/>

```



The transactions prop is an array of transactions with the following keys:
The dataPoints prop is an array of dataPoint with the following keys:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this prop renaming is a breaking change, it would be better to specify it in the readme along with the migration steps. For more info refer other repos that has similar changes

README.md Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
src/tests/waterfallChart.test.tsx Show resolved Hide resolved
src/waterfall-chart/WaterFallChart.tsx Show resolved Hide resolved
@@ -69,7 +68,6 @@ export function getIntervalAndYPoints(
}

export function checkIfScaleSufficient(scale: number, maxLabelsCount: number, valueRange: number): boolean {
if (maxLabelsCount === 0) return true; // to stop the while loop from checking for sufficient scale with zero maxLabelsCount
Copy link

@ReshmaJoshy ReshmaJoshy Jan 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the line since it is unreachable code; the case where maxLabelsCount = 0 is already addressed earlier in the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants