Skip to main content

Module params

Module params 

Source
Expand description

Parameter resolution for ChartML.

Resolves $blockname.param_id and $param_id references in YAML specs by substituting them with actual parameter values or defaults. Matches the JS parameterResolver.js implementation.

Functions§

collect_param_defaults
Collect default parameter values from params component definitions. Named params (with a block name): stored as “blockname.param_id” → default Chart-level params (no block name): stored as “param_id” → default
extract_inline_param_defaults
Extract chart-level param defaults from a YAML string by attempting to parse just the params section. This handles the case where params are defined inside the chart spec itself (not as a separate component).
extract_param_references
Extract the set of parameter references from a YAML string. Returns paths like “dashboard_filters.region” or “top_n”.
resolve_param_references
Resolve parameter references in a YAML string.

Type Aliases§

ParamValues
Collected parameter values — flat map from “blockname.param_id” or “param_id” to value.