Skip to main content

FunctionSeries

Display

Restriction

You must specify the horizontal domain to use FunctionSeries otherwise the plot will not be displayed (next example)

To set the horizontal domain use one of these options :
  • Add horizontal Axis and determine max and min props
    <Axis min={0} max={20} position="bottom" />
  • Add another Series to the plot. It will automatically specify the domain of horizontal axis

Data

In FunctionSeries we don't have data props we just need to precise our function using getY callback

Example:

We want to display y=f(x), where f is a declared function getY={(x)=>f(x)}

Props

Like all other series, function series have Base props
They also have other props that we can class into the following categories :

1. Function

  • getY: (Mandatory) function that you want to display
    type: (x:number)=>number

2. Lines

  • lineStyle: styling of the serie's path static or dynamic depending on series id
    type: CSSFuncProps<{id}>
    default: false