LineChart

A highly customizable line chart wrapper for Chart.js.

Basic Usage

By default, the `LineChart` component renders a placeholder dataset showing weekly traffic.

Weekly Traffic

Custom Data

You can pass custom `data` and `options` to fully customize the line chart, including multiple datasets and custom scales.

Traffic Acquisition

API Reference

Property
Description
Type
Default

class

Additional CSS classes to apply to the chart container. string -

title

The title of the chart displayed at the top. string -

tension

The bezier curve tension of the line. Set to 0 to draw straight lines. number 0.4

data

A valid Chart.js data object. ChartData<'line'> -

options

A valid Chart.js options object. ChartOptions<'line'> -