Appearance
SeriesReducer
SeriesReducer
can be used either as a composable or a renderless component. It is responsible for discovering the the minimum and maximum values of X and Y given several data sets. It also provides processedDataSets
which injects the aggregate domains onto the individual series. Generally you can just use processedDataSets
directly as they will have the orignal plot information with the added aggregate domain information.
html
...
<SeriesReducer data-sets="...">
<template #default="{processedDataSets}">
// processedDataSets has your original data with calculated // aggregate
domains as well as decimated points ...
</template>
</SeriesReducer>
...
Props
name | type | default | required | description |
---|---|---|---|---|
dataSets | DataSet | N/A | 🗹 | the datasets to process, normally all of them |
absoluteScale | boolean | true | ☐ | when true, ensures the aggregate domains include the origin (0,0) |
inactiveDataSets | number[] | [] | ☐ | A list of integers representing which series have been deactivated |
maxPoints | number | 1000 | ☐ | any points provided beyond this will trigger teh LTTB decimatior to downsample points |
Slots
default
prop | type | comment |
---|---|---|
aggregateX | Domain | the aggregate x domain for all data in dataSets |
aggregateY | Domain | the aggregate y domain for all data in dataSets |
processedDataSets | DataSet [] | The same dataSets as provided in the prop above but with their x and y domains set to the aggregate domains |