Skip to content

Commit

Permalink
[d3-chart] fixed types for children render function in tooltips (#924)
Browse files Browse the repository at this point in the history
<!--- Provide a general summary of your changes in the Title above -->

## Motivation and Context
#923 
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here. -->

## How has this been tested?

<!--- Please describe in detail how you tested your changes. -->
<!--- For example: -->
<!--- I have added unit tests -->
<!--- I have added Voice Over tests -->
<!--- Code cannot be tested automatically so I have tested it only
manually -->

## Screenshots (if appropriate):

## Types of changes

<!--- What types of changes does your code introduce? Put an `x` in all
the boxes that apply: -->

- [X] Bug fix (non-breaking change which fixes an issue).
- [ ] New feature (non-breaking change which adds functionality).
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as expected).
- [ ] Nice improve.

## Checklist:

<!--- Go over all the following points, and put an `x` in all the boxes
that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->

- [X] My code follows the code style of this project.
- [X] I have updated the documentation accordingly or it's not required.
- [X] Unit tests are not broken.
- [X] I have added changelog note to corresponding `CHANGELOG.md` file
with planned publish date.
- [ ] I have added new unit tests on added of fixed functionality.
  • Loading branch information
ilyabrower committed Nov 24, 2023
1 parent 03e861b commit 1ee2f73
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions semcore/d3-chart/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).

## [3.19.5] - 2023-11-24

### Fixed

- Correct types for `Tooltip`s children render function.

## [3.18.4] - 2023-11-21

### Changed
Expand Down
4 changes: 2 additions & 2 deletions semcore/d3-chart/src/types/Hover.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ type HoverTooltip = (<X, Y>(
y?: Y;
children: (props: {
/** Index in `data` array of the current item */
xIndex: X extends string ? string : never;
xIndex: X extends string ? number : never;
/** Index in `data` array of the current item */
yIndex: Y extends string ? string : never;
yIndex: Y extends string ? number : never;
}) => { children: ReturnEl };
} & Omit<BoxProps, 'children'>,
) => ReturnEl) &
Expand Down

0 comments on commit 1ee2f73

Please sign in to comment.