hydroxy

Q-Q chart

Check whether a sample looks normal. Each sorted value is plotted against the normal quantile it would have; a straight line of points means yes.

Checkout latency

Close to normal: the points hug the line.

Normal Q-Q plot of checkout latency
RankNormal quantileLatency
1-2.13181 ms
2-1.64186 ms
3-1.38190 ms
4-1.19194 ms
5-1.04198 ms
6-0.90199 ms
7-0.78203 ms
8-0.67205 ms
9-0.57208 ms
10-0.48209 ms
11-0.39211 ms
12-0.30212 ms
13-0.21214 ms
14-0.13215 ms
15-0.04217 ms
160.04220 ms
170.13222 ms
180.21223 ms
190.30226 ms
200.39227 ms
210.48229 ms
220.57231 ms
230.67232 ms
240.78236 ms
250.90238 ms
261.04244 ms
271.19248 ms
281.38251 ms
291.64257 ms
302.13263 ms

Session length

Skewed right: long sessions bend up and away from the line.

Normal Q-Q plot of session length
RankNormal quantileSession
1-2.101 min
2-1.611 min
3-1.352 min
4-1.152 min
5-0.992 min
6-0.853 min
7-0.733 min
8-0.623 min
9-0.514 min
10-0.414 min
11-0.325 min
12-0.235 min
13-0.136 min
14-0.046 min
150.047 min
160.138 min
170.239 min
180.3210 min
190.4111 min
200.5113 min
210.6215 min
220.7317 min
230.8520 min
240.9924 min
251.1529 min
261.3535 min
271.6144 min
282.1058 min

Usage

use hydroxy_leptos::chart_frame::ChartFrame;
use hydroxy_leptos::qq_chart::*;
use leptos::prelude::*;

#[component]
pub fn Demo() -> impl IntoView {
    // Checkout latency in ms: roughly normal, so the points follow the line.
    let latency = vec![
        181.0, 236.0, 214.0, 198.0, 229.0, 251.0, 205.0, 222.0, 190.0, 244.0, 217.0, 208.0, 263.0, 226.0, 199.0, 232.0,
        211.0, 186.0, 248.0, 220.0, 203.0, 238.0, 215.0, 227.0, 194.0, 257.0, 209.0, 231.0, 223.0, 212.0,
    ];
    // Session length in minutes: skewed right, so the top end curves away above the line.
    let sessions = vec![
        1.0, 1.0, 2.0, 2.0, 2.0, 3.0, 3.0, 3.0, 4.0, 4.0, 5.0, 5.0, 6.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 13.0, 15.0,
        17.0, 20.0, 24.0, 29.0, 35.0, 44.0, 58.0,
    ];

    view! {
        <div style="display: grid; gap: var(--space-10); grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));">
            <ChartFrame title="Checkout latency" description="Close to normal: the points hug the line.">
                <QQChart sample=latency label="Normal Q-Q plot of checkout latency" value_label="Latency" format=|v: f64| format!("{v:.0} ms") />
            </ChartFrame>
            <ChartFrame title="Session length" description="Skewed right: long sessions bend up and away from the line.">
                <QQChart sample=sessions label="Normal Q-Q plot of session length" value_label="Session" format=|v: f64| format!("{v:.0} min") />
            </ChartFrame>
        </div>
    }
}

Anatomy

Componentdata-partRenders
QQChartrootfigure with a screen-reader table of rank, normal quantile and value
dotOne per sample value, smallest first
referenceDashed line the points would follow if the sample were normal (mean + sd × quantile)
x-labelNormal quantiles in standard deviations
tooltipThe value and its normal quantile

Keyboard

KeyDoes
ArrowLeft / ArrowRightNext smaller or larger value
Home / EndSmallest or largest value
EscapeHide the tooltip

Props

PropTypeNotes
sampleVec<f64>Required. Any order; NaN is dropped
labelStringRequired. What the chart shows; the accessible name
value_labelStringWhat the sample measures. Default "Value"
heightu16Plot height in px. Default 260
formatFn(f64) -> StringFormats the value ticks, tooltip and table
annotationsVec<Annotation>x in standard deviations, y in sample units

Events

PropTypeNotes
on_hoverCallback<Option<Datum>>The mark under the pointer or keyboard focus changes, or is left. Fires only on a change
on_selectCallback<Datum>Click, tap or Enter on a mark
Actions
Button
Icon button
Toolbar
Theme menu
Display
Avatar
Badge
Card
Chip
Code block
Markdown
Doc card
Due pill
Kbd
Priority mark
Source chip
Space icon
Status diamond
Tag
Value diff
Carousel
Reveal
Media timeline
QR code
Transcript viewer
Audio waveform
Audio player
Forms
Calendar
Checkbox
Combobox
Date picker
Color picker
Cron builder
Theme editor
Mention input
Signature pad
Image cropper
Date field
Date range picker
Duration field
Quantity stepper
Filter chip
Input
Markdown editor
Radio group
Search field
Segmented control
Select
Slider
Range slider
Rating
Toggle button
File dropzone
Upload queue
Attachment
Switch
Tags input
Number field
Money field
Phone field
Time field
OTP input
Password field
Questionnaire
Availability picker
Voice input
Recording control
Inline edit
Async validated input
Shortcut recorder
Data
Spreadsheet grid
Week scheduler
Virtual list
Stat card
Step track
Kanban board
Sortable list
Filter builder
Data table
Grid
Access editor
File manager
Gantt chart
Log stream
Diff viewer
JSON inspector
Terminal
Node editor
Whiteboard
Navigation
Table of contents
Breadcrumb
Tabs
Wizard
Nav item
Nav section
Tree view
Pagination
Menubar
Navigation menu
Saved views
Layout
Master detail
App shell
Sidebar layout
Resizable panels
Dashboard layout
Dock layout
Feedback
Callout
Check list
Empty state
Progress bar
Toast
Approval card
Skeleton
Notification center
Bars
Bar chart
Diverging bar chart
Span chart
Pictogram chart
Stacked bar chart
Funnel chart
Bullet chart
Waffle chart
Marimekko chart
Dot plot chart
Error bar chart
Pareto chart
Waterfall chart
Lollipop chart
Grouped bar chart
Bar race chart
KPIs and frames
Chart frame
Metric card
Sparkline
Points
Scatter chart
Smith chart
Strip plot
Beeswarm chart
Parallel coordinates
Ternary chart
Bland-Altman chart
Quiver chart
Connected scatter chart
Grids and tables
Heatmap chart
Chart table
Cohort chart
Radial
Radial charts
Radar chart
Polar area chart
Stat ring
Clock chart
Spiral chart
Lines and areas
Bump chart
Slope chart
Line chart
Composed chart
Small multiples
Cycle plot chart
Horizon chart
Stacked area chart
Threshold chart
Split line chart
Linked charts
Confidence band chart
Forecast fan chart
Step chart
Range area chart
Distributions
Contour chart
Histogram
Box plot
Density chart
Ridgeline chart
Violin chart
Q-Q chart
Survival chart
ECDF chart
Raincloud plot
Forest plot
Maps
Geo map
Bubble map
Hexbin map
Cartogram
Flow map
Parts of a whole
Donut chart
Voronoi treemap
Nested donut chart
Treemap chart
Sunburst chart
Bubble pack chart
Icicle chart
Flame graph chart
Pie chart
Word cloud
Relationships
Sankey chart
Network chart
Chord chart
UpSet chart
Venn chart
Alluvial chart
Adjacency matrix chart
Dependency graph chart
Tree chart
Arc diagram
Hive plot
Edge bundling
Finance
Candlestick chart
OHLC chart
Depth chart
Renko chart
Time
Timeline chart
Calendar heatmap chart
Spectrogram chart
Marey chart
Overlays
Tour
Lightbox
Alert dialog
Command palette
Dialog
Menu
Popover
Tooltip
Sheet
Hover card
Context menu
Utilities
Pacer
Hotkeys
Disclosure
Accordion
Collapsible
Chat
Chat bubble
Voice session
Composer
Thread
Thread list
Assistant composer
Assistant MCP
Assistant modal
Assistant thread
Assistant thread list
Message scroller
Insight note
Emoji picker
Tool trace
Model picker
Citation popover
Activity
Activity feed
Comment thread
Timeline
Presence bar
Live cursors
Reaction bar
Guides
Getting started
All components
All charts