Line Chart

A line chart is a graphical representation that connects one or more series of data points with a continuous line.

Read more Read less

Custom tooltips are unsupported for now.

Attribute Type Documentation Default Value
id :string The id of the chart "linechart"
width :integer The width of the chart. The chart will be resized to fit the available width before rendering 640
height :integer The height of the chart. The chart will be resized to fit the availabe height before rendering 320
margin_top :integer The top margin of the chart. Applied to the y axis range 20
margin_right :integer The right margin of the chart. Applied to the x axis range 20
margin_bottom :integer The bottom margin of the chart. Applied to the y axis range 30
margin_left :integer The left margin of the chart. Applied to the x axis range 50
x_axis_margin :integer The margin between x axis labels and the x axis line 20
y_axis_width :integer The width of the y axis labels 60
x_axis_label :string The label of the x axis
y_axis_label :string The label of the y axis
x_axis_type :string The type of the x axis values. Can be 'linear', 'time' or 'date' "date"
x_axis_format :string A format to apply to the x axis values. See d3-format for more information "%b %Y"
y_axis_format :string A format to apply to the y axis values. See d3-format for more information "(,.0f"
y_axis_ticks :integer The minimum number of ticks on the y axis 5
x_axis_ticks :integer The minimum number of ticks on the x axis
x_axis_label_offset :integer The offset of the x axis label 32
y_axis_label_offset :integer The offset of the y axis label 30
x_axis_text_offset :integer The y-offset of the x axis ticks from the x axis line 16
y_axis_text_offset :integer The x-offset of the y axis ticks from the y axis line 8
legend_height :integer The height of the legend 44
Required index * :string The index of the data. This determines which value is used to create the x axis
Required data * :list The data to display on the chart
Required categories * :list The categories to display on the chart
colors :list The colors to use for each category []
class :string css classes to apply to the chart wrapper container
rest :global