diff --git a/bundles/org.openhab.ui/doc/components/oh-aggregate-series.md b/bundles/org.openhab.ui/doc/components/oh-aggregate-series.md
index 5b5a41654f..41b537b270 100644
--- a/bundles/org.openhab.ui/doc/components/oh-aggregate-series.md
+++ b/bundles/org.openhab.ui/doc/components/oh-aggregate-series.md
@@ -43,6 +43,16 @@ prev: /docs/ui/components/
The identifier of the persistence service to retrieve the data from. Leave blank to the use the default.
+
+
+ Do not get one value before and after the requested period and move them to the start and end of the period
+
+
+
+
+ Do not add the current Item state into the requested period (the item state will be before or at the end time)
+
+
Offset to subtract from the displayed period, use if you want to do period comparisons (see also Offset Unit).
diff --git a/bundles/org.openhab.ui/doc/components/oh-calendar-series.md b/bundles/org.openhab.ui/doc/components/oh-calendar-series.md
index b66e33a209..30eb250688 100644
--- a/bundles/org.openhab.ui/doc/components/oh-calendar-series.md
+++ b/bundles/org.openhab.ui/doc/components/oh-calendar-series.md
@@ -43,6 +43,16 @@ prev: /docs/ui/components/
The identifier of the persistence service to retrieve the data from. Leave blank to the use the default.
+
+
+ Do not get one value before and after the requested period and move them to the start and end of the period
+
+
+
+
+ Do not add the current Item state into the requested period (the item state will be before or at the end time)
+
+
Offset to subtract from the displayed period, use if you want to do period comparisons (see also Offset Unit).
diff --git a/bundles/org.openhab.ui/doc/components/oh-time-series.md b/bundles/org.openhab.ui/doc/components/oh-time-series.md
index ebf09d2dcf..1c6708e981 100644
--- a/bundles/org.openhab.ui/doc/components/oh-time-series.md
+++ b/bundles/org.openhab.ui/doc/components/oh-time-series.md
@@ -43,6 +43,16 @@ prev: /docs/ui/components/
The identifier of the persistence service to retrieve the data from. Leave blank to the use the default.
+
+
+ Do not get one value before and after the requested period and move them to the start and end of the period
+
+
+
+
+ Do not add the current Item state into the requested period (the item state will be before or at the end time)
+
+
Offset to subtract from the displayed period, use if you want to do period comparisons (see also Offset Unit).
diff --git a/bundles/org.openhab.ui/web/src/assets/definitions/widgets/chart/index.js b/bundles/org.openhab.ui/web/src/assets/definitions/widgets/chart/index.js
index 23e5006f55..273152581a 100644
--- a/bundles/org.openhab.ui/web/src/assets/definitions/widgets/chart/index.js
+++ b/bundles/org.openhab.ui/web/src/assets/definitions/widgets/chart/index.js
@@ -62,6 +62,10 @@ const yAxisIndexParameter = pn('yAxisIndex', 'Y Axis Index', 'The index of the Y
const persistenceServiceParameter = pt('service', 'Persistence Service', 'The identifier of the persistence service to retrieve the data from. Leave blank to the use the default.')
.c('persistenceService').a()
+const boundaryParameter = pb('noBoundary', 'Don\'t Include Boundary', 'Do not get one value before and after the requested period and move them to the start and end of the period').a()
+
+const itemStateParameter = pb('noItemState', 'Don\'t Include Item State', 'Do not add the current Item state into the requested period (the item state will be before or at the end time)').a()
+
const offsetAmountParameter = pn('offsetAmount', 'Offset Amount', 'Offset to subtract from the displayed period, use if you want to do period comparisons (see also Offset Unit).').a()
const offsetUnitParameter = pt('offsetUnit', 'Offset Unit', 'Offset to subtract from the displayed period, use if you want to do period comparisons (see also Offset Amount).')
@@ -92,6 +96,8 @@ const seriesParameters = [
nameParameter,
itemParameter,
persistenceServiceParameter,
+ boundaryParameter,
+ itemStateParameter,
offsetAmountParameter,
offsetUnitParameter
]
diff --git a/bundles/org.openhab.ui/web/src/components/widgets/chart/chart-mixin.js b/bundles/org.openhab.ui/web/src/components/widgets/chart/chart-mixin.js
index 9e95b32130..1090ceffe7 100644
--- a/bundles/org.openhab.ui/web/src/components/widgets/chart/chart-mixin.js
+++ b/bundles/org.openhab.ui/web/src/components/widgets/chart/chart-mixin.js
@@ -153,7 +153,7 @@ export default {
return Promise.resolve(getter([]))
}
- let boundary = seriesComponents[component.component].includeBoundary?.(component)
+ const boundary = seriesComponents[component.component].includeBoundary?.(component) || component.config.noBoundary !== true
const itemPromises = neededItems.map((neededItem) => {
if (this.items[neededItem]) return Promise.resolve(this.items[neededItem])
return this.$oh.api.get(`/rest/items/${neededItem}`).then((item) => {
@@ -175,7 +175,8 @@ export default {
serviceId,
starttime: seriesStartTime.toISOString(),
endtime: seriesEndTime.subtract(1, 'millisecond').toISOString(),
- boundary
+ boundary,
+ itemState: component.config.noItemState !== true
}
return Promise.all([itemPromises[neededItem], this.$oh.api.get(url, query)])
diff --git a/bundles/org.openhab.ui/web/src/components/widgets/chart/series/oh-aggregate-series.js b/bundles/org.openhab.ui/web/src/components/widgets/chart/series/oh-aggregate-series.js
index 734d2357a4..233669c965 100644
--- a/bundles/org.openhab.ui/web/src/components/widgets/chart/series/oh-aggregate-series.js
+++ b/bundles/org.openhab.ui/web/src/components/widgets/chart/series/oh-aggregate-series.js
@@ -17,7 +17,7 @@ function dimensionFromDate (d, dimension, invert) {
}
function includeBoundaryFor (component) {
- return (!component || !component.config || component.config.aggregationFunction !== 'diff_last') ? undefined : true
+ return (!component || !component.config || component.config.aggregationFunction === 'diff_last') ? true : undefined
}
export default {