[client/device-graph] Add pretty colour

pull/26/head
Starbeamrainbowlabs 4 years ago
parent 27e8602354
commit a4ab7a0e61
Signed by: sbrl
GPG Key ID: 1BE5172E637709C2
  1. 4
      client_src/js/DeviceReadingDisplay.mjs
  2. 2
      client_src/js/LayerDeviceMarkers.mjs

@ -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…
Cancel
Save