Skip to main content

Crate bonbon

Crate bonbon 

Source
Expand description

§bonbon

bonbon is a high-performance glucose data visualization library designed for rendering clear, informative blood glucose charts. It focuses on efficiency and visual clarity, making it suitable for both web backends and embedded systems.

§Features

  • High Performance: Tight, allocation-light pixel loops and pre-computed sprites and glyph masks, with no thread pool to spin up.
  • Dynamic Scaling: Automatically adjusts Y-axis bounds based on data range.
  • Flexible Unit Support: Every graph and card renders in mg/dL, mmol/L, or both at once (models::UnitDisplay).
  • Treatment Visualization: Render insulin boluses, carbohydrate intake, and manual fingerstick calibrations.
  • Breakdown Graph: Time in range per hour or per weekday, with the change from a previous period.
  • Compare Graph: Two periods side by side with their typical days and statistics.
  • Percentile Graph: A typical day from any number of days, with median and percentile bands.
  • Mini Graphs: Optional insulin and carbs on board graphs under the glucose graph, from treatments or reported values.
  • Theming: Fully customizable color palettes.

§Architecture

The crate is organized into several modules:

Modules§

charts
integrations
models
prelude
theme