Skip to content

Enhance trend subcommand with bar charts, line graphs, and trend indicators#32

Merged
CallMeGreg merged 5 commits intomainfrom
copilot/improve-trend-visualization
Mar 24, 2026
Merged

Enhance trend subcommand with bar charts, line graphs, and trend indicators#32
CallMeGreg merged 5 commits intomainfrom
copilot/improve-trend-visualization

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 24, 2026

Description

This PR overhauls the trend subcommand to make language trend results more visually appealing and easier to follow. The new output clearly shows which languages are rising or falling year over year through four complementary visualization sections:

New Visualizations

  1. Trend Summary Table — A high-level view of each top language with color-coded trend indicators (▲ rising in green, ▼ falling in red, ● unchanged in gray) and year-over-year change values.

  2. Horizontal Bar Chart — A visual bar chart comparison of language counts for the most recent year, using pterm's built-in BarChartPrinter with distinct colors per language.

  3. Multi-series Line Graph — An ASCII line chart powered by the new asciigraph library, showing how each language's adoption trajectory changes across years. Supports colored series lines and a legend.

  4. Year-by-Year Breakdown — Enhanced per-year detail tables that now include trend direction (▲/▼/●) and signed YoY change compared to the prior year.

Mockup

Below is a mockup showing all four sections with sample data:

trend-mockup

Changes

  • New dependency: github.com/guptarohit/asciigraph v0.8.1 for multi-series ASCII line graphs
  • cmd/trend.go: Refactored into focused rendering functions (renderTrendSummary, renderBarChart, renderLineGraph, renderYearTables) with helpers (trendIndicator, topLanguageNames, barColors, graphColors)
  • README.md: Updated trend command documentation with descriptions of all four visualization sections

Security

  • No vulnerabilities found (CodeQL clean, asciigraph dependency checked against GitHub Advisory DB)

Release Type

  • Major - Breaking changes
  • Minor - New features, backwards compatible
  • Patch - Bug fixes, backwards compatible

Copilot AI and others added 2 commits March 24, 2026 12:20
…cators

- Add asciigraph dependency for multi-series ASCII line charts
- Add trend summary table with color-coded ▲/▼/● indicators and YoY change
- Add horizontal bar chart (pterm) for most recent year's top languages
- Add multi-series line graph showing language trajectories over time
- Enhance year-by-year detail tables with trend indicators
- Update README with new trend command documentation

Co-authored-by: CallMeGreg <110078080+CallMeGreg@users.noreply.github.com>
Agent-Logs-Url: https://github.com/CallMeGreg/gh-language/sessions/b7e04ac5-70e4-4e93-86f7-1a2433f7a590
@CallMeGreg CallMeGreg marked this pull request as ready for review March 24, 2026 14:25
@CallMeGreg CallMeGreg merged commit 7d73a55 into main Mar 24, 2026
4 checks passed
@CallMeGreg CallMeGreg deleted the copilot/improve-trend-visualization branch March 24, 2026 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants