Waterfall Chart

Sales Commission Structure Breakdown

Commission calculation waterfall from gross sales to net payout.

Output
Sales Commission Structure Breakdown
Python
import matplotlib.pyplot as plt
import numpy as np
from matplotlib.patches import Patch

categories = ['Gross\nSales', 'Returns &\nRefunds', 'Net\nSales', 'Base\nCommission', 
              'Accelerator\nBonus', 'SPIF\nBonus', 'Clawbacks', 'Net\nPayout']
values = [0, -45, 0, 0, 0, 0, -8, 0]

initial = 520
running_total = initial
bottoms, heights, colors = [], [], []

# Calculate commission components
net_sales = initial - 45  # 475
base_comm = net_sales * 0.08  # 38
accel = 15
spif = 8
clawback = -8

for i, (cat, val) in enumerate(zip(categories, values)):
    if 'Gross' in cat:
        bottoms.append(0)
        heights.append(initial)
        colors.append('#27D3F5')
        running_total = initial
    elif 'Returns' in cat:
        bottoms.append(running_total - 45)
        heights.append(45)
        colors.append('#F5276C')
        running_total -= 45
    elif 'Net\nSales' in cat:
        bottoms.append(0)
        heights.append(running_total)
        colors.append('#F5B027')
    elif 'Base' in cat:
        bottoms.append(0)
        heights.append(base_comm)
        colors.append('#6CF527')
        running_total = base_comm
    elif 'Accelerator' in cat:
        bottoms.append(running_total)
        heights.append(accel)
        colors.append('#27F5B0')
        running_total += accel
    elif 'SPIF' in cat:
        bottoms.append(running_total)
        heights.append(spif)
        colors.append('#4927F5')
        running_total += spif
    elif 'Clawbacks' in cat:
        bottoms.append(running_total - 8)
        heights.append(8)
        colors.append('#F5276C')
        running_total -= 8
    elif 'Net\nPayout' in cat:
        bottoms.append(0)
        heights.append(running_total)
        colors.append('#6CF527')

fig, ax = plt.subplots(figsize=(14, 8), facecolor='#0a0a0f')
ax.set_facecolor('#0a0a0f')

x = np.arange(len(categories))
bars = ax.bar(x, heights, bottom=bottoms, color=colors, width=0.65, edgecolor='#1e293b', linewidth=1)

labels = [f"${initial}K", f"-$45K", f"${net_sales}K", f"${base_comm:.0f}K", f"+${accel}K", f"+${spif}K", f"-$8K", f"${running_total:.0f}K"]
for i, (bar, label, bot, height) in enumerate(zip(bars, labels, bottoms, heights)):
    y_pos = bot + height / 2
    ax.text(bar.get_x() + bar.get_width()/2, y_pos, label, ha='center', va='center', 
            fontsize=10, fontweight='bold', color='white' if height < 200 else '#0a0a0f')

ax.set_xlim(-0.6, len(categories) - 0.4)
ax.set_ylim(0, initial * 1.1)
ax.set_xticks(x)
ax.set_xticklabels(categories, fontsize=9, color='#e2e8f0')
ax.set_ylabel('Amount ($ Thousands)', fontsize=12, color='#e2e8f0', fontweight='500')
ax.set_title('Sales Rep Commission Calculation', fontsize=16, color='white', fontweight='bold', pad=20)
ax.tick_params(axis='y', colors='#e2e8f0', labelsize=10)
ax.yaxis.grid(True, linestyle='--', alpha=0.3, color='#334155')
ax.set_axisbelow(True)
for spine in ax.spines.values():
    spine.set_color('#334155')

eff_rate = (running_total / net_sales) * 100
ax.annotate(f'Effective Commission Rate: {eff_rate:.1f}%', xy=(0.98, 0.95), xycoords='axes fraction',
            fontsize=11, color='#6CF527', ha='right', fontweight='bold',
            bbox=dict(boxstyle='round,pad=0.4', facecolor='#1e293b', edgecolor='#6CF527', alpha=0.9))

legend_elements = [Patch(facecolor='#27D3F5', label='Gross Sales'), Patch(facecolor='#F5276C', label='Deductions'),
                   Patch(facecolor='#27F5B0', label='Bonuses'), Patch(facecolor='#6CF527', label='Net Payout')]
ax.legend(handles=legend_elements, loc='upper left', bbox_to_anchor=(0, -0.1), ncol=4, fontsize=9,
          facecolor='#1e293b', edgecolor='#334155', labelcolor='white')

plt.tight_layout()
plt.subplots_adjust(bottom=0.15)
plt.show()
Library

Matplotlib

Category

Financial

Did this help you?

Support PyLucid to keep it free & growing

Support