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

propagate className option to legends #1441

Merged
merged 1 commit into from
Apr 14, 2023
Merged

propagate className option to legends #1441

merged 1 commit into from
Apr 14, 2023

Conversation

mbostock
Copy link
Member

This is needed for deterministic server-side rendering of legends.

@mbostock mbostock requested a review from Fil April 13, 2023 00:16
@@ -141,7 +141,7 @@ export function plot(options = {}) {
const {fx, fy} = scales;
const subdimensions = fx || fy ? innerDimensions(scaleDescriptors, dimensions) : dimensions;
const superdimensions = fx || fy ? actualDimensions(scales, dimensions) : dimensions;
const context = createContext(options, subdimensions, scaleDescriptors);
const context = createContext(options, subdimensions, className);
Copy link
Contributor

Choose a reason for hiding this comment

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

className replaces the spurious argument scaleDescriptors in the call to createContext—this was introduced by #1197, and was ignored in the function's signature.

@mbostock mbostock force-pushed the mbostock/legend-class branch 2 times, most recently from 2121ce6 to 7bc6df1 Compare April 14, 2023 04:12
@mbostock mbostock enabled auto-merge (squash) April 14, 2023 04:17
@mbostock mbostock merged commit 4af1703 into main Apr 14, 2023
@mbostock mbostock deleted the mbostock/legend-class branch April 14, 2023 04:19
chaichontat pushed a commit to chaichontat/plot that referenced this pull request Jan 14, 2024
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

2 participants