Percentage of total that this segment represents.
total
double percent(double total) => total > 0 ? (value / total) * 100 : 0;