Details
Details
As ponder Q114: Subtypes deadline switch to colored calendar icons says, I want to replace the calendar icon to a pie-char percentage icon.
In the extension codes about the icon value part:
if ($deadline && $due) { $text = phabricator_date($due, $viewer); $now = time(); $day = 86400; if ($due < $now) { $this->setColor('fire'); } else if ($due < $now + ($day * 2.5)) { $this->setColor('orange'); } else if ($due < $now + ($day * 7)) { $this->setColor('green'); } else { $this->setColor('grey'); } $icon = 'fa-calendar-check-o'; }
The variable "text" and function "setColor" is the key to set a colored calendar with date.
Then what's the key variable and function about a pie-chart? Could you give me a short demo about a simple pie-chart?
Thanks!
Answers
Answers
New Answer
New Answer