Register new chart type

How to register new chart type from the community? I installed the new chart type package and tried to register it like this but still got the error.
import './bootstrap';
import Chart from 'chart.js/auto';
import {TreemapController, TreemapElement} from 'chartjs-chart-treemap';

Chart.register(TreemapController, TreemapElement);


Uncaught Error: "treemap" is not a registered controller.


I think because I register to the wrong one, not the chart object Filament is using to render chart, but I don't know how to get the right one.
Was this page helpful?