Working with Charts

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

Rawlytics Notebook displays charts directly in the output area of a notebook cell, allowing you to visualize your data throughout your analysis.

Creating Charts

Create a chart by calling notebook.plot() with a chart configuration object.

notebook.plot(config);

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

You can create charts from:

  • JavaScript arrays
  • DataFrames
  • Data retrieved from notebook datasets

In most cases, charts are created after filtering, transforming, grouping or aggregating data. These operations are typically performed using a DataFrame before the results are visualized.

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

Building a Configuration Object

Charts are configured using a single configuration object.

var config = {
  type: 'line',
  labels: [...],
  datasets: [
    {
      label: 'Revenue',
      data: [...]
    }
  ]
};

notebook.plot(config);

The configuration object defines:

  • the chart type
  • the displayed labels
  • one or more datasets
  • optional axis settings
  • optional markers
  • additional display options

See the Plot Configuration Reference for the complete list of supported properties.

Charts Are Read-Only Outputs

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.