MCPcopy Create free account

hub / github.com/5ocworkshop/bgraph / functions

Functions322 in github.com/5ocworkshop/bgraph

↓ 78 callersMethodrender
(self, area: Rect, buf: &mut Buffer)
src/classes/cls_meter.rs:107
↓ 49 callersMethodadd_stop
Add a color stop at a specific position (0.0-1.0) NaN positions are treated as 0.0. Stops are automatically sorted by position.
src/classes/cls_color_gradient.rs:112
↓ 43 callersMethodpush
Push a new value (O(1) operation) If at capacity, oldest value is dropped. # Example ```rust use bgraph::TimeSeriesState; let mut state = TimeSeries
src/classes/cls_time_series_state.rs:75
↓ 41 callersMethodstyle
Set the fallback style (used when no gradient is set).
src/classes/cls_meter.rs:76
↓ 35 callersMethodget_color
Get color for a normalized value (0.0-1.0)
src/classes/cls_color_gradient.rs:121
↓ 35 callersMethody_range
Set the vertical range (y-axis)
src/classes/cls_graph.rs:78
↓ 30 callersMethodgradient
Set the color gradient for the filled portion. Each character's color is determined by its position in the bar, not the overall value. This creates t
src/classes/cls_meter.rs:70
↓ 21 callersFunctionassert_color_rgb
Helper to check if a color matches expected RGB values
tests/classes/test_cls_color_gradient.rs:10
↓ 20 callersMethoditer
Iterate over values from oldest to newest.
src/classes/cls_mini_time_series_state.rs:92
↓ 19 callersMethodlen
Current number of samples
src/classes/cls_time_series_state.rs:98
↓ 18 callersFunctionrandom_range
Generate a random f32 in the range [min, max]. Uses a simple LCG algorithm. Thread-unsafe (uses static mut).
examples/demo/fnc_random_range.rs:15
↓ 18 callersMethodx_range
Set the horizontal range (x-axis)
src/classes/cls_graph.rs:72
↓ 15 callersMethodrender_mode
Set the rendering mode (Braille or Block)
src/classes/cls_graph.rs:90
↓ 11 callersMethodshow_zero_line
Enable or disable the zero-line
src/classes/cls_graph.rs:102
↓ 10 callersMethodget
Get a value by index (0 = oldest). Returns None if out of range.
src/classes/cls_mini_time_series_state.rs:97
↓ 10 callersMethodis_empty
Check if empty
src/classes/cls_time_series_state.rs:103
↓ 8 callersMethodhigh_resolution
Enable high-resolution mode (8 levels, 1 value per char). In high-res mode, each character shows a single value with 8-level precision and consistent
src/classes/cls_mini_graph.rs:88
↓ 8 callersFunctionrender
Render the btop-style panel.
examples/demo/panels/fnc_render_btop.rs:32
↓ 7 callersFunctionsanitize_value
Sanitize a value for rendering. Non-finite values become 0.0.
src/functions/fnc_normalize.rs:7
↓ 6 callersMethodgradient_mode
Set the gradient coloring mode - `GradientMode::Value` (default): Color based on data value at each position. More information-dense as color encodes
src/classes/cls_graph.rs:126
↓ 6 callersFunctioninner_area
(area: Rect)
examples/demo/layout.rs:12
↓ 6 callersFunctionsnap_height
Snap height for clean braille divisions. Snaps to heights that produce intuitive scale divisions AND ensure 50% lands on a clean row boundary. Target
src/functions/fnc_snap_height.rs:36
↓ 6 callersFunctionwith_scale_margin
(area: Rect)
examples/demo/layout.rs:23
↓ 5 callersFunctionnormalize_value
Normalize a value to 0.0-1.0 range. Returns None for invalid ranges or values.
src/functions/fnc_normalize.rs:16
↓ 5 callersMethodprecompute
Pre-compute a 101-entry lookup table for fast access. This matches btop's approach where gradients are pre-computed as arrays indexed 0-100 (represen
src/classes/cls_color_gradient.rs:101
↓ 5 callersFunctionrender_debug_fill
Render braille at 100% fill to verify graph area alignment. Uses full braille block (all 8 dots lit) to show exact graph boundaries.
examples/demo/render/fnc_render_debug_fill.rs:16
↓ 5 callersFunctionsnap_graph_area
Adjusts a Rect to have a snapped height, centering vertically. This is a convenience function that applies [`snap_height`] to a layout Rect and cente
src/functions/fnc_snap_height.rs:106
↓ 4 callersFunctionclip_rect
Clip a virtual rect to the visible viewport. Returns None if the rect is entirely outside the viewport.
examples/demo/panels/fnc_render_btop.rs:215
↓ 4 callersMethodpct
(&self, val: f32)
examples/demo/cls_simulation.rs:74
↓ 4 callersMethodset_label
Set label for a specific series
src/classes/cls_multi_time_series_state.rs:53
↓ 4 callersMethodsplit_direction
Set split direction (horizontal or vertical) - `Horizontal`: left | right (default) - `Vertical`: top / bottom
src/classes/cls_dual_graph.rs:126
↓ 4 callersMethodsplit_ratio
Set split ratio (clamped to 0.1-0.9, default 0.5) For horizontal: 0.3 means left gets 30%, right gets 70%. For vertical: 0.3 means top gets 30%, bott
src/classes/cls_dual_graph.rs:117
↓ 3 callersMethodadd_series
Add a series to the graph Series are rendered in the order added (later = on top).
src/classes/cls_multi_graph.rs:67
↓ 3 callersMethodbackground_style
Set the background style for unfilled portion.
src/classes/cls_meter.rs:82
↓ 3 callersFunctionget_braille_symbols
()
src/functions/fnc_get_braille_symbols.rs:71
↓ 3 callersMethodlabel
Set the series label (displayed in legend)
src/classes/cls_series.rs:56
↓ 3 callersMethodlegend_position
Set legend position
src/classes/cls_multi_graph.rs:97
↓ 3 callersFunctionrender_y_scale_colored
Render Y-axis scale labels with custom color.
examples/demo/render/fnc_render_y_scale.rs:30
↓ 3 callersMethodshow_legend
Enable/disable legend display
src/classes/cls_multi_graph.rs:91
↓ 3 callersMethodvalue_to_level
Convert a value to a braille level (0-4 for standard, 0-8 for high-res).
src/classes/cls_mini_graph.rs:94
↓ 3 callersMethodvalue_to_level
Convert a value to a braille level.
src/classes/cls_mini_time_series.rs:107
↓ 2 callersFunctioncolor_to_rgb
Convert ratatui Color to RGB tuple
src/functions/fnc_color_interpolate.rs:41
↓ 2 callersMethodfilled_char
Set the character used for filled portion (default: '■').
src/classes/cls_meter.rs:88
↓ 2 callersMethodgap
Set gap between graphs in cells (default: 1)
src/classes/cls_dual_graph.rs:132
↓ 2 callersMethodinvert_y
Invert the Y-axis fill direction (fill from top down instead of bottom up) When enabled, the graph fills downward from the top of the area. Useful fo
src/classes/cls_graph.rs:135
↓ 2 callersMethodleft_gradient
Set left graph gradient
src/classes/cls_dual_graph.rs:138
↓ 2 callersMethodleft_style
Set left graph style
src/classes/cls_dual_graph.rs:77
↓ 2 callersMethodrender_mode
Set render mode for both graphs
src/classes/cls_dual_graph.rs:150
↓ 2 callersFunctionrender_y_scale_aligned
Render Y-axis scale labels aligned with the graph area. `label_x` - X position for labels (typically inner_area.x) `graph_area` - The actual graph re
examples/demo/render/fnc_render_y_scale.rs:18
↓ 2 callersMethodright_gradient
Set right graph gradient
src/classes/cls_dual_graph.rs:144
↓ 2 callersMethodright_style
Set right graph style
src/classes/cls_dual_graph.rs:83
↓ 2 callersFunctionsample_f32
Sample a data source safely. Panics are caught and non-finite values become 0.0.
src/functions/fnc_sample.rs:12
↓ 2 callersMethodstyles
Set styles for series (cycles if fewer styles than series)
src/classes/cls_multi_time_series.rs:71
↓ 2 callersMethodwave_char
Set the character used for Block mode rendering
src/classes/cls_graph.rs:96
↓ 2 callersMethodx_range
Set X-axis range for both graphs
src/classes/cls_dual_graph.rs:108
↓ 2 callersMethody_range
Set Y-axis range for both graphs (enables shared range mode)
src/classes/cls_dual_graph.rs:101
↓ 2 callersMethodzero_line_style
Set the zero-line style
src/classes/cls_graph.rs:108
↓ 1 callersMethodcalculate_legend_width
Calculate the width needed for the legend
src/classes/cls_multi_graph.rs:103
↓ 1 callersMethodcapacity
Get the capacity
src/classes/cls_time_series_state.rs:108
↓ 1 callersFunctioncleanup_terminal
Restore terminal to normal state.
examples/demo/main.rs:43
↓ 1 callersMethodclear
Clear all data
src/classes/cls_time_series_state.rs:93
↓ 1 callersMethodempty_char
Set the character used for empty portion (default: '■').
src/classes/cls_meter.rs:94
↓ 1 callersFunctionformat_size
(gb: f32)
examples/demo/panels/fnc_render_btop.rs:653
↓ 1 callersMethodfree_gb
(&self)
examples/demo/cls_simulation.rs:22
↓ 1 callersMethodfree_pct
(&self)
examples/demo/cls_simulation.rs:28
↓ 1 callersMethodgap
Set gap between graphs in cells
src/classes/cls_dual_time_series.rs:102
↓ 1 callersFunctionget_braille_symbols_inverted
()
src/functions/fnc_get_braille_symbols.rs:80
↓ 1 callersMethodget_label
Get label for a specific series
src/classes/cls_multi_time_series_state.rs:60
↓ 1 callersMethodgradient
Set gradient for a specific series index
src/classes/cls_multi_time_series.rs:77
↓ 1 callersMethodgradient
Set color gradient for value-based coloring
src/classes/cls_time_series.rs:78
↓ 1 callersMethodgradient_mode
Set gradient mode (Value or Position). - `GradientMode::Value`: Color based on data value (default) - `GradientMode::Position`: Color based on row po
src/classes/cls_time_series.rs:87
↓ 1 callersFunctionindexed_to_rgb
Convert 256-color index to RGB (approximate)
src/functions/fnc_color_interpolate.rs:66
↓ 1 callersFunctioninterpolate_color
Interpolate between two colors using linear RGB blending # Arguments `c1` - Starting color `c2` - Ending color `p1` - Position of c1 (0.0-1.0) `p2` -
src/functions/fnc_color_interpolate.rs:19
↓ 1 callersMethodis_empty
Check if all series are empty
src/classes/cls_multi_time_series_state.rs:98
↓ 1 callersMethodleft_gradient
Set left graph gradient
src/classes/cls_dual_time_series.rs:108
↓ 1 callersMethodleft_style
Set left graph style
src/classes/cls_dual_time_series.rs:73
↓ 1 callersMethodleft_y_range
Set left graph Y-axis range
src/classes/cls_dual_graph.rs:89
↓ 1 callersMethodlegend_position
Set legend position
src/classes/cls_multi_time_series.rs:98
↓ 1 callersMethodlen
Get the current number of values.
src/classes/cls_mini_time_series_state.rs:67
↓ 1 callersMethodpush
Push value to a specific series
src/classes/cls_multi_time_series_state.rs:70
↓ 1 callersFunctionrender_block
( area: Rect, buf: &mut Buffer, data: &dyn DataSource, _x_range: (f32, f32), style: Style,
src/functions/fnc_render_block.rs:14
↓ 1 callersFunctionrender_braille
( area: Rect, buf: &mut Buffer, data: &dyn DataSource, x_range: (f32, f32), y_range: (f32,
src/functions/fnc_render_braille.rs:18
↓ 1 callersFunctionrender_content
Render the scrollable content area.
examples/demo/panels/fnc_render_btop.rs:157
↓ 1 callersFunctionrender_cpu_box
Render CPU box with sparklines.
examples/demo/panels/fnc_render_btop.rs:246
↓ 1 callersFunctionrender_disk_box
Render disk box with meters.
examples/demo/panels/fnc_render_btop.rs:499
↓ 1 callersFunctionrender_footer
Render the footer bar with keyboard controls.
examples/demo/render/fnc_render_footer.rs:15
↓ 1 callersFunctionrender_gauges_box
Render gauges box with vertical braille gauges.
examples/demo/panels/fnc_render_btop.rs:568
↓ 1 callersFunctionrender_header
Render the header bar with panel indicators and status.
examples/demo/render/fnc_render_header.rs:20
↓ 1 callersMethodrender_legend
Render the legend
src/classes/cls_multi_graph.rs:114
↓ 1 callersFunctionrender_mem_box
Render memory box with graphs.
examples/demo/panels/fnc_render_btop.rs:346
↓ 1 callersMethodrender_mode
Set render mode
src/classes/cls_multi_graph.rs:85
↓ 1 callersMethodrender_mode
Set render mode
src/classes/cls_multi_time_series.rs:86
↓ 1 callersMethodrender_mode
Set rendering mode
src/classes/cls_time_series.rs:72
↓ 1 callersMethodrender_mode
Set render mode for both graphs
src/classes/cls_dual_time_series.rs:120
↓ 1 callersFunctionrender_panel
Render the panel at the given index.
examples/demo/panels/mod.rs:23
↓ 1 callersMethodright_gradient
Set right graph gradient
src/classes/cls_dual_time_series.rs:114
↓ 1 callersMethodright_style
Set right graph style
src/classes/cls_dual_time_series.rs:79
↓ 1 callersMethodright_y_range
Set right graph Y-axis range
src/classes/cls_dual_graph.rs:95
↓ 1 callersMethodsample
(&self, x: f32)
src/classes/cls_fn_data_source.rs:43
↓ 1 callersMethodsample_internal
Sample value at normalized position (0.0 = oldest, 1.0 = newest) Uses linear interpolation between samples for smooth rendering.
src/classes/cls_time_series_state.rs:156
next →1–100 of 322, ranked by callers