apexcharts / react-apexcharts

📊 React Component for ApexCharts
https://apexcharts.com
MIT License
1.3k stars 153 forks source link

Apex Gantt Chart Tooltip reset Moment.js 'HH:mm' #555

Closed EXPITC closed 2 months ago

EXPITC commented 1 year ago

Issue Description: The Apex Gantt chart tooltip is not displaying the expected minutes and hours when using moment to format the value returned by the formatter option.

Steps to Reproduce:

  1. Add the formatter option to the tooltip in the ApexCharts Gantt chart and format the value returned by formatter using moment(val).format('DD/MMM HH:mm').
  2. Hover over a Gantt chart bar.
  3. Alternatively, clone the minimal repository provided below, and run pnpm dev. Then, hover over a bar in the Gantt chart.

Expected Behavior: When working with the React Apex Gantt chart in the Next.js framework, I expect the tooltip to display the exact hours and minutes at the end in the '24:60' or 'HH:mm' format using Moment.js.

Actual Behavior: However, the behavior is unexpected. The tooltip always displays '00:00,' even though the console shows a difference. It seems like the Apex Gantt chart may be interfering with the Moment.js formatting, but the exact cause is unclear.

Screenshots or Error Messages:

Screenshot 2023-10-21 at 11 53 37 Screenshot 2023-10-21 at 11 53 24 Screenshot 2023-10-21 at 11 53 47

Additional Information:

github-actions[bot] commented 2 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.