charts
Shared chart helper utilities for refinance visualizations.
build_linear_ticks(min_value, max_value, max_ticks=5)
Generate evenly spaced linear axis tick values.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
min_value
|
float
|
Minimum value to include on the axis. |
required |
max_value
|
float
|
Maximum value to include on the axis. |
required |
max_ticks
|
int
|
Maximum number of ticks to produce. |
5
|
Returns:
| Type | Description |
|---|---|
list[float]
|
A list of axis values covering the requested range. |
Source code in src/refi_calculator/core/charts.py
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | |
build_month_ticks(max_month, max_ticks=6)
Generate tick positions for month-based axes.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
max_month
|
int
|
Latest month number to display on the axis. |
required |
max_ticks
|
int
|
Maximum number of tick marks to emit. |
6
|
Returns:
| Type | Description |
|---|---|
list[int]
|
A list of month values to use for axis ticks. |
Source code in src/refi_calculator/core/charts.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | |