Chart.js icon indicating copy to clipboard operation
Chart.js copied to clipboard

Mixed chart types and pie/doughnuts

Open zumm opened this issue 3 years ago • 0 comments

Expected behavior

Documentation says this is possible to mix up a few different chat types and doesn't mention any exceptions. So any charts types should be able to mix up, right?

Current behavior

Doughnuts are trying to treat all datasets as DoughnutControllers here: https://github.com/chartjs/Chart.js/blob/a4de430d99556a4630ad909749bdceb5413f69a9/src/controllers/controller.doughnut.js#L209-L210 and So if datasets have different chart types then it's crushing with error:

controller._getRotation is not a function

Reproducible sample

Optional extra steps/info to reproduce

No response

Possible solution

No response

Context

No response

chart.js version

v3.9.1

Browser name and version

No response

Link to your project

No response

zumm avatar Aug 24 '22 03:08 zumm