I am trying to test chart.js zoom plugin example (from official examples folder) locally. Example file name is zoom.html I changed scripts paths to local paths in the example code:
<script src="Chart.bundle.js"></script>
<script src="hammer.min.js"></script>
<script src="chartjs-plugin-zoom.js"></script>
All scripts are latest versions:
Chart.js: 2.7.3
Hammer.js: 2.0.8
chartjs-plugin-zoom: does not have version number, but latest downloaded from github
The zoom does not work and I see the error in console:
Uncaught SyntaxError: Unexpected identifier
in line 3 of chartjs-plugin-zoom.js
so it seems like
import Chart from 'chart.js';
line in the plugin code works wrong. Or maybe I am doing wrong something.
The same error happened when I tried other locations of the libraries.