Skip to content

Commit

Permalink
Fixed right margin of bar and line to not obscure the slider
Browse files Browse the repository at this point in the history
  • Loading branch information
hinyan17 committed Oct 20, 2024
1 parent dcee05c commit cfefe8c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/client/app/components/BarChartComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export default function BarChartComponent() {
data={datasets}
style={{ width: '100%', height: '100%', minHeight: '700px' }}
layout={{
margin: { t: 0, b: 0, r: 0 }, // Eliminate top, bottom, and right margins
margin: { t: 0, b: 0, r: 3 }, // Eliminate top, bottom, and right margins
barmode: (barStacking ? 'stack' : 'group'),
bargap: 0.2, // Gap between different times of readings
bargroupgap: 0.1, // Gap between different meter's readings under the same timestamp
Expand Down
2 changes: 1 addition & 1 deletion src/client/app/components/LineChartComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export default function LineChartComponent() {
data={data}
style={{ width: '100%', height: '100%', minHeight: '700px' }}
layout={{
margin: { t: 0, b: 0, r: 0 }, // Eliminate top, bottom, and right margins
margin: { t: 0, b: 0, r: 3 }, // Eliminate top, bottom, and right margins
autosize: true, showlegend: true,
legend: { x: 0, y: 1.1, orientation: 'h' },
// 'fixedrange' on the yAxis means that dragging is only allowed on the xAxis which we utilize for selecting dateRanges
Expand Down

0 comments on commit cfefe8c

Please sign in to comment.