forked from fixin.me/fixin.me
Add Plotly line charts view to Measurements page
Users can now switch to a Charts view that renders a separate time-series line chart for each tracked quantity, using Plotly.js loaded via CDN. Charts are sorted chronologically and styled to match the app palette. A dedicated toggle button and matching CSS visibility rules mirror the existing Compact/Wide view pattern. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
0
app/assets/images/pictograms/chart-line.svg
Normal file
0
app/assets/images/pictograms/chart-line.svg
Normal file
@@ -111,6 +111,11 @@ svg {
|
||||
svg:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
.chart-panel svg {
|
||||
height: auto;
|
||||
margin: 0;
|
||||
width: auto;
|
||||
}
|
||||
textarea {
|
||||
margin: 0;
|
||||
}
|
||||
@@ -656,16 +661,30 @@ li::marker {
|
||||
overflow-x: auto;
|
||||
}
|
||||
body[data-measurements-view=wide] .measurements-compact,
|
||||
body[data-measurements-view=compact] .measurements-wide {
|
||||
body[data-measurements-view=wide] .measurements-charts,
|
||||
body[data-measurements-view=compact] .measurements-wide,
|
||||
body[data-measurements-view=compact] .measurements-charts,
|
||||
body[data-measurements-view=charts] .measurements-compact,
|
||||
body[data-measurements-view=charts] .measurements-wide {
|
||||
display: none;
|
||||
}
|
||||
body[data-measurements-view=compact] .view-toggle[data-view=compact],
|
||||
body[data-measurements-view=wide] .view-toggle[data-view=wide] {
|
||||
body[data-measurements-view=wide] .view-toggle[data-view=wide],
|
||||
body[data-measurements-view=charts] .view-toggle[data-view=charts] {
|
||||
background-color: var(--color-blue);
|
||||
border-color: var(--color-blue);
|
||||
color: white;
|
||||
fill: white;
|
||||
}
|
||||
.measurements-charts {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 1em;
|
||||
}
|
||||
.chart-panel {
|
||||
flex: 1 1 400px;
|
||||
min-width: 300px;
|
||||
}
|
||||
#measurements tr.grouped td {
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user