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: [DI-21463] - Added capability to transform area chart into line chart #11136

Merged

Conversation

nikhagra-akamai
Copy link
Contributor

Description 📝

Added capability to transform area chart into line chart

Changes 🔄

List any change relevant to the reviewer.

  1. Added a 'hideFill' property to control the area opacity
  2. 'fillOpacity' option added so that opacity can also be dynamic.

Target release date 🗓️

28 October 2024

Preview 📷

Include a screenshot or screen recording of the change

💡 Use <video src="" /> tag when including recordings in table.

Area chart with full opacity in the area
Screenshot 2024-10-22 at 12 41 46 PM

Area chart with no opacity in area
Screenshot 2024-10-22 at 12 41 55 PM

Area chart with 30% opacity in area
Screenshot 2024-10-22 at 12 42 10 PM

How to test 🧪

  1. Add 'hideFill' property while using AreaChart component to make it a line chart
  2. Add 'fillOpacity' property to control the opacity of area

Note: Do not use hideFill property with fillOpacity otherwise it'll be no effect of fillOpacity value.

As an Author I have considered 🤔

Check all that apply

  • 👀 Doing a self review
  • ❔ Our contribution guidelines
  • 🤏 Splitting feature into small PRs
  • ➕ Adding a changeset
  • 🧪 Providing/Improving test coverage
  • 🔐 Removing all sensitive information from the code and PR description
  • 🚩 Using a feature flag to protect the release
  • 👣 Providing comprehensive reproduction steps
  • 📑 Providing or updating our documentation
  • 🕛 Scheduling a pair reviewing session
  • 📱 Providing mobile support
  • ♿ Providing accessibility support

@nikhagra-akamai nikhagra-akamai requested a review from a team as a code owner October 22, 2024 07:16
@nikhagra-akamai nikhagra-akamai requested review from dwiley-akamai and coliu-akamai and removed request for a team October 22, 2024 07:16
Copy link

github-actions bot commented Oct 22, 2024

Coverage Report:
Base Coverage: 87.06%
Current Coverage: 87.06%

height: number;
hideFill?: boolean;
Copy link
Member

Choose a reason for hiding this comment

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

hideFill seems fine to me. We could do something like this to potentially be more extendable / descriptive but it would accomplish the same thing.

Suggested change
hideFill?: boolean;
/**
* Makes the chart appear as a line or area chart
* @default area
*/
variant?: 'area' | 'line';

Copy link
Contributor

Choose a reason for hiding this comment

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

@nikhagra-akamai Yea let's do this, I have a feeling we'll want this.

@@ -41,7 +42,9 @@ interface AreaChartProps {
areas: AreaProps[];
ariaLabel: string;
data: any;
fillOpacity?: number;
Copy link
Member

Choose a reason for hiding this comment

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

Optional: add jsdoc style comments to our props describing what they do

Copy link
Contributor

@jaalah-akamai jaalah-akamai left a comment

Choose a reason for hiding this comment

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

Approved pending small variant addition

"@linode/manager": Added
---

Add hideFill & fillOpacity property to AreaChart component ([#11136](https://github.com/linode/manager/pull/11136))
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Add hideFill & fillOpacity property to AreaChart component ([#11136](https://github.com/linode/manager/pull/11136))
Add `hideFill` & `fillOpacity` properties to `AreaChart` component ([#11136](https://github.com/linode/manager/pull/11136))

@nikhagra-akamai
Copy link
Contributor Author

nikhagra-akamai commented Oct 22, 2024

@jaalah-akamai @bnussman-akamai @dwiley-akamai updated review comments & added jsdocs for the interfaces. Please merge

@jaalah-akamai jaalah-akamai merged commit 0036546 into linode:develop Oct 22, 2024
23 checks passed
Copy link

cypress bot commented Oct 22, 2024

Cloud Manager E2E    Run #6713

Run Properties:  status check passed Passed #6713  •  git commit 0036546919: feat: [DI-21463] - Added capability to transform area chart into line chart (#11...
Project Cloud Manager E2E
Branch Review develop
Run status status check passed Passed #6713
Run duration 25m 22s
Commit git commit 0036546919: feat: [DI-21463] - Added capability to transform area chart into line chart (#11...
Committer Nikhil Agrawal
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 2
Tests that did not run due to a developer annotating a test with .skip  Pending 2
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 438
View all changes introduced in this branch ↗︎

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.

5 participants