Working with Charts

Charts help you understand your data by revealing trends, patterns, comparisons, and relationships that are difficult to spot in raw tables.

Rawlytics Notebook can display interactive charts directly from a notebook cell using the notebook.chart() method. Charts can be created from JavaScript arrays, DataFrames, or datasets, making it easy to visualize data at every stage of your analysis.

Creating Charts

Create a chart by calling notebook.chart() with tabular data.

notebook.chart(table)

The method renders the chart directly in the output area of the current notebook cell.

You can create charts from:

Because charts are regular notebook outputs, they become part of the notebook and are saved together with your analysis.

Preparing Data for Charts

Most charts are created after filtering, transforming, grouping, or aggregating data. These operations are often performed using DataFrames before the results are visualized.

A typical workflow looks like this:

For example, you might group sales by month, calculate conversion rates by channel, or summarize page views by country before creating a visualization.

Customizing Charts

A chart can be customized by providing an optional configuration object to notebook.chart().

notebook.chart(table, options)

Choosing the Right Chart Type

Different chart types are suited to different kinds of analysis.

ChartBest used for
areaShowing trends while emphasizing cumulative values or volume
barComparing categories
bubblesComparing three variables (x, y, and size)
columnComparing values across groups
lineTrends over time
pieShowing proportions of a whole
scatterExploring relationships between variables

Choosing an appropriate chart often makes insights easier to identify than simply changing colors or styling.

notebook.chart(table, { type: 'line' })

Configuring Chart Components

Depending on the chart type, you can configure elements such as:

Rawlytics Notebook uses Google Charts to render visualizations, providing access to a wide range of chart types and customization options.

Charts Are Read-Only Outputs

Charts are visual representations of your data.

Charts are generated from the data available when the cell is executed. If the underlying array or DataFrame changes, simply run the cell again to display an updated visualization.

This behavior keeps notebook execution predictable and reproducible.