[client/device-graph] Add pretty colour

This commit is contained in:
Starbeamrainbowlabs 2019-01-20 21:23:44 +00:00
parent 27e8602354
commit a4ab7a0e61
Signed by: sbrl
GPG key ID: 1BE5172E637709C2
2 changed files with 4 additions and 2 deletions

View file

@ -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
}});
}

View file

@ -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));