{% extends 'base.html' %} {% load static %} {% comment %} Cost History — Phase 13. Three line charts: monthly burn rate, 90-day renewal forecast, active contract count. One line per currency, hue from currency_hues map. Why three separate charts rather than one with multiple y-axes: Different units mean different y-scales — combining them on one plot either lies (about magnitudes) or invites confusion. One chart per metric keeps interpretation honest. Why inline SVG rather than a chart library: Zero JS dependency, prints natively, plays well with dark mode via currentColor. A 12-week × 2-currency series is small enough that hand-rolled paths are fine. Context (from views/cost_history.py): empty — bool; if True, render an empty state weeks — query window length snapshot_count — total snapshot rows in the window today — date.today() for "as of" label charts — list of {label, unit, series, value_max, date_min, date_max} each series item: {currency, hue, path_d, points, latest_value} currencies — sorted list of currencies present currency_hues — dict[currency → HSL hue 0-360] chart_w, chart_h — SVG viewBox dimensions {% endcomment %} {% block title %}Cost History{% endblock %} {% block extra_styles %} {% endblock %} {% block content %}
Trend of monthly burn, 90-day renewal forecast, and active contract count over the past {{ weeks }} weeks. {% if not empty %} {{ snapshot_count }} snapshot{{ snapshot_count|pluralize }} captured. {% endif %}
No snapshots yet.
Run the Capture cost history snapshot Job (under Jobs → Contracts) to start collecting data, or schedule it weekly so the trend builds itself.
No data for this metric yet.
{% else %}