EasyPieChart is not defined on using Minimalist charts


Topic: "EasyPieChart is not defined" on using Minimalist charts

The Orange Dev House pro asked 6 years ago

I tried using the minimalist chart from the documentation page (Minimalist chart usage) in my angular project and I have the ChartSimpleModule added to my app.module.ts: 

<div class="text-center">
<mdb-simple-chart [percent]="56" [barColor]="'4CAF50'"></mdb-simple-chart>
<h5><span class="badge green">Sales <i class="fa fa-arrow-circle-up"></i></span></h5>
</div>

The pie chart component does not display around the "56%" text and I keep the getting the error message: "EasyPieChart is not defined at EasyPieChartComponent" in my console. Do you have a fix for this error? Thanks.


Damian Gemza staff answered 6 years ago

Dear @The Orange Dev House 

You have forgotten to add easy-pie-chart script in angular.json file.

Please add the below line in the angular.json scripts array and your problem will be gone.

"node_modules/easy-pie-chart/dist/easypiechart.js"

Best Regards,

Damian


Damian Gemza staff answered 6 years ago

Dear The Orange Dev House,

Could you please specify, on which MDB Angular version you're getting this error? Are you using MDB Angular in your application installed as a dependency, or you're using our compiled repository?

I've tried to reproduce your problem, but without success.

The reproduction steps would be helpful to debug your problem.

Used the below code:

<mdb-simple-chart percent="85" barColor="ef1e25" trackColor="f2f2f2" scaleColor="303030" scaleLength="1" lineCap="round" lineWidth="5"
trackWidth="10" size="110" rotate="0" [animate]="{duration: 1000, enabled: true}"> </mdb-simple-chart>

Best Regards,

Damian


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Resolved

Specification of the issue
  • User: Pro
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: 6.2.3
  • Device: PC
  • Browser: Chrome
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: Yes