Topic: Changing min-chart color depend on percent
jouvrard pro asked 6 years ago
jouvrard pro answered 6 years ago
Bartłomiej Malanowski staff answered 6 years ago
$(function () { $('#minChart').easyPieChart({ barColor: function (percent) { return (percent < 40 ? '#ff4444' : percent < 80 ? '#ffbb33' : '#00C851'); }, onStep: function (from, to, percent) { $(this.el).find('.percent').text(Math.round(percent)); } }); });
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Resolved
- ForumUser: Pro
- Premium support: No
- Technology: MDB jQuery
- MDB Version: 4.5.9
- Device: PC
- Browser: All
- OS: Windows 10
- Provided sample code: No
- Provided link: No