ChartView
ChartView copied to clipboard
valueSpecifier not working on MultiLineChartView
I am unable to change the default valueSpecifier for the MultiLineChartView. It shows percentage no matter what I do.
Description
MultiLineChartView(
data: [(device.voltageMeasurements, GradientColors.green)],
title: "Voltage",
form: ChartForm.extraLarge,
valueSpecifier: "%.2f V"
)
Expected Behavior
I would expect the MultiLineChartView to show the value formatted with the provided valueSpecifier.
Actual Behavior
It shows the value with the default valueSpecifier.

Steps to Reproduce
class Device: ObservableObject {
@Published var voltageMeasurements: [Double] = [41, 42, 42.5, 39.9, 41.2]
}
struct TestView: View {
@ObservedObject var device = Device()
var body: some View {
MultiLineChartView(
data: [(device.voltageMeasurements, GradientColors.green)],
title: "Voltage",
form: ChartForm.extraLarge,
valueSpecifier: "%.2f V"
)
}
}
Your Environment
- Version of this package used: 1.5.4
- Device/Simulator: iPhone X
- Operating System and version: iOS 14.0 (18A5342e)