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

Feature/dev 4215h #1707

Merged
merged 8 commits into from
Nov 22, 2024
Merged

Feature/dev 4215h #1707

merged 8 commits into from
Nov 22, 2024

Conversation

Atash3000
Copy link
Collaborator

[Replace With Ticket Number]

Testing Steps

Select Chart Type: Select the chart to a Bar, Line, or Combo type.
Select Scale Type: Choose the "Date or Time scale" option for the chart.
Configure Time Scale: Adjust the time scale settings as needed.
Enable Brush Slider:
On the Date Category Panel, locate a new checkbox labeled "Brush Slider".
Check this box to enable the Brush Slider. A brush slider should appear below the charts.
Adjust Brush Slider:
Drag the corners of the brush slider to precisely adjust the scale of the bars or lines in the chart.
Update Legend Position:
Change the legend position to the bottom of the chart and verify that it does not overlap with the brush slider.
Adjust Tick Rotation:
Modify the rotation of the ticks on the axis to ensure there is no overlap with the brush slider.
Activate Filters:
Turn on any filters. The brush slider should reset to its initial state once the filters are activated.

Self Review

  • I have added testing steps for reviewers
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • New and existing unit tests are passing

Screenshots (if applicable)

Additional Notes

@Atash3000 Atash3000 added this to the 4.24.12 milestone Nov 20, 2024
packages/chart/src/components/BrushChart.tsx Outdated Show resolved Hide resolved
packages/chart/src/components/Legend/helpers/index.ts Outdated Show resolved Hide resolved
packages/chart/src/scss/DataTable.scss Show resolved Hide resolved
packages/core/components/DataTable/DataTable.tsx Outdated Show resolved Hide resolved
@@ -244,17 +244,17 @@ const DataTable = (props: DataTableProps) => {
</MediaControls.Section>
)
}
const getClassNames = (): string => {
const isBrushActive = config?.brush?.active && config.legend.position !== 'bottom'
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit:
Consider organizing the class names in an array and returning the result. This can improve readability and maintainability:

const classes = []
if (logic) classes.push('class-name')
if (!logic) classes.filter(c => c !== 'class-name')
return classes.join(' ')

This approach makes the class logic easier to follow, especially when dealing with conditional class assignments.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed!

@adamdoe
Copy link
Collaborator

adamdoe commented Nov 21, 2024

Nice work! This is working for me in the editor. I appreciate the extra detail on adding variable names in and updating the functions.

@Atash3000 Atash3000 merged commit 555f5ad into dev Nov 22, 2024
1 check passed
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.

2 participants