Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V1.18.0: Line charts with comple data in payload no more working #1383

Closed
m-schaeffler opened this issue Oct 11, 2024 · 2 comments
Closed

V1.18.0: Line charts with comple data in payload no more working #1383

m-schaeffler opened this issue Oct 11, 2024 · 2 comments

Comments

@m-schaeffler
Copy link
Contributor

Current Behavior

charts with a complete dataset in the payload are drawn empty with alkso a strange scaling of the time axis:
v18 0 0_Database
and
v18 0 0_Energy

I had to vert to v1.17.1 because those charts are crucial for my application.

Expected Behavior

Line charts with comple data in payload working as in v1.17.1
Test flow:
v1 17 1_Database
other chart:
v1 17 1_Energy

Steps To Reproduce

try this flow:
[{"id":"39c4b3151ba5a5c3","type":"ui-chart","z":"8a529076413cb26a","group":"1aa8388d568444ce","name":"Diagramm","label":"","order":9,"chartType":"line","category":"c","categoryType":"property","xAxisLabel":"","xAxisProperty":"t","xAxisPropertyType":"msg","xAxisType":"time","xAxisFormat":"","xAxisFormatType":"auto","yAxisLabel":"","yAxisProperty":"v","ymin":"","ymax":"","action":"replace","stackSeries":false,"pointShape":"circle","pointRadius":4,"showLegend":true,"removeOlder":"24","removeOlderUnit":"3600","removeOlderPoints":"","colors":["#ffff00","#ff8000","#0080c0","#2ca02c","#d62728","#98df8a","#ff9896","#9467bd","#c5b0d5"],"textColor":["#c4c4c4"],"textColorDefault":false,"gridColor":["#e5e5e5"],"gridColorDefault":true,"width":"12","height":"12","className":"","x":1190,"y":780,"wires":[[]]},{"id":"0af770dff75277ee","type":"debug","z":"8a529076413cb26a","name":"debug 2","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1280,"y":740,"wires":[]},{"id":"9d40d874a6edd230","type":"inject","z":"8a529076413cb26a","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"[{\"c\":\"PV\",\"t\":1728597696901,\"v\":0},{\"c\":\"VNB\",\"t\":1728597763909,\"v\":-6},{\"c\":\"VNB\",\"t\":1728598048118,\"v\":4},{\"c\":\"PV\",\"t\":1728598097130,\"v\":0},{\"c\":\"VNB\",\"t\":1728598248177,\"v\":9}]","payloadType":"json","x":1140,"y":680,"wires":[["0af770dff75277ee","39c4b3151ba5a5c3"]]},{"id":"1aa8388d568444ce","type":"ui-group","name":"Leistung","page":"abcfc8e4f23f361a","width":"12","height":"1","order":1,"showTitle":true,"className":"","visible":"true","disabled":"false"},{"id":"abcfc8e4f23f361a","type":"ui-page","name":"Datenbank","ui":"fd06eabec55c4e5d","path":"/database","icon":"database-outline","layout":"flex","theme":"a965ccfef139317a","order":4,"className":"","visible":"true","disabled":"false"},{"id":"fd06eabec55c4e5d","type":"ui-base","name":"Dashboard 2.0","path":"/dashboard","includeClientData":true,"acceptsClientConfig":["ui-notification","ui-control"],"showPathInSidebar":false,"navigationStyle":"default","titleBarStyle":"fixed"},{"id":"a965ccfef139317a","type":"ui-theme","name":"Default","colors":{"surface":"#6db046","primary":"#32cd32","bgPage":"#000000","groupBg":"#333333","groupOutline":"#616161"},"sizes":{"pagePadding":"12px","groupGap":"12px","groupBorderRadius":"4px","widgetGap":"12px"}}]

Environment

  • Dashboard version: 1.18.0
  • Node-RED version: 4.0.5
  • Node.js version:
  • npm version:
  • Platform/OS: RaspberryOs
  • Browser: Firefox Win10

Have you provided an initial effort estimate for this issue?

I am not a FlowFuse team member

@m-schaeffler m-schaeffler added bug Something isn't working needs-triage Needs looking at to decide what to do labels Oct 11, 2024
@Steve-Mcl
Copy link
Contributor

Your demo flow has x property type set as msg - therefore it is attempting to get a value from msg.t. This should be set to key t.

"xAxisProperty":"t","xAxisPropertyType":"msg"

There is a reason this has only just started happening: Prior to V1.18, the ui-chart did not bother to evaluate msg but instead evaluated the key (so it was in effect broken before V1.18 and now operates correctly)

#1325

fixes x-axis msg.xxx evaluation. Previously it was using the simple getProperty and trying to get msg.payload.payload.x now it uses the RED util function to correctly evaluate the prop

the commit: 52ce831#diff-36360db4b6c6b65247d8650917b80c5d3b4f42d0582f8bde259079399119b056R109-L106

@Steve-Mcl Steve-Mcl removed bug Something isn't working needs-triage Needs looking at to decide what to do labels Oct 12, 2024
@m-schaeffler
Copy link
Contributor Author

Yes, you are totally right.
After the fix, everything ist working fine.

That this hast every worked is really strange.

@github-project-automation github-project-automation bot moved this from Backlog to Done in Dashboard Backlog Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

2 participants