0

I am using nextJS 14 with chart.js ^4.1.1 and react-chartjs-2 ^5.1.0

import {
    BarElement,
    CategoryScale,
    Chart as ChartJS,
    Legend,
    LinearScale,
    Title,
    Tooltip,
} from 'chart.js'

ChartJS.register(CategoryScale, LinearScale, BarElement, Title, Tooltip, Legend)

In dev mode, it work fine in many browsers, until i test in iPhone WKWebview (IOS 14.2 sumilator). It show SyntaxError Unexpected token '=' . Excepted an opening '(' before a method's parameter list

Show the Bar Chart without any error.

Ding Yau
  • 1
  • 1

0 Answers0