score:2

the chartjs-chart-treemap library has to be imported to the component file

import ChartComponent from 'react-chartjs-2';
import 'chartjs-chart-treemap';


export default class TreeMap extends React.Component {
    render() {
        return (
            <ChartComponent
                {...this.props}
                ref={ref => this.chartInstance = ref && ref.chartInstance}
                type='treemap'
            />
        );
    }
}

Related Query

More Query from same tag