RelationalAI is named a Cool Vendor in the May 2022 Gartner Cool Vendors in Augmented Data Management report.

Build Vega-Lite Charts with Rel

Mary McGrath

19 October 2021

less than a minute read

We are excited to announce enhanced Rel language support for Vega-Lite in the RAI Console.

Rel now provides high-level utilities for common chart types, including bar charts, line charts, and scatter charts. We have added convenience relations making it much easier to build these interactive charts from your data.

We have two Rel visualization libraries: the Vega Visualization Library and the Vega-Lite Visualization Library. The Vega-Lite library includes templates and utilities to help you plot your own bar, line, scatter, and custom charts.

As an example, the following code can be run in a RAI Notebook to display a simple bar chart:

def data:letter = {(1, "A"); (2, "B"); (3, "C")}
def data:number = {(1, 24); (2, 67); (3, 43)}

def chart = vegalite:bar[:letter, :number, {:data, data}]
def output = vegalite:plot[chart]

This will display as below:

For more information about the new convenience relations for Vega-Lite, refer to our Data Visualization (Vega-Lite) guide.

Related Posts

Get Early Access

Join our community, keep up to date with the latest developments in our monthly newsletter, and get early access to RelationalAI.