Packages

Multi-surface application runtime for Elixir. One TEA module renders to terminal, browser (LiveView), SSH, and MCP (agents). 30+ widgets, flexbox + CSS grid, AI agent runtime, distributed swarm with CRDTs, time-travel debugging, session recording, sandboxed REPL, and agentic commerce.

Current section

Files

Jump to
raxol docs examples guides 03_components_and_layout components visualization README.md
Raw

docs/examples/guides/03_components_and_layout/components/visualization/README.md

---
title: Visualization Documentation
description: Overview of visualization features in Raxol Terminal Emulator
date: 2025-06-18
author: Raxol Team
section: visualization
tags: [visualization, documentation, overview]
---
# Raxol Data Visualization Components
This directory contains documentation for the data visualization components of the Raxol framework.
## Available Components
### Chart Component
The Chart component provides a flexible and accessible way to create various chart types:
- Line charts
- Bar charts
- Pie charts
- Area charts
- Scatter plots
- Bubble charts
- Radar charts
- Candlestick charts
Features:
- Customizable styles and colors
- Accessibility built-in (keyboard navigation, ARIA attributes, screen reader support)
- Animation support
- Event handling for interactive charts
- Tooltip customization
- Performance optimized for large datasets
### TreeMap Component
The TreeMap component visualizes hierarchical data through nested rectangles, where size represents value magnitude.
Features:
- Squarified algorithm for optimal rectangle proportions
- Interactive highlighting and selection
- Customizable colors and styles
- Keyboard navigation
- Accessibility features
- Tooltips for detailed information
- Support for deep hierarchies
## Demo Application
A comprehensive demo application is available that showcases the visualization components. It includes:
- Examples of different chart types with customization options
- TreeMap visualizations with interactive features
- Performance monitoring tools integration
- Accessibility demonstration
## Getting Started
### Basic Chart Example
```typescript
import { Chart, ChartOptions } from "raxol/components/visualization/Chart";
const container = document.getElementById("chart-container");
const options: ChartOptions = {
type: "line",
title: "Monthly Revenue",
series: [
{
name: "Revenue",
data: [
{ x: "Jan", y: 50 },
{ x: "Feb", y: 60 },
{ x: "Mar", y: 75 },
{ x: "Apr", y: 65 },
],
},
],
accessibility: {
description: "Line chart showing monthly revenue trends",
},
};
const chart = new Chart(container, options);
```
### Basic TreeMap Example
```typescript
import {
TreeMap,
TreeMapOptions,
} from "raxol/components/visualization/TreeMap";
const container = document.getElementById("treemap-container");
const options: TreeMapOptions = {
root: {
id: "root",
name: "Categories",
value: 0,
children: [
{ id: "cat1", name: "Category 1", value: 500 },
{ id: "cat2", name: "Category 2", value: 300 },
{ id: "cat3", name: "Category 3", value: 200 },
],
},
accessibility: {
description: "TreeMap showing distribution of categories by value",
},
};
const treemap = new TreeMap(container, options);
```
## Performance Considerations
- Charts and TreeMaps utilize advanced caching with exceptional performance gains:
- **Chart Rendering**: 5,852.9x average speedup for cached renders
- **TreeMap Visualization**: 15,140.4x average speedup for cached renders
- Memory optimizations include time-based cache expiration and LRU eviction policy
- Double-buffering technique prevents UI flicker during complex renders
- Virtual scrolling for handling extremely large datasets (50,000+ points)
- Performance marks are included to monitor rendering times
- Integration with Raxol's jank detection system
- Options for disabling animations when working with large data sets
## Accessibility Features
All visualization components are built with accessibility in mind:
- ARIA attributes for screen readers
- Keyboard navigation support
- High contrast mode compatibility
- Text alternatives for visual information
- Announcements for data point interactions
## Future Development
Planned enhancements for the visualization components:
- Additional chart types (gantt, heatmap, etc.)
- Interactive data explorer component
- Dashboard layout system
- Data-driven animations
- Advanced filtering and drill-down capabilities