### Install TTY::Pie Gem Source: https://github.com/piotrmurach/tty-pie/blob/master/README.md Instructions for installing the TTY::Pie gem using Bundler or directly via the gem command. This is the first step to using the library in a Ruby project. ```ruby gem "tty-pie" ``` ```bash $ bundle ``` ```bash $ gem install tty-pie ``` -------------------------------- ### Build Real-time Data Visualization Dashboard with TTY::Pie Source: https://context7.com/piotrmurach/tty-pie/llms.txt Shows a complete example of building a terminal dashboard with TTY::Pie, including real-time data updates. This example visualizes browser market share and simulates dynamic changes, re-rendering the pie chart to create a live-updating display. It utilizes screen clearing (`\e[H\e[J`) for a smooth update effect. ```ruby require "tty-pie" # Market share visualization market_data = [ { name: "Chrome", value: 65, color: :bright_green, fill: "#" }, { name: "Safari", value: 18, color: :bright_blue, fill: "=" }, { name: "Firefox", value: 10, color: :bright_yellow, fill: "*" }, { name: "Edge", value: 5, color: :bright_cyan, fill: "+" }, { name: "Other", value: 2, color: :bright_magenta, fill: "." } ] pie = TTY::Pie.new( data: market_data, radius: 8, legend: { left: 6, line: 1, format: "%