You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Enhance LineChartAnnotation component with custom label support and improved label positioning
* Refactor LineChartAnnotation to accept custom label rendering via renderLabel prop.
* Update label positioning logic to accommodate custom dx and dy values.
* Modify annotation props to include additional label positioning options.
* Adjust LineChart component to pass down annotation props more efficiently.
* Add a new story for custom label rendering in annotation stories.
* Add changelog
* Fix regression on default annotation positioning
* Fix react popover attr naming
* Configure bottom custom annotation in story
* Wrap annotations in svg
* Refactor LineChart component to support forwarding refs and expose scale data
* Introduced LineChartRef interface to provide methods for accessing chart scales and dimensions.
* Refactored LineChart to use forwardRef, allowing parent components to interact with the chart's internal state.
* Created LineChartInternal component to manage data context and provide scale data via ref.
* Updated chart rendering logic to maintain existing functionality while enhancing flexibility.
* Use an overlay for positioning annotations above the interaction layer
* Remove debug annotations
* Fix positioning issues
* Refactor LineChartAnnotation and LineChartAnnotations components to remove external positioning logic and utilize DataContext for scale management. Simplified annotation rendering by directly passing props without calculating chart bounds.
* Improve data context types
* Wait for scales to be ready in tests
* Simplify scales ready state
* Fix svg getBBox not being available in jsdom
* Improve syncing of overlay scale
* Remove React from imports
* Fix custom label positoning in Safari
* Add @automattic/jetpack-components as a dependency in charts package
* Add LineChartAnnotationLabelWithPopover component for enhanced label popover functionality in line charts. Update LineChartAnnotation to support popover rendering and simplify annotation prop passing in LineChartAnnotations. Update stories to demonstrate new popover feature.
* Add missing position on line chart wrapper after rebase
* Refactor LineChartAnnotation to utilize POPOVER_BUTTON_SIZE constant for consistent button dimensions and simplify Safari label positioning logic.
* Move popoveer styles to scss
* Minor code cleanup
* Refactor LineChartAnnotation to remove unused dx and dy props, simplifying label positioning logic and improving code clarity.
* Add DeployedIcon and AlertIcon components for improved annotation rendering in LineChart. Update renderLabel methods to utilize these new components, enhancing code clarity and maintainability.
* Unify tooltip and popover styles
* Add tests
* Introduce scalesStable state to track when scales have settled, ensuring proper rendering only when scales are stable.
* Improve popover positioining
- fallback to centered position for Safari due to foreign object issues
- add space around popover to allow for hitting viewport boundaries
* Add popover api types
* Add popover tests
* Fix typecheck
* Add annotation overlay tests
* Rename LineChartAnnotations component to LineChartAnnotationsOverlay for clarity and update import references accordingly.
* Add popover tests
* Enhance LineChart annotation tests to verify overlay rendering and dimensions. Update tests to ensure proper behavior when annotations are provided, absent, or empty.
* Expose unwrapped LineChart component for testing and add tests for ref interface methods.
* Fix tooltip keyboard navigation by moving annotations out of focusable area
* Use annotation title for button aria-label
* Improve Safari detection and comments
* Improve story styling
* Use composition for annotations with chart context
* Switch to compound component pattern
* fix build errors
* Update tests
* 💄 Fix lint
* Update changelog
Include the breaking change to the annotations API
---------
Co-authored-by: Jasper Kang <[email protected]>
Line chart: Add support for custom interactive annotations. Includes a breaking change to the annotations API, from an `annotations` prop to a compound component pattern.
// Popover positioning in Safari is complicated due to issues with SVG foreign objects (https://bugs.webkit.org/show_bug.cgi?id=23113), so let it be positioned in the centre of the viewport.
0 commit comments