react-apexcharts icon indicating copy to clipboard operation
react-apexcharts copied to clipboard

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

Open EXPITC opened this issue 2 years ago • 0 comments

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:

  • Minimal Repo to Reproduce: [Minimal Repo]
  • Browser and Version: [Chrome 108.0.5359.124 (Official Build) (arm64)]
  • Device and OS: [Macbook M1 Pro]
  • Framework or Library: [React, Next.JS]

EXPITC avatar Oct 23 '23 16:10 EXPITC