mirror of
https://github.com/ConnectedHumber/Air-Quality-Web
synced 2024-11-25 06:53:00 +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: {
|
data: {
|
||||||
labels: data.map((point) => point.t),
|
labels: data.map((point) => point.t),
|
||||||
datasets: [{
|
datasets: [{
|
||||||
|
borderColor: "hsl(184, 69%, 40%)",
|
||||||
|
backgroundColor: "hsla(188, 53%, 46%, 0.58)",
|
||||||
label: this.reading_type.friendly_text,
|
label: this.reading_type.friendly_text,
|
||||||
data
|
data
|
||||||
}]
|
}]
|
||||||
|
@ -110,7 +112,7 @@ class DeviceReadingDisplay {
|
||||||
|
|
||||||
return new_data.map((data_point) => { return {
|
return new_data.map((data_point) => { return {
|
||||||
t: moment(data_point.datetime),
|
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
|
// Create the popup
|
||||||
let popup = L.popup({
|
let popup = L.popup({
|
||||||
className: "popup-device",
|
className: "popup-device",
|
||||||
maxWidth: 640,
|
maxWidth: 720,
|
||||||
autoPanPadding: L.point(100, 100)
|
autoPanPadding: L.point(100, 100)
|
||||||
}).setContent("⌛ Loading..."); // TODO: Display a nice loading animation here
|
}).setContent("⌛ Loading..."); // TODO: Display a nice loading animation here
|
||||||
marker.on("popupopen", this.marker_popup_open_handler.bind(this, device.id));
|
marker.on("popupopen", this.marker_popup_open_handler.bind(this, device.id));
|
||||||
|
|
Loading…
Reference in a new issue