kurkle / chartjs-chart-treemap

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

Dividers option to be removed #173

Open stockiNail opened 1 year ago

stockiNail commented 1 year ago

Discussed in https://github.com/kurkle/chartjs-chart-treemap/discussions/170

Originally posted by **stockiNail** December 12, 2022 Having a look to the `dividers` option, it is not clear to me if the current bahvior is the wished one or not. At the moment, setting the dividers option, the box is splitted by 2, ignoring the amount of subelements. In the sample (https://chartjs-chart-treemap.pages.dev/samples/dividers.html), the passed data are the following: ```javascript const data = [ {category: 'main', value: 1}, {category: 'main', value: 2}, {category: 'main', value: 3}, {category: 'other', value: 4}, {category: 'other', value: 5}, ]; ``` and my expectation, maybe wrong, grouping by category, is to have 2 boxes with 2 dividers for main and 1 for other. Instead, there is 1 divider for main and 1 for other.