(value)
| 110 | |
| 111 | |
| 112 | function formatValue(value) { |
| 113 | if (!value) |
| 114 | return value; |
| 115 | if (value < 0) |
| 116 | return value.toFixed(3); |
| 117 | return `+${value.toFixed(3)}`; |
| 118 | } |
| 119 | |
| 120 | function drawBar(label, value, x, y, width, height) { |
| 121 | const halfWidth = width >> 1; |