-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[charts] Add a ChartsGrid
component
#11034
Conversation
b462498
to
f78deef
Compare
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
const xTicks = useTicks({ scale: xScale, tickNumber: xTickNumber, tickInterval: xTickInterval }); | ||
const yTicks = useTicks({ scale: yScale, tickNumber: yTickNumber, tickInterval: yTickInterval }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm relying on the fact that the grid use the same parametters and the same hook as axies ticks to get the alignement.
I though about doing the computation once and let axes and grid rely on it. But the benefit is not clear whereas the effort is important. So I decided to go that way, assuming it will be enough for at least a year, and if needed we will be able to review this process in the next major, the time to accumulate feedback
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very welcome and nice addition to the Charts customization! 💯
Great job. 👏
Leaving some API questions/considerations.
In addition to that, a couple of extra points:
- Have you considered the option/need to have conditional grid color styling?
Wouldn't it be problem adding it in given the current API? - Should we add the support for
themeAugmentation
? 🤔
About extra points
I don't see issues with the current API. The easies might be to put this color in the axis config, and add option to say if it applies to the tick label, the tick, the grid line
I always forget this aspect 🙃 |
Co-authored-by: Lukas <[email protected]> Signed-off-by: Alexandre Fauquette <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! 👏
IMHO, we can/should keep the themeAugmentation for a separate PR.
It's somewhat of a different topic than this PR, especially for other entries. 🙈
WDYT?
packages/x-charts/src/themeAugmentation/themeAugmentation.spec.ts
Outdated
Show resolved
Hide resolved
packages/x-charts/src/themeAugmentation/themeAugmentation.spec.ts
Outdated
Show resolved
Hide resolved
packages/x-charts/src/themeAugmentation/themeAugmentation.spec.ts
Outdated
Show resolved
Hide resolved
packages/x-charts/src/themeAugmentation/themeAugmentation.spec.ts
Outdated
Show resolved
Hide resolved
packages/x-charts/src/themeAugmentation/themeAugmentation.spec.ts
Outdated
Show resolved
Hide resolved
packages/x-charts/src/themeAugmentation/themeAugmentation.spec.ts
Outdated
Show resolved
Hide resolved
packages/x-charts/src/themeAugmentation/themeAugmentation.spec.ts
Outdated
Show resolved
Hide resolved
packages/x-charts/src/themeAugmentation/themeAugmentation.spec.ts
Outdated
Show resolved
Hide resolved
packages/x-charts/src/themeAugmentation/themeAugmentation.spec.ts
Outdated
Show resolved
Hide resolved
packages/x-charts/src/themeAugmentation/themeAugmentation.spec.ts
Outdated
Show resolved
Hide resolved
5e1ec89
to
8da8ea1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀 💯
ChartsGrid
component
Signed-off-by: Alexandre Fauquette <[email protected]> Co-authored-by: Lukas <[email protected]>
Fix #10158
For documentation, I went with a page per chart linking to a longer explanation in the axis page.
Demos
Changelog