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

feat: react-charting legends onchange and defaultSelectedLegends #29799

Conversation

NewFuture
Copy link
Member

@NewFuture NewFuture commented Nov 9, 2023

add new props into the Legends.

  • onChange: Callback issued when the selected option changes.
  • defaultSelectedLegends: Keys that will be initially used to set selected items.
  • defaultSelectedLegend: Key for single selection.

changes:

  • update the selected state whether the action of the item is set or not.

Related Issue(s)

#29651

@NewFuture NewFuture force-pushed the user/newfuture/features/react-cahrting-legends-onchange branch from a369c09 to acca1b1 Compare November 9, 2023 08:45
@NewFuture NewFuture changed the title User/newfuture/features/react cahrting legends onchange react charting legends onchange and defaultSelectedLegends Nov 9, 2023
Copy link

codesandbox-ci bot commented Nov 9, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 88312f9:

Sandbox Source
@fluentui/react 8 starter Configuration
@fluentui/react-components 9 starter Configuration

@AtishayMsft
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 4 pipeline(s).

@fabricteam
Copy link
Collaborator

fabricteam commented Nov 9, 2023

📊 Bundle size report

🤖 This report was generated against 69fef129d9fba9bab5824281dd5c2f4fac1291ee

@fabricteam
Copy link
Collaborator

fabricteam commented Nov 9, 2023

🕵 fluentuiv8 No visual regressions between this PR and main

Copy link

size-auditor bot commented Nov 9, 2023

Asset size changes

Size Auditor did not detect a change in bundle size for any component!

Baseline commit: ee8ca9b273641f6fe348338086a7aa29424fbbfb (build)

@NewFuture NewFuture changed the title react charting legends onchange and defaultSelectedLegends feat: react-charting legends onchange and defaultSelectedLegends Nov 9, 2023
@AtishayMsft
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 4 pipeline(s).

@AtishayMsft
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 4 pipeline(s).

@AtishayMsft
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 4 pipeline(s).

@NewFuture NewFuture marked this pull request as ready for review November 14, 2023 08:44
@NewFuture NewFuture requested a review from a team as a code owner November 14, 2023 08:44
@AtishayMsft
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 4 pipeline(s).

@AtishayMsft
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 4 pipeline(s).

@AtishayMsft AtishayMsft merged commit 0b5c2f7 into microsoft:master Nov 14, 2023
@AtishayMsft
Copy link
Contributor

Thanks for the contribution @NewFuture. This PR is merged now.

/**
* Callback issued when the selected option changes.
*/
onChange?: (selectedLegends: string[], event: React.MouseEvent<HTMLButtonElement>, currentLegend?: ILegend) => void;
Copy link
Contributor

Choose a reason for hiding this comment

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

Can be renamed to something like onLegendSelectionChange for better clarity

Copy link
Member Author

Choose a reason for hiding this comment

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

onChange is a common naming for input controllers.

@NewFuture NewFuture deleted the user/newfuture/features/react-cahrting-legends-onchange branch November 15, 2023 05:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants