FlowFuse / node-red-dashboard

https://dashboard.flowfuse.com
Apache License 2.0
206 stars 49 forks source link

Chart x-axis time units increment every 29 minutes #371

Open Paul-Reed opened 12 months ago

Paul-Reed commented 12 months ago

Although the datapoints are all set 'on the hour', the chart x-axis time is incremented every 29 minutes, and not 30 minutes, is that expected?

chart

Here is a quick 2 node flow to demo.

[{"id":"6b707a6fe7d33591","type":"ui-chart","z":"03cd1d2be26baaa9","group":"d21047917f769370","name":"","label":"chart","order":9007199254740991,"chartType":"line","category":"index","categoryType":"property","xAxisProperty":"","xAxisPropertyType":"msg","xAxisType":"time","yAxisProperty":"","ymin":"","ymax":"","showLegend":true,"removeOlder":1,"removeOlderUnit":"3600","removeOlderPoints":"","colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"width":"22","height":"7","className":"","x":890,"y":420,"wires":[[]]},{"id":"22b8545c2044439c","type":"inject","z":"03cd1d2be26baaa9","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[{\"index\":\"feelsLike\",\"y\":6.21,\"x\":\"2023-11-23T22:00:00Z\"},{\"index\":\"feelsLike\",\"y\":5.31,\"x\":\"2023-11-23T23:00:00Z\"},{\"index\":\"feelsLike\",\"y\":4.41,\"x\":\"2023-11-24T00:00:00Z\"},{\"index\":\"feelsLike\",\"y\":3.41,\"x\":\"2023-11-24T01:00:00Z\"},{\"index\":\"feelsLike\",\"y\":2.81,\"x\":\"2023-11-24T02:00:00Z\"},{\"index\":\"feelsLike\",\"y\":2.45,\"x\":\"2023-11-24T03:00:00Z\"},{\"index\":\"feelsLike\",\"y\":1.97,\"x\":\"2023-11-24T04:00:00Z\"},{\"index\":\"feelsLike\",\"y\":1.52,\"x\":\"2023-11-24T05:00:00Z\"},{\"index\":\"feelsLike\",\"y\":1.47,\"x\":\"2023-11-24T06:00:00Z\"},{\"index\":\"feelsLike\",\"y\":1.13,\"x\":\"2023-11-24T07:00:00Z\"},{\"index\":\"feelsLike\",\"y\":1.11,\"x\":\"2023-11-24T08:00:00Z\"},{\"index\":\"feelsLike\",\"y\":0.98,\"x\":\"2023-11-24T09:00:00Z\"},{\"index\":\"feelsLike\",\"y\":1.26,\"x\":\"2023-11-24T10:00:00Z\"},{\"index\":\"feelsLike\",\"y\":1.6,\"x\":\"2023-11-24T11:00:00Z\"},{\"index\":\"feelsLike\",\"y\":1.92,\"x\":\"2023-11-24T12:00:00Z\"},{\"index\":\"feelsLike\",\"y\":2.1,\"x\":\"2023-11-24T13:00:00Z\"},{\"index\":\"feelsLike\",\"y\":1.71,\"x\":\"2023-11-24T14:00:00Z\"},{\"index\":\"feelsLike\",\"y\":1.2,\"x\":\"2023-11-24T15:00:00Z\"},{\"index\":\"feelsLike\",\"y\":0.57,\"x\":\"2023-11-24T16:00:00Z\"},{\"index\":\"feelsLike\",\"y\":0.08,\"x\":\"2023-11-24T17:00:00Z\"},{\"index\":\"feelsLike\",\"y\":-0.2,\"x\":\"2023-11-24T18:00:00Z\"},{\"index\":\"feelsLike\",\"y\":-0.45,\"x\":\"2023-11-24T19:00:00Z\"},{\"index\":\"feelsLike\",\"y\":-0.54,\"x\":\"2023-11-24T20:00:00Z\"},{\"index\":\"feelsLike\",\"y\":-0.58,\"x\":\"2023-11-24T21:00:00Z\"},{\"index\":\"feelsLike\",\"y\":-0.99,\"x\":\"2023-11-24T22:00:00Z\"},{\"index\":\"feelsLike\",\"y\":-1.22,\"x\":\"2023-11-24T23:00:00Z\"},{\"index\":\"feelsLike\",\"y\":-1.68,\"x\":\"2023-11-25T00:00:00Z\"},{\"index\":\"feelsLike\",\"y\":-1.89,\"x\":\"2023-11-25T01:00:00Z\"},{\"index\":\"feelsLike\",\"y\":-2.07,\"x\":\"2023-11-25T02:00:00Z\"},{\"index\":\"feelsLike\",\"y\":-2.32,\"x\":\"2023-11-25T03:00:00Z\"},{\"index\":\"feelsLike\",\"y\":-2.38,\"x\":\"2023-11-25T04:00:00Z\"},{\"index\":\"feelsLike\",\"y\":-2.34,\"x\":\"2023-11-25T05:00:00Z\"},{\"index\":\"feelsLike\",\"y\":-2.17,\"x\":\"2023-11-25T06:00:00Z\"},{\"index\":\"feelsLike\",\"y\":-2.01,\"x\":\"2023-11-25T07:00:00Z\"},{\"index\":\"feelsLike\",\"y\":-1.76,\"x\":\"2023-11-25T08:00:00Z\"},{\"index\":\"feelsLike\",\"y\":-1.13,\"x\":\"2023-11-25T09:00:00Z\"},{\"index\":\"maxTemp\",\"y\":9.68,\"x\":\"2023-11-23T22:00:00Z\"},{\"index\":\"maxTemp\",\"y\":9.19,\"x\":\"2023-11-23T23:00:00Z\"},{\"index\":\"maxTemp\",\"y\":8.54,\"x\":\"2023-11-24T00:00:00Z\"},{\"index\":\"maxTemp\",\"y\":7.87,\"x\":\"2023-11-24T01:00:00Z\"},{\"index\":\"maxTemp\",\"y\":7.14,\"x\":\"2023-11-24T02:00:00Z\"},{\"index\":\"maxTemp\",\"y\":6.56,\"x\":\"2023-11-24T03:00:00Z\"},{\"index\":\"maxTemp\",\"y\":6.16,\"x\":\"2023-11-24T04:00:00Z\"},{\"index\":\"maxTemp\",\"y\":5.88,\"x\":\"2023-11-24T05:00:00Z\"},{\"index\":\"maxTemp\",\"y\":5.45,\"x\":\"2023-11-24T06:00:00Z\"},{\"index\":\"maxTemp\",\"y\":5.27,\"x\":\"2023-11-24T07:00:00Z\"},{\"index\":\"maxTemp\",\"y\":5.02,\"x\":\"2023-11-24T08:00:00Z\"},{\"index\":\"maxTemp\",\"y\":5.01,\"x\":\"2023-11-24T09:00:00Z\"},{\"index\":\"maxTemp\",\"y\":5.36,\"x\":\"2023-11-24T10:00:00Z\"},{\"index\":\"maxTemp\",\"y\":5.82,\"x\":\"2023-11-24T11:00:00Z\"},{\"index\":\"maxTemp\",\"y\":6.11,\"x\":\"2023-11-24T12:00:00Z\"},{\"index\":\"maxTemp\",\"y\":6.2,\"x\":\"2023-11-24T13:00:00Z\"},{\"index\":\"maxTemp\",\"y\":6.13,\"x\":\"2023-11-24T14:00:00Z\"},{\"index\":\"maxTemp\",\"y\":5.86,\"x\":\"2023-11-24T15:00:00Z\"},{\"index\":\"maxTemp\",\"y\":5.3,\"x\":\"2023-11-24T16:00:00Z\"},{\"index\":\"maxTemp\",\"y\":4.59,\"x\":\"2023-11-24T17:00:00Z\"},{\"index\":\"maxTemp\",\"y\":4.15,\"x\":\"2023-11-24T18:00:00Z\"},{\"index\":\"maxTemp\",\"y\":3.85,\"x\":\"2023-11-24T19:00:00Z\"},{\"index\":\"maxTemp\",\"y\":3.42,\"x\":\"2023-11-24T20:00:00Z\"},{\"index\":\"maxTemp\",\"y\":3.28,\"x\":\"2023-11-24T21:00:00Z\"},{\"index\":\"maxTemp\",\"y\":3.17,\"x\":\"2023-11-24T22:00:00Z\"},{\"index\":\"maxTemp\",\"y\":2.78,\"x\":\"2023-11-24T23:00:00Z\"},{\"index\":\"maxTemp\",\"y\":2.56,\"x\":\"2023-11-25T00:00:00Z\"},{\"index\":\"maxTemp\",\"y\":2.31,\"x\":\"2023-11-25T01:00:00Z\"},{\"index\":\"maxTemp\",\"y\":2.11,\"x\":\"2023-11-25T02:00:00Z\"},{\"index\":\"maxTemp\",\"y\":1.93,\"x\":\"2023-11-25T03:00:00Z\"},{\"index\":\"maxTemp\",\"y\":1.7,\"x\":\"2023-11-25T04:00:00Z\"},{\"index\":\"maxTemp\",\"y\":1.62,\"x\":\"2023-11-25T05:00:00Z\"},{\"index\":\"maxTemp\",\"y\":1.71,\"x\":\"2023-11-25T06:00:00Z\"},{\"index\":\"maxTemp\",\"y\":1.73,\"x\":\"2023-11-25T07:00:00Z\"},{\"index\":\"maxTemp\",\"y\":1.93,\"x\":\"2023-11-25T08:00:00Z\"},{\"index\":\"maxTemp\",\"y\":2.6,\"x\":\"2023-11-25T09:00:00Z\"},{\"index\":\"minTemp\",\"y\":9.05,\"x\":\"2023-11-23T22:00:00Z\"},{\"index\":\"minTemp\",\"y\":8.5,\"x\":\"2023-11-23T23:00:00Z\"},{\"index\":\"minTemp\",\"y\":7.82,\"x\":\"2023-11-24T00:00:00Z\"},{\"index\":\"minTemp\",\"y\":7.13,\"x\":\"2023-11-24T01:00:00Z\"},{\"index\":\"minTemp\",\"y\":6.52,\"x\":\"2023-11-24T02:00:00Z\"},{\"index\":\"minTemp\",\"y\":6.14,\"x\":\"2023-11-24T03:00:00Z\"},{\"index\":\"minTemp\",\"y\":5.85,\"x\":\"2023-11-24T04:00:00Z\"},{\"index\":\"minTemp\",\"y\":5.42,\"x\":\"2023-11-24T05:00:00Z\"},{\"index\":\"minTemp\",\"y\":5.2,\"x\":\"2023-11-24T06:00:00Z\"},{\"index\":\"minTemp\",\"y\":4.99,\"x\":\"2023-11-24T07:00:00Z\"},{\"index\":\"minTemp\",\"y\":4.78,\"x\":\"2023-11-24T08:00:00Z\"},{\"index\":\"minTemp\",\"y\":4.87,\"x\":\"2023-11-24T09:00:00Z\"},{\"index\":\"minTemp\",\"y\":4.99,\"x\":\"2023-11-24T10:00:00Z\"},{\"index\":\"minTemp\",\"y\":5.34,\"x\":\"2023-11-24T11:00:00Z\"},{\"index\":\"minTemp\",\"y\":5.8,\"x\":\"2023-11-24T12:00:00Z\"},{\"index\":\"minTemp\",\"y\":6.07,\"x\":\"2023-11-24T13:00:00Z\"},{\"index\":\"minTemp\",\"y\":5.85,\"x\":\"2023-11-24T14:00:00Z\"},{\"index\":\"minTemp\",\"y\":5.29,\"x\":\"2023-11-24T15:00:00Z\"},{\"index\":\"minTemp\",\"y\":4.56,\"x\":\"2023-11-24T16:00:00Z\"},{\"index\":\"minTemp\",\"y\":4.11,\"x\":\"2023-11-24T17:00:00Z\"},{\"index\":\"minTemp\",\"y\":3.77,\"x\":\"2023-11-24T18:00:00Z\"},{\"index\":\"minTemp\",\"y\":3.33,\"x\":\"2023-11-24T19:00:00Z\"},{\"index\":\"minTemp\",\"y\":3.24,\"x\":\"2023-11-24T20:00:00Z\"},{\"index\":\"minTemp\",\"y\":3.08,\"x\":\"2023-11-24T21:00:00Z\"},{\"index\":\"minTemp\",\"y\":2.74,\"x\":\"2023-11-24T22:00:00Z\"},{\"index\":\"minTemp\",\"y\":2.51,\"x\":\"2023-11-24T23:00:00Z\"},{\"index\":\"minTemp\",\"y\":2.29,\"x\":\"2023-11-25T00:00:00Z\"},{\"index\":\"minTemp\",\"y\":2.09,\"x\":\"2023-11-25T01:00:00Z\"},{\"index\":\"minTemp\",\"y\":1.92,\"x\":\"2023-11-25T02:00:00Z\"},{\"index\":\"minTemp\",\"y\":1.69,\"x\":\"2023-11-25T03:00:00Z\"},{\"index\":\"minTemp\",\"y\":1.62,\"x\":\"2023-11-25T04:00:00Z\"},{\"index\":\"minTemp\",\"y\":1.49,\"x\":\"2023-11-25T05:00:00Z\"},{\"index\":\"minTemp\",\"y\":1.52,\"x\":\"2023-11-25T06:00:00Z\"},{\"index\":\"minTemp\",\"y\":1.65,\"x\":\"2023-11-25T07:00:00Z\"},{\"index\":\"minTemp\",\"y\":1.71,\"x\":\"2023-11-25T08:00:00Z\"},{\"index\":\"minTemp\",\"y\":1.85,\"x\":\"2023-11-25T09:00:00Z\"},{\"index\":\"temperature\",\"y\":9.19,\"x\":\"2023-11-23T22:00:00Z\"},{\"index\":\"temperature\",\"y\":8.54,\"x\":\"2023-11-23T23:00:00Z\"},{\"index\":\"temperature\",\"y\":7.87,\"x\":\"2023-11-24T00:00:00Z\"},{\"index\":\"temperature\",\"y\":7.14,\"x\":\"2023-11-24T01:00:00Z\"},{\"index\":\"temperature\",\"y\":6.56,\"x\":\"2023-11-24T02:00:00Z\"},{\"index\":\"temperature\",\"y\":6.16,\"x\":\"2023-11-24T03:00:00Z\"},{\"index\":\"temperature\",\"y\":5.88,\"x\":\"2023-11-24T04:00:00Z\"},{\"index\":\"temperature\",\"y\":5.45,\"x\":\"2023-11-24T05:00:00Z\"},{\"index\":\"temperature\",\"y\":5.27,\"x\":\"2023-11-24T06:00:00Z\"},{\"index\":\"temperature\",\"y\":5.02,\"x\":\"2023-11-24T07:00:00Z\"},{\"index\":\"temperature\",\"y\":4.87,\"x\":\"2023-11-24T08:00:00Z\"},{\"index\":\"temperature\",\"y\":4.99,\"x\":\"2023-11-24T09:00:00Z\"},{\"index\":\"temperature\",\"y\":5.34,\"x\":\"2023-11-24T10:00:00Z\"},{\"index\":\"temperature\",\"y\":5.8,\"x\":\"2023-11-24T11:00:00Z\"},{\"index\":\"temperature\",\"y\":6.07,\"x\":\"2023-11-24T12:00:00Z\"},{\"index\":\"temperature\",\"y\":6.13,\"x\":\"2023-11-24T13:00:00Z\"},{\"index\":\"temperature\",\"y\":5.86,\"x\":\"2023-11-24T14:00:00Z\"},{\"index\":\"temperature\",\"y\":5.3,\"x\":\"2023-11-24T15:00:00Z\"},{\"index\":\"temperature\",\"y\":4.59,\"x\":\"2023-11-24T16:00:00Z\"},{\"index\":\"temperature\",\"y\":4.15,\"x\":\"2023-11-24T17:00:00Z\"},{\"index\":\"temperature\",\"y\":3.85,\"x\":\"2023-11-24T18:00:00Z\"},{\"index\":\"temperature\",\"y\":3.42,\"x\":\"2023-11-24T19:00:00Z\"},{\"index\":\"temperature\",\"y\":3.28,\"x\":\"2023-11-24T20:00:00Z\"},{\"index\":\"temperature\",\"y\":3.17,\"x\":\"2023-11-24T21:00:00Z\"},{\"index\":\"temperature\",\"y\":2.78,\"x\":\"2023-11-24T22:00:00Z\"},{\"index\":\"temperature\",\"y\":2.56,\"x\":\"2023-11-24T23:00:00Z\"},{\"index\":\"temperature\",\"y\":2.31,\"x\":\"2023-11-25T00:00:00Z\"},{\"index\":\"temperature\",\"y\":2.11,\"x\":\"2023-11-25T01:00:00Z\"},{\"index\":\"temperature\",\"y\":1.93,\"x\":\"2023-11-25T02:00:00Z\"},{\"index\":\"temperature\",\"y\":1.7,\"x\":\"2023-11-25T03:00:00Z\"},{\"index\":\"temperature\",\"y\":1.62,\"x\":\"2023-11-25T04:00:00Z\"},{\"index\":\"temperature\",\"y\":1.52,\"x\":\"2023-11-25T05:00:00Z\"},{\"index\":\"temperature\",\"y\":1.69,\"x\":\"2023-11-25T06:00:00Z\"},{\"index\":\"temperature\",\"y\":1.71,\"x\":\"2023-11-25T07:00:00Z\"},{\"index\":\"temperature\",\"y\":1.85,\"x\":\"2023-11-25T08:00:00Z\"},{\"index\":\"temperature\",\"y\":2.58,\"x\":\"2023-11-25T09:00:00Z\"}]","payloadType":"json","x":710,"y":420,"wires":[["6b707a6fe7d33591"]]},{"id":"d21047917f769370","type":"ui-group","name":"MetOffice Forecast","page":"af65bf7594b9e87f","width":"22","height":"9","order":-1,"disp":true,"className":""},{"id":"af65bf7594b9e87f","type":"ui-page","name":"Weather","ui":"789c65a14af5d124","path":"/","layout":"grid","theme":"a965ccfef139317a","order":-1,"className":""},{"id":"789c65a14af5d124","type":"ui-base","name":"dashboard","path":"/dashboard"},{"id":"a965ccfef139317a","type":"ui-theme","name":"Default","colors":{"surface":"#ffffff","primary":"#0094ce","bgPage":"#eeeeee","groupBg":"#ffffff","groupOutline":"#cccccc"}}]
joepavitt commented 12 months ago

This is (currently) under the complete control of ChartJS, we don't have any explicit behaviour defined for this behaviour. Would need some investigation.