Skip to content
On this page

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

nametypedefaultrequireddescription
dataSetsDataSetN/A🗹the datasets to process, normally all of them
absoluteScalebooleantruewhen true, ensures the aggregate domains include the origin (0,0)
inactiveDataSetsnumber[][]A list of integers representing which series have been deactivated
maxPointsnumber1000any points provided beyond this will trigger teh LTTB decimatior to downsample points

Slots

default

proptypecomment
aggregateXDomainthe aggregate x domain for all data in dataSets
aggregateYDomainthe aggregate y domain for all data in dataSets
processedDataSetsDataSet[]The same dataSets as provided in the prop above but with their x and y domains set to the aggregate domains

Released under the MIT License.