Terminal Charts with Victory CLI

August 29, 2016

> The ability to collect, analyze, triangulate and visualize vast amounts of data in real time is something the human race has never had before. > -Rick Smolan After pushing out `webpack-dashboard` and seeing how much people enjoy terminal based tooling, I thought perhaps I should see what else I can explore in this space. [Formidable](/)’s ReactJS based data visualization library [Victory](/open-source/victory/) seemed like an awesome candidate for a command line render target. I saw a project, [hyperchart](https://github.com/mathisonian/hyperchart), by Matthew Conlen, that allowed users to generate interactive Victory charts into [hyperterm-window](https://github.com/mathisonian/hyperterm-window). This looked awesome, but I was looking for a way to expand the feature set and operate in a broader range of TERMs. I had also seen some ascii/ansi style visualizations in [blessed-contrib](https://github.com/yaronn/blessed-contrib) while building `webpack-dashboard`, and they seemed super cool, but porting would be too much of a challenge given the differences in APIs. Of course, ascii/ansi style charts didn’t seem practical for the mainstream use case. Then I realized something, Victory outputs valid SVG markup. This, coupled with `ReactDOM.renderToString` actually makes command line chart generation really easy. I got to work on it, and today I’m happy to announce the initial release of [Victory CLI](https://github.com/FormidableLabs/victory-cli)! Victory CLI is an easy to use command line interface for generating and displaying Victory based data visualizations. It can: * Render a variety of chart types * Use built in themes * Render to PNG * Render to SVG * Display PNG renders in iTerm3 * Take a custom JSON data input * Take a custom component script input to render from Check it out in action: ![Victory Command Line Interface displaying Victory based data visualizations](https://res.cloudinary.com/formidablelabs/image/upload/f\_auto,q\_auto/v1675121564/dotcom/assets-uploads-2016-08-cli) If you think this is cool and want to give it a try just `npm install -g victory-cli` and head over to [https://github.com/FormidableLabs/victory-cli\](https://github.com/FormidableLabs/victory-cli) to get started!

Related Posts

The Evolution of urql

December 6, 2022
As Formidable and urql evolve, urql has grown to be a project that is driven more by the urql community, including Phil and Jovi, than by Formidable itself. Because of this, and our commitment to the ethos of OSS, we are using this opportunity to kick off what we’re calling Formidable OSS Partnerships.

Third-party Packages in Sanity Studio V2

November 15, 2022
To get around our "modern language features" issue, we can tweak the Sanity Webpack configuration so that it uses babel to transpile the library files for our third-party libraries that are causing us problems.

What the Hex?

October 24, 2022
If you’re a designer or frontend developer, chances are you’ve happened upon hex color codes (such as `#ff6d91`). Have you ever wondered what the hex you’re looking at when working with hex color codes? In this post we’re going to break down these hex color codes and how they relate to RGB colors.