mirror of
https://github.com/ConnectedHumber/Air-Quality-Web
synced 2024-11-22 06:23:01 +00:00
[client/device-graph] Add pretty colour
This commit is contained in:
parent
27e8602354
commit
a4ab7a0e61
2 changed files with 4 additions and 2 deletions
|
@ -69,6 +69,8 @@ class DeviceReadingDisplay {
|
|||
data: {
|
||||
labels: data.map((point) => point.t),
|
||||
datasets: [{
|
||||
borderColor: "hsl(184, 69%, 40%)",
|
||||
backgroundColor: "hsla(188, 53%, 46%, 0.58)",
|
||||
label: this.reading_type.friendly_text,
|
||||
data
|
||||
}]
|
||||
|
@ -110,7 +112,7 @@ class DeviceReadingDisplay {
|
|||
|
||||
return new_data.map((data_point) => { return {
|
||||
t: moment(data_point.datetime),
|
||||
y: data_point.value
|
||||
y: Math.round(data_point.value*10000)/10000
|
||||
}});
|
||||
}
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ class LayerDeviceMarkers {
|
|||
// Create the popup
|
||||
let popup = L.popup({
|
||||
className: "popup-device",
|
||||
maxWidth: 640,
|
||||
maxWidth: 720,
|
||||
autoPanPadding: L.point(100, 100)
|
||||
}).setContent("⌛ Loading..."); // TODO: Display a nice loading animation here
|
||||
marker.on("popupopen", this.marker_popup_open_handler.bind(this, device.id));
|
||||
|
|
Loading…
Reference in a new issue