Controller defined by "classic" style does not work
See original GitHub issueExpected Behavior
As written on the documentation, the “classic” style should define new chart.
Current Behavior
Using the classic style, reported into documentation, you got an error:
Code
function Custom() {
Chart.controllers.line.call(this, arguments);
}
Custom.prototype.draw = function() {
Chart.controllers.line.prototype.draw.call(this, arguments);
}
Custom.id = 'myline';
Custom.defaults = Chart.defaults.line;
Chart.registry.addControllers(Custom);
Error
Uncaught Error: "myline" is not a registered controller.
_get https://www.chartjs.org/dist/master/chart.js:5651
getController https://www.chartjs.org/dist/master/chart.js:5601
buildOrUpdateControllers https://www.chartjs.org/dist/master/chart.js:6131
update https://www.chartjs.org/dist/master/chart.js:6168
Chart https://www.chartjs.org/dist/master/chart.js:5949
<anonymous> pen.js:44
Steps to Reproduce
https://codepen.io/stockinail/pen/MWKBvRQ
See the browser console log.
Environment
- Chart.js version: dist/master
- Browser name and version: FF 78.0.2
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (10 by maintainers)
Top Results From Across the Web
Controller not working in macOS 12.3 - Apple Developer
I tried to connect my xbox controller to my MacBook, even though the controller is registered in bluetooth setting, but it doesn't function...
Read more >Model View Controller Explained - Tom Dalling
Model view controller (MVC) is a very useful and popular design pattern. ... The model represents the data, and does nothing else.
Read more >Classical control theory - Wikipedia
Classical control theory is a branch of control theory that deals with the behavior of dynamical systems with inputs, and how their behavior...
Read more >Version Control Tab is missing – IDEs Support (IntelliJ Platform)
What's new' says there is new commit tool window so it mean the old was replaced. No single word about Version Tab. You...
Read more >Handling common JavaScript problems - MDN Web Docs
Now we'll look at common cross-browser JavaScript problems and how to ... modern browsers do a good job of supporting "classic JavaScript ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I did open a PR, but if you want to improve the documentation, you’re welcome!
https://codepen.io/kurkle/pen/oNbMMyG