Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] [Error] Chart.elements.Rectangle.prototype.draw error "elements" when @types/chart.js is installed #19

Closed
fernandomartinsrib opened this issue Aug 19, 2020 · 1 comment

Comments

@fernandomartinsrib
Copy link

fernandomartinsrib commented Aug 19, 2020

Version

1.1.0

Reproduction link

https://github.com/creativetimofficial/argon-dashboard-angular/issues

Operating System

Windows

Device

PC

Browser & Version

Chrome 83.0.4103.116

Steps to reproduce

  1. Try to use ChartDataLabels ( npm install chartjs-plugin-datalabels --save )
  2. Step One requires @types/chart.js ( npm install @types/chart.js ) to work correctly.
  3. Chart.elements.Rectangle.prototype.draw stop working

What is expected?

Chart.elements.Rectangle.prototype.draw back working.

What is actually happening?

in my project appeared a requirement of utilize ChartDataLabels, but ChartDataLabels require @types/chart.js, so when I import @types/chart.js, Chart.elements.Rectangle.prototype.draw (inside variables/chart.ts) don't work, showing of the error:

ERROR in src/app/variables/charts.ts:7:7 - error TS2339: Property 'elements' does not exist on type 'typeof import(".../node_modules/@types/chart.js/index.d.ts")'.


Solution

i do not have it yet

Additional comments

  • The Chart.elements.Rectangle.prototype.draw works normally without @types/chart.js.

  • If it's a basic knowlodge, sorry! I'm beginner with this tecnology.

@github-actions
Copy link

@fernandomartinsrib this issue was automatically closed because it did not follow the bellow rules:

IMPORTANT: Please use the following link to create a new issue:

https://www.creative-tim.com/new-issue/argon-dashboard-angular

**If your issue was not created using the app above, it will be closed immediately.**



Love Creative Tim? Do you need Angular, React, Vuejs or HTML? You can visit:
👉  https://www.creative-tim.com/bundles
👉  https://www.creative-tim.com


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant