| 1 |
/** |
| 2 |
* Chart.js Entry Point |
| 3 |
* |
| 4 |
* Separate bundle for Chart.js library to optimize loading |
| 5 |
* Only loaded when performance charts are needed |
| 6 |
* |
| 7 |
* @package ThinkRank |
| 8 |
* @since 1.0.0 |
| 9 |
*/ |
| 10 |
|
| 11 |
// Import and register Chart.js components |
| 12 |
import { |
| 13 |
Chart as ChartJS, |
| 14 |
CategoryScale, |
| 15 |
LinearScale, |
| 16 |
PointElement, |
| 17 |
LineElement, |
| 18 |
Title, |
| 19 |
Tooltip, |
| 20 |
Filler |
| 21 |
} from 'chart.js'; |
| 22 |
|
| 23 |
// Register Chart.js components globally |
| 24 |
ChartJS.register( |
| 25 |
CategoryScale, |
| 26 |
LinearScale, |
| 27 |
PointElement, |
| 28 |
LineElement, |
| 29 |
Title, |
| 30 |
Tooltip, |
| 31 |
Filler |
| 32 |
); |
| 33 |
|
| 34 |
// Export Chart.js for use by other components |
| 35 |
export { ChartJS }; |
| 36 |
|
| 37 |
// Make Chart.js available globally for WordPress compatibility |
| 38 |
window.ThinkRankChartJS = ChartJS; |
| 39 |
|