Skip to content

upcoming: [DI-21842] - Added capability to toggle dots in AreaChart & show generated x-axis ticks - #76

Merged
venkymano-akamai merged 3 commits into
ACLPManager:aclp_developfrom
nikhagra-akamai:features/recharts_migration
Nov 18, 2024
Merged

venkymano-akamai merged 3 commits into
ACLPManager:aclp_developfrom
nikhagra-akamai:features/recharts_migration

Conversation

@nikhagra-akamai

@nikhagra-akamai nikhagra-akamai commented Nov 15, 2024 •

Copy link
Copy Markdown

Description 📝

Highlight the Pull Request's context and intentions.

Changes 🔄

List any change relevant to the reviewer.

  • ...
  • ...

Target release date 🗓️

Please specify a release date (and environment, if applicable) to guarantee timely review of this PR. If exact date is not known, please approximate and update it as needed.

Preview 📷

Include a screenshot or screen recording of the change.

🔒 Use the Mask Sensitive Data setting for security.

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

With Date Scale

Screenshot 2024-11-15 at 4 38 15 PM
Screenshot 2024-11-15 at 4 38 22 PM

With Time Scale

Screenshot 2024-11-15 at 4 37 54 PM
Screenshot 2024-11-15 at 4 37 59 PM

How to test 🧪

Prerequisites

(How to setup test environment)

  • ...
  • ...

Reproduction steps

(How to reproduce the issue, if applicable)

  • ...
  • ...

Verification steps

(How to verify changes)

  • ...
  • ...

As an Author I have considered 🤔

Check all that apply

  •  Use React components instead of HTML Tags
  • Proper naming conventions like cameCase for variables & Function & snake_case for constants
  • Use appropriate types & avoid using "any"
  • No type casting & non-null assertions
  • Adding a changeset
  • Providing/Improving test coverage
  • Use sx props to pass styles instead of style prop
  • Add JSDoc comments for interface properties & functions
  • Use strict equality (===) instead of double equal (==)
  • Use of named arguments (interfaces) if function argument list exceeds size 2
  • Destructure the props
  • Keep component size small & move big computing functions to separate utility
  • 📱 Providing mobile support

Commit message and pull request title format standards

Note: Remove this section before opening the pull request
Make sure your PR title and commit message on squash and merge are as shown below

<commit type>: [JIRA-ticket-number] - <description>

Commit Types:

  • feat: New feature for the user (not a part of the code, or ci, ...).
  • fix: Bugfix for the user (not a fix to build something, ...).
  • change: Modifying an existing visual UI instance. Such as a component or a feature.
  • refactor: Restructuring existing code without changing its external behavior or visual UI. Typically to improve readability, maintainability, and performance.
  • test: New tests or changes to existing tests. Does not change the production code.
  • upcoming: A new feature that is in progress, not visible to users yet, and usually behind a feature flag.

Example: feat: [M3-1234] - Allow user to view their login history


ariaLabel,
connectNulls,
data,
dotRadius = 3,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I think we agreed upon 2?

@nikhagra-akamai nikhagra-akamai Nov 15, 2024 •

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

that's the default value for everyone, and as for our case I've discussed with Kiran & seem 1.5 is fine for us, that we will pass as prop. 3 is the default dot radius of recharts so I kept it as it is

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

3 is actually looks cluttered for DBaaS kind of data where we have multiple series with too granular data of 1 min.

return `${value}`;
};

export const generate12HourTicks = (data: any[], timezone: string) => {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

any[]??

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

this method is created by Jaalah only, & any is there because AreaChart component does not have any type defined for the data

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

linode#11145 (comment)

this thing was discussed here

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Let's leave a code comment regarding the any[] for future removal based on what was said previously

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

In fact, I wouldn't mind actually pulling in the dependency we discussed and making the change with this small PR

areas={areas}
ariaLabel={ariaLabel ? ariaLabel : ''}
data={data}
dotRadius={1.5}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

sorry, I take back my previous comment, is 1.5 still okay

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

yes for graph with lots of plots, 1.5 was looking much cleaner compared to 2.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I agree 1.5 looks better when we analyzed.

@venkymano-akamai
venkymano-akamai merged commit b74c63b into ACLPManager:aclp_develop Nov 18, 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.

4 participants