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

Delayed Reading fix #12

Closed
apearson opened this issue Mar 28, 2018 · 1 comment
Closed

Delayed Reading fix #12

apearson opened this issue Mar 28, 2018 · 1 comment

Comments

@apearson
Copy link
Owner

Delayed reading of data needs to be accounted for. The delay is determined by the rules inside the series.

Will most likely need to check for the existent of rules on both requests, if either of them have a ruleset. Then parse the rules array and pull out all bad data indexes and mark them as undefined or some other indicator.

In this example the index 1 is the delayed reading and needs to be undefined.

{"graphset":[{"background-color":"transparent","plotarea":{"margin":"10 50 50 50"},"chart":{},"scale-x":{"zooming":true,"zoom-to":[1,7],"line-color":"#CFCFCF","values":[0,1],"labels":["26","27"],"font-angle":0,"guide":{"alpha":0,"visible":true},"offset-end":"3px","offset-start":"3px","tick":{"alpha":0,"visible":false},"alpha":1,"items-overlap":true,"decimals":0,"font-color":"#646464","label":{"font-weight":"300","font-family":"Open Sans","font-color":"#646464","alpha":1}},"scroll-x":{"handle":{"background-color":"#215b9e","border-width":"5px","alpha":1},"bar":{"background-color":"transparent","alpha":"0.4","height":"27px"},"zoom-to":0},"scale-y":{"min-value":"0","format":"%v","zooming":false,"line-color":"#CFCFCF","font-angle":270,"guide":{"alpha":1,"line-color":"#CFCFCF","line-style":"solid","visible":true},"offset-end":"5px","tick":{"alpha":0,"visible":false},"alpha":1,"items-overlap":false,"decimals":0,"font-color":"#646464","label":{"font-family":"Open
Sans","font-color":"#646464","alpha":1,"font-angle":270,"text":"kWh"}},"scale-y-2":{"format":"%v°","zooming":false,"values":"35:80:5","font-angle":90,"guide":{"alpha":0,"visible":false},"offset-end":"55px","tick":{"alpha":0,"visible":false},"alpha":0,"items-overlap":false,"decimals":0,"font-color":"#646464","label":{"font-family":"Open Sans","font-color":"#646464","alpha":1,"font-angle":90,"text":"Outside Temperature"}},"type":"mixed","font-family":"Open Sans","series":[{"type":"area","values":[[-1.0,8.0],[0.0,8.0],[2.0,8.0]],"font-family":"Open Sans","background-color":"transparent","marker":{"type":"none","shadow":false,"background-repeat":false},"legend-item":{"visible":false},"line-width":"0px","stacked":"false","data-dateTime":[],"tooltip":{"visible":false,"decimals":0},"legend-marker":{"visible":false}},{"type":"bar","scales":"scale-x,scale-y","values":[[0,8.0],[1,8.0]],"text":"Regular Usage","font-family":"Open Sans","background-color":"#94c955","legend-item":{"visible":false},"rules":[{"rule":"%i == 1","background-color":"#FFFFFF","border-color":"#C8C8C8","border-width":"2px","tooltip":{"visible":true,"decimals":0},"tooltip-text":"Delayed Reading","font-color":"#646464"}],"tooltip-text":"Weekdays","data-dateTime":[],"tooltip":{"visible":true,"decimals":0},"legend-marker":{"visible":false}},{"type":"area","scales":"scale-x,scale-y-2","values":[[0,54.0],[1,69.0]],"text":"High Temp","font-family":"Open Sans","gradient-colors":"#ef881f transparent transparent","gradient-stops":"0.1 0.3 0.9","line-color":"#ef881f","border-color":"#D52B1E","marker":{"type":"none","shadow":false,"background-repeat":false},"legend-item":{"visible":true},"line-width":"2px","stacked":"false","tooltip-text":"High Temp","data-dateTime":[],"aspect":"spline","tooltip":{"visible":true,"decimals":0},"legend-marker":{"visible":true}},{"type":"area","scales":"scale-x,scale-y-2","values":[[0,49.0],[1,48.0]],"text":"Low Temp","font-family":"Open Sans","gradient-colors":"#01a3e4 transparent transparent","gradient-stops":"0.2 0.3 0.9","line-color":"#01a3e4","border-color":"#4060AF","marker":{"type":"none","shadow":false,"background-repeat":false},"legend-item":{"visible":true},"line-width":"2px","stacked":"false","tooltip-text":"Low Temp","data-dateTime":[],"aspect":"spline","tooltip":{"visible":true,"decimals":0},"legend-marker":{"visible":true}}],"labels":[],"arrows":[],"plot":{"stacked":true,"hover-state":{"visible":false}},"images":[]}],"gui":{"behaviors":[{"id":"ShowAll","enabled":"none"},{"id":"ViewSource","enabled":"none"},{"id":"3D","enabled":"none"},{"id":"BugReport","enabled":"none"},{"id":"About","enabled":"none"},{"id":"FullScreen","enabled":"none"},{"id":"Print","enabled":"none"},{"id":"Reload","enabled":"none"},{"id":"LogScale","enabled":"none"},{"id":"SaveAsImage","enabled":"none"},{"id":"DownloadPDF","enabled":"none"},{"id":"DownloadSVG","enabled":"none"}],"context-menu[mobile]":{"button":{"visible":false,"background-color":"transparent","alpha":0,"border-radius":0},"gear":{"visible":false,"alpha":0}}}}
@apearson
Copy link
Owner Author

Looks like the fix works correctly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant