Support new chart parameter: interpolation#3920
Conversation
Signed-off-by: Holger Friedrich <[email protected]>
mueller-ma
left a comment
There was a problem hiding this comment.
So interpolation is a new Sitemap chart parameter that just needs to be added to the URL when getting charts from the server? It case this change would be fine, however since the last release of the app, @maniac103 implemented client-side charts, which should also use this new parameter.
|
Yes, exactly, this is a new parameter to be appended to the URL. I don't know about then new client-side rendering. Maybe @maniac103 could give me some guidance. |
|
It seems that the client side chart library doesn't support interpolation and it needs to be done manually before sending the values to the chart. |
It does: there's |
c8c16f0 to
064c514
Compare
Signed-off-by: Holger Friedrich <[email protected]>
064c514 to
92565c1
Compare
|
@mueller-ma Should we split this up and fix the server side charts first? @maniac103 I don't see how I could implement the client-side charts. Would you be willing to guide me, or could you take over the implementation? We still have a few showstoppers for the OH5.0 release to resolve. |
|
@holgerfriedrich Yes, I can complete this PR, assuming I can push to your branch. |
|
Thanks a lot. I added you as a collaborator. |
Signed-off-by: Danny Baumann <[email protected]>
Signed-off-by: Danny Baumann <[email protected]>
|
@holgerfriedrich I added the client side rendering handling. It's untested for now though, as {
"widgetId": "030404",
"type": "Chart",
"visibility": true,
"label": "Füllstand Zisterne (Liter) [5643 l]",
"labelSource": "ITEM_LABEL",
"icon": "cistern",
"staticIcon": false,
"pattern": "%d l",
"unit": "",
"mappings": [
],
"refresh": 1800000,
"service": "influxdb",
"period": "3D",
"item": {
"link": "http://192.168.100.10:8080/rest/items/CisternFillingLiter",
"state": "5643.00",
"stateDescription": {
"minimum": 0.0,
"maximum": 1.0E+8,
"pattern": "%d l",
"readOnly": true,
"options": [
]
},
"lastState": "5638.00",
"lastStateUpdate": 1753096820370,
"lastStateChange": 1753096820370,
"type": "Number",
"name": "CisternFillingLiter",
"label": "Füllstand Zisterne (Liter)",
"category": "cistern",
"tags": [
"Measurement",
"Water"
],
"groupNames": [
"CisternFillSensor",
"GroupPersistenceChartable"
]
},
"widgets": [
]
}This is with no explicit interpolation set. I tried to set interpolation (via UI), but Main UI doesn't save the page once I've done that. (FWIW, openhab/openhab-core#4610 not making any changes to |
|
@maniac103 I seems I forgot to follow up on this PR. I just briefly checked the commit log of the app, but I have not found that this was resolved. Correct? |
|
@holgerfriedrich Correct. The code still seems fine, but what's missing is testing it against a server that actually sends the |
|
Thanks for the feedback. I will give it a try the next days then 👍 - I did not have a dev environment for Android until now. |
|
The current code in this PR expects |
What do you mean by that? The locally rendered charts should use (roughly) the same colors as the server side rendered ones. |
Signed-off-by: Holger Friedrich <[email protected]>
|
Yeah, got it! The only problem I see now is that for "undefined" the defaults differ (server side: linear, client side: step). Will have a look later. (btw: the blue color above was just to make sure that I have really built and deployed my code. I have removed it now.) |
Signed-off-by: Holger Friedrich <[email protected]>
|
Ok, the default is now linear also for the client side rendering. PR is ready for review 🎉 |






Support new core feature openhab/openhab-core#4610
Partly fixes openhab/openhab-webui#3277
This is totally untested, I don't have proper dev setup at hand.