Skip to content

Commit

Permalink
Fix incorrectly rounded displayed data volume (#934)
Browse files Browse the repository at this point in the history
  • Loading branch information
defagos authored Jul 11, 2024
1 parent 38ea05e commit a3e532a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Demo/Sources/Metrics/DataVolumeChart.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ struct DataVolumeChart: View {
Chart(Array(metrics.suffix(limit).enumerated()), id: \.offset) { metrics in
BarMark(
x: .value("Index", metrics.offset),
y: .value("Data volume (\(Self.megabytes)", metrics.element.increment.numberOfBytesTransferred / 1_000_000),
y: .value("Data volume (\(Self.megabytes)", Double(metrics.element.increment.numberOfBytesTransferred) / 1_000_000),
width: .inset(1)
)
.foregroundStyle(.cyan)
Expand Down

0 comments on commit a3e532a

Please sign in to comment.