Because x is the first column in the dataset, an explicit x prop is not required.
This structure also gives you control over the individual series on your chart. For example, if you have a single series running through a component, you can override props specifically for that series. Since the FDA acronym was not fully capitalized above, you can rename that specific series inside the <Line> primitive:
Excel-style format | built-in format name | custom format name
yLog
Whether to use a log scale for the y-axis
Options:
yLog=true
Click to Copy
yLog=false
Click to Copy
Default:
false
yLogBase
Base to use when log scale is enabled
Options:
number
Default:
10
emptySet
Sets behaviour for empty datasets. Can throw an error, a warning, or allow empty. When set to 'error', empty datasets will block builds in build:strict. Note this only applies to initial page load - empty datasets caused by input component changes (dropdowns, etc.) are allowed.
Options:
emptySet=error
Click to Copy
emptySet=warn
Click to Copy
emptySet=pass
Click to Copy
Default:
error
emptyMessage
Text to display when an empty dataset is received - only applies when emptySet is 'warn' or 'pass', or when the empty dataset is a result of an input component change (dropdowns, etc.).
Swap the x and y axes to create a horizontal chart
Options:
swapXY=true
Click to Copy
swapXY=false
Click to Copy
Default:
false
title
Chart title. Appears at top left of chart.
Options:
string
subtitle
Chart subtitle. Appears just under title.
Options:
string
legend
Turns legend on or off. Legend appears at top center of chart.
Options:
legend=true
Click to Copy
legend=false
Click to Copy
Default:
true for multiple series
chartAreaHeight
Minimum height of the chart area (excl. header and footer) in pixels. Adjusting the height affects all viewport sizes and may impact the mobile UX.
Options:
number
Default:
180
xAxisTitle
Name to show under x-axis. If 'true', formatted column name is used. Only works with swapXY=false
Options:
xAxisTitle=true
Click to Copy
xAxisTitle=string
Click to Copy
xAxisTitle=false
Click to Copy
Default:
false
yAxisTitle
Name to show beside y-axis. If 'true', formatted column name is used.
Options:
yAxisTitle=true
Click to Copy
yAxisTitle=string
Click to Copy
yAxisTitle=false
Click to Copy
Default:
false
xGridlines
Turns on/off gridlines extending from x-axis tick marks (vertical lines when swapXY=false)
Options:
xGridlines=true
Click to Copy
xGridlines=false
Click to Copy
Default:
false
yGridlines
Turns on/off gridlines extending from y-axis tick marks (horizontal lines when swapXY=false)
Options:
yGridlines=true
Click to Copy
yGridlines=false
Click to Copy
Default:
true
xAxisLabels
Turns on/off value labels on the x-axis
Options:
xAxisLabels=true
Click to Copy
xAxisLabels=false
Click to Copy
Default:
true
yAxisLabels
Turns on/off value labels on the y-axis
Options:
yAxisLabels=true
Click to Copy
yAxisLabels=false
Click to Copy
Default:
true
xBaseline
Turns on/off thick axis line (line appears at y=0)
Options:
xBaseline=true
Click to Copy
xBaseline=false
Click to Copy
Default:
true
yBaseline
Turns on/off thick axis line (line appears directly alongside the y-axis labels)
Options:
yBaseline=true
Click to Copy
yBaseline=false
Click to Copy
Default:
false
xTickMarks
Turns on/off tick marks for each of the x-axis labels
Options:
xTickMarks=true
Click to Copy
xTickMarks=false
Click to Copy
Default:
false
yTickMarks
Turns on/off tick marks for each of the y-axis labels
Options:
yTickMarks=true
Click to Copy
yTickMarks=false
Click to Copy
Default:
false
yMin
Starting value for the y-axis
Options:
number
yMax
Maximum value for the y-axis
Options:
number
yScale
Whether to scale the y-axis to fit your data. yMin and yMax take precedence over yScale
Options:
yScale=true
Click to Copy
yScale=false
Click to Copy
Default:
false
options
JavaScript object to add or override chart configuration settings (see Custom Charts page)
Options:
object
colorPalette
Array of custom colours to use for the chart. E.g., {['#cf0d06','#eb5752','#e88a87']}
Options:
array of color strings (CSS name | hexademical | RGB | HSL)
Default:
built-in color palette
seriesColors
Apply a specific color to each series in your chart. Unspecified series will receive colors from the built-in palette as normal. Note the double curly braces required in the syntax
Mixed type charts can include annotations using the ReferenceLine and ReferenceArea components. These components are used within a chart component like so: