kurkle / chartjs-chart-treemap

Chart.js module for creating treemap charts
MIT License
137 stars 34 forks source link

Scriptable options for dataset properties invoked before element initialization #136

Closed stockiNail closed 2 years ago

stockiNail commented 2 years ago

During the update, the controller is using some dataset options which are not leveraging on the treemap element (because not initialized), for the scriptable options.

At the moment, these properties are mainly used to calculate the space for the caption and can not be defined as callback.

I think these options should be consumed even if they are defined as scriptable options.

The sequence to create the elements and then the space calculation for captions must be changed.

From @kurkle https://github.com/kurkle/chartjs-chart-treemap/pull/121#issuecomment-1258534332