Reference documentation for the Lightdash React SDK, used for Embedding.
Lightdash.Dashboard
component in your desired location to mount the Lightdash dashboard.
<Lightdash.Dashbaord/>
component to match the surrounding page better. Some styles will cascade, but some charts and components set things like font-family
explicitly, so it is necessary to pass them to the component. Supported style overrides are:
fontFamily
- which will set all fonts within the dashboard to the specified font family. Note that only font family will be updated; font sizes and other properties will be preserved.backgroundColor
- sets the background for the dashboard (not the tiles). This can be set to any color or transparent
.styles
object passed to the dashboard. For example:
<Lightdash.Dashbaord/>
to filter dimensions by values. Filters are passed as an array to the dashboard like this:
field
- the name of the dimension to filter bymodel
- the model the dimension is a part ofoperator
- the fitler operator, specified with the FilterOperator
enumvalue
- the value or values to fitler against. Some opperators, such as IN_BETWEEN
expect an array, others take only a valuei18next
to handle translation parameters and generate translation objects dynamically. See below for an example.--language-map
flag:
<file name>.language.map.yml
file containing a nested object and its existing translatable strings. Here’s a simple dashboard language map:
contentOverrides
prop, the specified translations will be made. We suggest using i18Next
to load translations, specify a language and produce the translation object (with getResoruceBundle
):
i18Next
can be set up to fetch translations, but it can be set up to fetch translations directly from Locize or another language server.