The loadData function is one of the most powerful functions in the Embeddable SDK. It enables component builders (that’s you) to easily load data to populate your components (charts and controls, etc.), while giving your team, using the no-code builder, the freedom to freely choose exactly which data to show in your component.

This is the key to building powerful, re-usable components in Embeddable.

The loadData function takes the following parameters:

Param Type Required Default value
from Dataset Yes
dimensions array of Dimension No, but at least one measure or dimension must be specified []
measures array of Measure No, but at least one measure or dimension must be specified []
timeDimensions array of TimeDimension No []
orderBy array of OrderBy No none
limit number No 100
offset number No 0
filters array of QueryFilter No []

You can effectively think of loadData like performing an SQL statement (as that’s literally what it will do behind the scenes):

SELECT <timeDimensions>, <dimensions>, <measures>
FROM <dataset>
WHERE <filters on dimensions>
GROUP BY <timeDimensions>, <dimensions>
HAVING <filters on measures>
ORDER BY <orderBy>
LIMIT <limit>
OFFSET <offset>

Types

The types expected by the loadData(…) function are:

Example