Overview
Veydra’s chart system is driven by a configuration file (config/outputs.json) in each model’s directory. This file controls which variables are returned from simulations and how they are grouped into charts for visualization.
Configuration File Structure
Theoutputs.json file has four main sections:
Stocks and Flows
Define which simulation variables are returned to the frontend:All stocks and flows are calculated internally during simulation. Only those listed here are included in the results sent to the frontend.
Auxiliaries
Auxiliaries are derived metrics computed post-simulation from stocks and flows. Define them inoutputs.json and implement the calculation in your model’s _calculate_auxiliaries method.
- Input:
health.s_healthy_well,health.s_healthy_ill,health.s_sickly_well,health.s_sickly_ill - Output:
(healthy_well + healthy_ill) / (sickly_well + sickly_ill)
Chart Configuration
Basic Chart Definition
Each chart groups one or more series together:Chart Properties
| Property | Type | Description |
|---|---|---|
id | string | Unique identifier for the chart |
title | string | Display title shown above the chart |
yAxisLabel | string | Label for the left Y-axis |
yAxisLabelRight | string | Label for the right Y-axis (optional) |
comparison | boolean | Show baseline vs scenario lines |
series | array | List of data series to display |
Series Properties
| Property | Type | Description |
|---|---|---|
key | string | Variable name from stocks, flows, or auxiliaries |
label | string | Legend label for this series |
color | string | Hex color code (e.g., #4CAF50) |
yAxis | string | "right" for secondary axis (optional) |
dashed | boolean | Use dashed line style (optional) |
Chart Examples
Single Series with Comparison
Shows baseline (dashed gray) vs scenario (solid color) for one variable:Multiple Series with Dual Y-Axis
Combine variables with different scales using left and right axes:Multiple Series without Comparison
Whencomparison: false, only the current scenario is shown (no baseline lines):
Coverage by Subpopulation
Break down aggregate metrics into component parts:UI Configuration
Phase Plot
Control whether the phase plot (stock vs stock scatter plot) is displayed:true to enable the interactive phase plot selector, which requires at least 2 stocks.
Time Units
The X-axis label automatically pulls units from thesimulation.duration parameter definition in your model. For example, if your model defines:
Fallback Behavior
If nocharts array is defined, the system falls back to displaying one chart per stock in the stocks array. This provides backward compatibility with models that haven’t been configured with grouped charts.
Best Practices
Group Related Variables
Group Related Variables
Use Dual Y-Axis Sparingly
Use Dual Y-Axis Sparingly
Only use the right Y-axis when scales differ significantly (e.g., people vs dollars). Too many dual-axis charts can confuse users.
Disable Comparison for Busy Charts
Disable Comparison for Busy Charts
Set
comparison: false for charts with 3+ series to keep them readable. Reserve comparison: true for key analytical charts.Choose Meaningful Colors
Choose Meaningful Colors
Use consistent color coding across charts (e.g., green for healthy, red for sickly). Material Design colors work well:
#4CAF50 (green), #F44336 (red), #2196F3 (blue).Next Steps
Stock-Flow Diagrams
Learn about model structure visualization
Model Development
Build models that output these variables

