diff --git a/Charts.xcodeproj/project.pbxproj b/Charts.xcodeproj/project.pbxproj index dc4108ab83..82daddc7eb 100644 --- a/Charts.xcodeproj/project.pbxproj +++ b/Charts.xcodeproj/project.pbxproj @@ -28,6 +28,7 @@ 146EE16342C2BADC92E45BF2 /* LineScatterCandleRadarChartDataSetProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9249AD9AEC8C85772365A128 /* LineScatterCandleRadarChartDataSetProtocol.swift */; }; 17E994DA88777AA1D8CCFC58 /* BarChartDataSet.swift in Sources */ = {isa = PBXBuildFile; fileRef = C31AA65EA27776F8C653C7E8 /* BarChartDataSet.swift */; }; 219192CA6B4895319AB49DCA /* BarLineScatterCandleBubbleRenderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B1C588E9DF6FFD56D7ADF8E /* BarLineScatterCandleBubbleRenderer.swift */; }; + 21E5B0C72586949100A44F37 /* Platform+Geometry.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21E5B0C62586949100A44F37 /* Platform+Geometry.swift */; }; 221CA2922588FCBC00C2DD1E /* Sequence+KeyPath.swift in Sources */ = {isa = PBXBuildFile; fileRef = 221CA2912588FCBC00C2DD1E /* Sequence+KeyPath.swift */; }; 2243BBFD1FF156EC00B49D0B /* EquatableTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2243BBFB1FF156D000B49D0B /* EquatableTests.swift */; }; 22786E8525CD96620051335B /* Media.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 22786E8325CD96620051335B /* Media.xcassets */; }; @@ -202,6 +203,7 @@ 1F3D55A7E6176D52DC957D27 /* XAxisRendererHorizontalBarChart.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = XAxisRendererHorizontalBarChart.swift; path = Source/Charts/Renderers/XAxisRendererHorizontalBarChart.swift; sourceTree = ""; }; 2194AA554712E6BA2677F114 /* BubbleChartRenderer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BubbleChartRenderer.swift; path = Source/Charts/Renderers/BubbleChartRenderer.swift; sourceTree = ""; }; 219BC9CEA037F897E92E45D1 /* ScatterChartDataSetProtocol.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ScatterChartDataSetProtocol.swift; path = Source/Charts/Data/Interfaces/ScatterChartDataSetProtocol.swift; sourceTree = ""; }; + 21E5B0C62586949100A44F37 /* Platform+Geometry.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "Platform+Geometry.swift"; path = "Source/Charts/Utils/Platform+Geometry.swift"; sourceTree = ""; }; 221CA2912588FCBC00C2DD1E /* Sequence+KeyPath.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = "Sequence+KeyPath.swift"; path = "Source/Charts/Utils/Sequence+KeyPath.swift"; sourceTree = ""; }; 2243BBFB1FF156D000B49D0B /* EquatableTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EquatableTests.swift; sourceTree = ""; }; 22786E8325CD96620051335B /* Media.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Media.xcassets; sourceTree = ""; }; @@ -570,6 +572,7 @@ D2C26AC015E753014C7571E4 /* Tests */, ); sourceTree = ""; + usesTabs = 0; }; 8C531E3F3C3DE5843C93C3DA /* Charts */ = { isa = PBXGroup; @@ -659,6 +662,7 @@ 3ED23C354AFE81818D78E645 /* Platform.swift */, 97AD2D4520AF917100F9C24A /* Platform+Accessibility.swift */, C9AA36092355F01F00C97D93 /* Platform+Color.swift */, + 21E5B0C62586949100A44F37 /* Platform+Geometry.swift */, C9F3DC252355F791000C3215 /* Platform+Gestures.swift */, C9F3DC242355F791000C3215 /* Platform+Graphics.swift */, C9F3DC282355FA2F000C3215 /* Platform+Touch Handling.swift */, @@ -851,6 +855,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 21E5B0C72586949100A44F37 /* Platform+Geometry.swift in Sources */, D819331DA581C7E0AC5F8CEF /* Animator.swift in Sources */, F5A209116FAC68F5903D0B46 /* ChartAnimationEasing.swift in Sources */, D29BBEF55C9CC90114919CD2 /* BarChartView.swift in Sources */, diff --git a/Charts.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Charts.xcworkspace/xcshareddata/swiftpm/Package.resolved index f58d68807c..dcfd1f25b9 100644 --- a/Charts.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/Charts.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -1,4 +1,5 @@ { + "originHash" : "09b08963887ce6eac26952e8acb25256a8ec102f2b5528ae68a97fa296723712", "pins" : [ { "identity" : "swift-snapshot-testing", @@ -10,5 +11,5 @@ } } ], - "version" : 2 + "version" : 3 } diff --git a/ChartsDemo-iOS/Objective-C/DemoBaseViewController.m b/ChartsDemo-iOS/Objective-C/DemoBaseViewController.m index a264f2a712..089b033a08 100644 --- a/ChartsDemo-iOS/Objective-C/DemoBaseViewController.m +++ b/ChartsDemo-iOS/Objective-C/DemoBaseViewController.m @@ -153,6 +153,25 @@ - (void)handleOption:(NSString *)key forChartView:(ChartViewBase *)chartView [chartView setNeedsDisplay]; } + + if ([key isEqualToString:@"toggleBarOutline"]) + { + UIEdgeInsets inset = UIEdgeInsetsZero; + inset.right = 5; + BarChartBarValueOutline *outline1 = [[BarChartBarValueOutline alloc] initWithColor:[UIColor colorWithRed:0.85 green:0.89 blue:1 alpha:1] insets:inset]; + inset.right = 3; + BarChartBarValueOutline *outline2 = [[BarChartBarValueOutline alloc] initWithColor:[UIColor colorWithRed:0.2 green:0.32 blue:0.6 alpha:1] insets:inset]; + + for (id set in chartView.data.dataSets) + { + if ([set conformsToProtocol:@protocol(BarChartDataSetProtocol)]) + { + set.barValueOutlines = @[outline1, outline2]; + } + } + + [chartView setNeedsDisplay]; + } } #pragma mark - Actions diff --git a/ChartsDemo-iOS/Objective-C/Demos/BarChartViewController.m b/ChartsDemo-iOS/Objective-C/Demos/BarChartViewController.m index 5e1567c088..f64d3456ec 100644 --- a/ChartsDemo-iOS/Objective-C/Demos/BarChartViewController.m +++ b/ChartsDemo-iOS/Objective-C/Demos/BarChartViewController.m @@ -43,6 +43,7 @@ - (void)viewDidLoad @{@"key": @"toggleAutoScaleMinMax", @"label": @"Toggle auto scale min/max"}, @{@"key": @"toggleData", @"label": @"Toggle Data"}, @{@"key": @"toggleBarBorders", @"label": @"Show Bar Borders"}, + @{@"key": @"toggleBarOutline", @"label": @"Toggle Bar Outline"}, ]; [self setupBarLineChartView:_chartView]; diff --git a/ChartsDemo-iOS/Swift/DemoBaseViewController.swift b/ChartsDemo-iOS/Swift/DemoBaseViewController.swift index da2afe2d4e..37512028f5 100644 --- a/ChartsDemo-iOS/Swift/DemoBaseViewController.swift +++ b/ChartsDemo-iOS/Swift/DemoBaseViewController.swift @@ -50,6 +50,8 @@ enum Option { case toggleYLabels case toggleRotate case toggleHighlightCircle + //BarChart + case toggleBarOutline var label: String { switch self { @@ -91,6 +93,8 @@ enum Option { case .toggleYLabels: return "Toggle Y-Labels" case .toggleRotate: return "Toggle Rotate" case .toggleHighlightCircle: return "Toggle highlight circle" + // Bar Chart + case .toggleBarOutline: return "Toggle Bar Outline" } } } @@ -175,6 +179,30 @@ class DemoBaseViewController: UIViewController, ChartViewDelegate { } } chartView.setNeedsDisplay() + + case .toggleBarOutline: + let outline1 = BarChartBarValueOutline(color:NSUIColor.magenta) + outline1.insets.top = 5 + outline1.insets.left = 7 + outline1.insets.bottom = 2 + outline1.insets.right = 5 + let outline2 = BarChartBarValueOutline(color:NSUIColor.brown) + outline2.insets.top = 4 + outline2.insets.left = 3 + outline2.insets.bottom = 6 + outline2.insets.right = 12 + + for set in chartView.data!.dataSets { + if let set = set as? BarChartDataSet { + if set.barValueOutlines.isEmpty { + set.barValueOutlines = [outline1, outline2] + } else { + set.barValueOutlines = [BarChartBarValueOutline]() + } + } + } + chartView.setNeedsDisplay() + default: break } diff --git a/ChartsDemo-iOS/Swift/Demos/BarChartViewController.swift b/ChartsDemo-iOS/Swift/Demos/BarChartViewController.swift index 16b3837601..a9668270c8 100644 --- a/ChartsDemo-iOS/Swift/Demos/BarChartViewController.swift +++ b/ChartsDemo-iOS/Swift/Demos/BarChartViewController.swift @@ -36,7 +36,8 @@ class BarChartViewController: DemoBaseViewController { .saveToGallery, .togglePinchZoom, .toggleData, - .toggleBarBorders] + .toggleBarBorders, + .toggleBarOutline] self.setup(barLineChartView: chartView) diff --git a/Source/Charts/Data/Implementations/Standard/BarChartDataSet.swift b/Source/Charts/Data/Implementations/Standard/BarChartDataSet.swift index 999e94e443..e0ad7cb164 100644 --- a/Source/Charts/Data/Implementations/Standard/BarChartDataSet.swift +++ b/Source/Charts/Data/Implementations/Standard/BarChartDataSet.swift @@ -123,6 +123,8 @@ open class BarChartDataSet: BarLineScatterCandleBubbleChartDataSet, BarChartData /// the alpha value (transparency) that is used for drawing the highlight indicator bar. min = 0.0 (fully transparent), max = 1.0 (fully opaque) open var highlightAlpha = CGFloat(120.0 / 255.0) + open var barValueOutlines = [BarChartBarValueOutline]() + // MARK: - NSCopying open override func copy(with zone: NSZone? = nil) -> Any diff --git a/Source/Charts/Data/Interfaces/BarChartDataSetProtocol.swift b/Source/Charts/Data/Interfaces/BarChartDataSetProtocol.swift index 3ea0903cce..0f9ff84deb 100644 --- a/Source/Charts/Data/Interfaces/BarChartDataSetProtocol.swift +++ b/Source/Charts/Data/Interfaces/BarChartDataSetProtocol.swift @@ -12,6 +12,19 @@ import Foundation import CoreGraphics +@objc open class BarChartBarValueOutline: NSObject +{ + @objc public var color: NSUIColor + @objc public var insets: NSUIEdgeInsets + + @objc public init(color: NSUIColor = .black, insets: NSUIEdgeInsets = .zero) + { + self.color = color + self.insets = insets + super.init() + } +} + @objc public protocol BarChartDataSetProtocol: BarLineScatterCandleBubbleChartDataSetProtocol { @@ -39,4 +52,7 @@ public protocol BarChartDataSetProtocol: BarLineScatterCandleBubbleChartDataSetP /// array of labels used to describe the different values of the stacked bars var stackLabels: [String] { get set } + + /// the color and thickness of the bar rect-outlines. The bar rect outline is a line(s) on the edge of the value bar + var barValueOutlines: [BarChartBarValueOutline] { get set } } diff --git a/Source/Charts/Renderers/BarChartRenderer.swift b/Source/Charts/Renderers/BarChartRenderer.swift index 2aa69a828f..9d50486fae 100644 --- a/Source/Charts/Renderers/BarChartRenderer.swift +++ b/Source/Charts/Renderers/BarChartRenderer.swift @@ -356,12 +356,17 @@ open class BarChartRenderer: BarLineScatterCandleBubbleRenderer } let isSingleColor = dataSet.colors.count == 1 + var barFillColor: NSUIColor if isSingleColor { - context.setFillColor(dataSet.color(atIndex: 0).cgColor) + barFillColor = dataSet.color(atIndex: 0) } - + else //fix the compiler warning about using uninitialized value + { + barFillColor = .black + } + // In case the chart is stacked, we need to accomodate individual bars within accessibilityOrdereredElements let isStacked = dataSet.isStacked let stackSize = isStacked ? dataSet.stackSize : 1 @@ -376,18 +381,42 @@ open class BarChartRenderer: BarLineScatterCandleBubbleRenderer if !isSingleColor { // Set the color for the currently drawn value. If the index is out of bounds, reuse colors. - context.setFillColor(dataSet.color(atIndex: j).cgColor) + barFillColor = dataSet.color(atIndex: j) } - - context.fill(barRect) - + + context.saveGState() + + var maxEdgeInset: NSUIEdgeInsets = .zero + + for outline in dataSet.barValueOutlines + { + let newMaxEdgeInset = maxEdgeInset + outline.insets + let nextRectSize = barRect.inset(by: newMaxEdgeInset).size //if access width/height of the rect - always positive values + if nextRectSize.width < 1 || nextRectSize.height < 1 + { + break + } + let outlineRect = barRect.inset(by: maxEdgeInset) + context.setFillColor(outline.color.cgColor) + context.fill(outlineRect) + + maxEdgeInset = newMaxEdgeInset + } + + let barRectInsideOutline = barRect.inset(by: maxEdgeInset) + + context.setFillColor(barFillColor.cgColor) + context.fill(barRectInsideOutline) + if drawBorder { context.setStrokeColor(borderColor.cgColor) context.setLineWidth(borderWidth) - context.stroke(barRect) + context.stroke(barRectInsideOutline) } + context.restoreGState() + // Create and append the corresponding accessibility element to accessibilityOrderedElements if let chart = dataProvider as? BarChartView { @@ -483,7 +512,21 @@ open class BarChartRenderer: BarLineScatterCandleBubbleRenderer { guard let e = dataSet.entryForIndex(j) as? BarChartDataEntry else { continue } - let rect = buffer[j] + var maxEdgeInset: NSUIEdgeInsets = .zero + let barRect = buffer[j] + for outline in dataSet.barValueOutlines + { + let newMaxEdgeInset = maxEdgeInset + outline.insets + let nextRectSize = barRect.inset(by: newMaxEdgeInset).size //if access width/height of the rect - always positive values + if nextRectSize.width < 1 || nextRectSize.height < 1 + { + break + } + + maxEdgeInset = newMaxEdgeInset + } + + let rect = barRect.inset(by:maxEdgeInset) //apply insets so the text is centered in the bar let x = rect.origin.x + rect.size.width / 2.0 diff --git a/Source/Charts/Utils/Platform+Geometry.swift b/Source/Charts/Utils/Platform+Geometry.swift new file mode 100644 index 0000000000..a4ee4a5895 --- /dev/null +++ b/Source/Charts/Utils/Platform+Geometry.swift @@ -0,0 +1,113 @@ +// +// Platform+Geometry.swift +// Charts +// +// Created by Van on 31.07.2020. +// A port of MPAndroidChart for iOS +// Licensed under Apache License 2.0 +// +// https://github.com/danielgindi/Charts +// + +// MARK: - UIKit +#if canImport(UIKit) +import UIKit + +public typealias NSUIEdgeInsets = UIEdgeInsets + +extension NSUIEdgeInsets: AdditiveArithmetic +{ + public static func - (lhs: UIEdgeInsets, rhs: UIEdgeInsets) -> UIEdgeInsets + { + return NSUIEdgeInsets(top: lhs.top - rhs.top, + left: lhs.left - rhs.left, + bottom: lhs.bottom - rhs.bottom, + right: lhs.right - rhs.right) + } + + public static func + (lhs: UIEdgeInsets, rhs: UIEdgeInsets) -> UIEdgeInsets + { + return NSUIEdgeInsets(top: lhs.top + rhs.top, + left: lhs.left + rhs.left, + bottom: lhs.bottom + rhs.bottom, + right: lhs.right + rhs.right) + } + + public static func -= (lhs: inout UIEdgeInsets, rhs: UIEdgeInsets) { + lhs.top -= rhs.top + lhs.left -= rhs.left + lhs.bottom -= rhs.bottom + lhs.right -= rhs.right + } + + public static func += (lhs: inout UIEdgeInsets, rhs: UIEdgeInsets) { + lhs.top += rhs.top + lhs.left += rhs.left + lhs.bottom += rhs.bottom + lhs.right += rhs.right + } +} + +#endif + +// MARK: - AppKit +#if canImport(AppKit) && !targetEnvironment(macCatalyst) +import AppKit + +public typealias NSUIEdgeInsets = NSEdgeInsets + +extension NSUIEdgeInsets +{ + static public let zero = NSEdgeInsets(top: 0, left: 0, bottom: 0, right: 0) +} + +extension NSUIEdgeInsets: Equatable +{ + public static func == (lhs: NSEdgeInsets, rhs: NSEdgeInsets) -> Bool { + return lhs.top == rhs.top && lhs.left == rhs.left && lhs.bottom == rhs.bottom && lhs.right == rhs.right + } +} + +extension NSUIEdgeInsets: AdditiveArithmetic +{ + public static func - (lhs: NSEdgeInsets, rhs: NSEdgeInsets) -> NSEdgeInsets + { + return NSUIEdgeInsets(top: lhs.top - rhs.top, + left: lhs.left - rhs.left, + bottom: lhs.bottom - rhs.bottom, + right: lhs.right - rhs.right) + } + + public static func + (lhs: NSEdgeInsets, rhs: NSEdgeInsets) -> NSEdgeInsets + { + return NSUIEdgeInsets(top: lhs.top + rhs.top, + left: lhs.left + rhs.left, + bottom: lhs.bottom + rhs.bottom, + right: lhs.right + rhs.right) + } + + public static func -= (lhs: inout NSEdgeInsets, rhs: NSEdgeInsets) { + lhs.top -= rhs.top + lhs.left -= rhs.left + lhs.bottom -= rhs.bottom + lhs.right -= rhs.right + } + + public static func += (lhs: inout NSEdgeInsets, rhs: NSEdgeInsets) { + lhs.top += rhs.top + lhs.left += rhs.left + lhs.bottom += rhs.bottom + lhs.right += rhs.right + } +} + +extension CGRect { + func inset(by insets: NSEdgeInsets) -> CGRect + { + //https://github.com/github/Archimedes/blob/063bcccf1abc7b53871d21d790bce06718c38ec0/Archimedes/MEDEdgeInsets.m + return CGRect(origin: CGPoint(x: origin.x + insets.left, y: origin.y + insets.bottom), + size: CGSize(width: width - insets.left - insets.right, height: height - insets.top - insets.bottom)) + } +} + +#endif diff --git a/Tests/ChartsTests/BarChartTests.swift b/Tests/ChartsTests/BarChartTests.swift index 2b0bdca9ce..026cbe1f03 100644 --- a/Tests/ChartsTests/BarChartTests.swift +++ b/Tests/ChartsTests/BarChartTests.swift @@ -7,6 +7,9 @@ class BarChartTests: XCTestCase { override func setUp() { super.setUp() + + // Set to `true` to re-capture all snapshots + isRecording = false } override func tearDown() { @@ -367,4 +370,161 @@ class BarChartTests: XCTestCase { chart.notifyDataSetChanged() assertChartSnapshot(matching: chart) } + + func testOutlinesNarrowWithTooBigInsets() + { + let dataEntries = setupDefaultValuesDataEntries() + let dataSet = setupDefaultDataSet(chartDataEntries: dataEntries) + + let outline1 = BarChartBarValueOutline(color: .magenta) + outline1.insets.top = 5 + outline1.insets.left = 7 + outline1.insets.bottom = 2 + outline1.insets.right = 5 + let outline2 = BarChartBarValueOutline(color: .brown) + outline2.insets.top = 4 + outline2.insets.left = 3 + outline2.insets.bottom = 6 + outline2.insets.right = 12 + dataSet.barValueOutlines = [outline1, outline2] + + let chart = setupDefaultChart(dataSets: [dataSet]) + assertChartSnapshot(matching: chart) + } + + func testOutlinesNarrowWithNormalInsets() + { + let dataEntries = setupDefaultValuesDataEntries() + let dataSet = setupDefaultDataSet(chartDataEntries: dataEntries) + + let outline1 = BarChartBarValueOutline(color: .magenta) + outline1.insets.top = 5 + outline1.insets.left = 2 + outline1.insets.bottom = 2 + outline1.insets.right = 5 + let outline2 = BarChartBarValueOutline(color: .brown) + outline2.insets.top = 4 + outline2.insets.left = 3 + outline2.insets.bottom = 6 + outline2.insets.right = 12 + dataSet.barValueOutlines = [outline1, outline2] + + let chart = setupDefaultChart(dataSets: [dataSet]) + assertChartSnapshot(matching: chart) + } + + func testOutlinesWide() + { + let dataEntries = setupDefaultValuesDataEntries() + let dataSet = setupDefaultDataSet(chartDataEntries: Array(dataEntries[0 ..< dataEntries.count/3])) + + let outline1 = BarChartBarValueOutline(color: .magenta) + outline1.insets.top = 5 + outline1.insets.left = 2 + outline1.insets.bottom = 2 + outline1.insets.right = 5 + let outline2 = BarChartBarValueOutline(color: .brown) + outline2.insets.top = 4 + outline2.insets.left = 2 + outline2.insets.bottom = 6 + outline2.insets.right = 8 + dataSet.barValueOutlines = [outline1, outline2] + + let chart = setupDefaultChart(dataSets: [dataSet]) + assertChartSnapshot(matching: chart) + } + + func testOutlinesNarrowValues() + { + let dataEntries = setupDefaultValuesDataEntries() + let dataSet = setupDefaultDataSet(chartDataEntries: dataEntries) + let outline1 = BarChartBarValueOutline(color: .magenta) + outline1.insets.top = 5 + outline1.insets.left = 2 + outline1.insets.bottom = 2 + outline1.insets.right = 5 + let outline2 = BarChartBarValueOutline(color: .brown) + outline2.insets.top = 4 + outline2.insets.left = 2 + outline2.insets.bottom = 6 + outline2.insets.right = 8 + dataSet.barValueOutlines = [outline1, outline2] + + let chart = setupDefaultChart(dataSets: [dataSet]) + dataSet.drawValuesEnabled = true + chart.drawValueAboveBarEnabled = false + chart.notifyDataSetChanged() + assertChartSnapshot(matching: chart) + } + + func testOutlinesWideValues() + { + let dataEntries = setupDefaultValuesDataEntries() + let dataSet = setupDefaultDataSet(chartDataEntries: Array(dataEntries[0 ..< dataEntries.count/3])) + let outline1 = BarChartBarValueOutline(color: .magenta) + outline1.insets.top = 5 + outline1.insets.left = 2 + outline1.insets.bottom = 2 + outline1.insets.right = 5 + let outline2 = BarChartBarValueOutline(color: .brown) + outline2.insets.top = 4 + outline2.insets.left = 2 + outline2.insets.bottom = 6 + outline2.insets.right = 8 + dataSet.barValueOutlines = [outline1, outline2] + + let chart = setupDefaultChart(dataSets: [dataSet]) + dataSet.drawValuesEnabled = true + chart.drawValueAboveBarEnabled = false + chart.notifyDataSetChanged() + assertChartSnapshot(matching: chart) + } + + func testOutlinesStacked() + { + let dataEntries = setupStackedValuesDataEntries() + let dataSet = setupDefaultStackedDataSet(chartDataEntries: dataEntries) + + let outline1 = BarChartBarValueOutline(color: .magenta) + outline1.insets.top = 5 + outline1.insets.left = 2 + outline1.insets.bottom = 2 + outline1.insets.right = 5 + let outline2 = BarChartBarValueOutline(color: .brown) + outline2.insets.top = 4 + outline2.insets.left = 2 + outline2.insets.bottom = 6 + outline2.insets.right = 8 + dataSet.barValueOutlines = [outline1, outline2] + + let chart = setupDefaultChart(dataSets: [dataSet]) + assertChartSnapshot(matching: chart) + } + + func testOutlinesStackedBordered() + { + let dataEntries = setupStackedValuesDataEntries() + let dataSet = setupDefaultStackedDataSet(chartDataEntries: dataEntries) + + let outline1 = BarChartBarValueOutline(color: .magenta) + outline1.insets.top = 5 + outline1.insets.left = 2 + outline1.insets.bottom = 2 + outline1.insets.right = 5 + let outline2 = BarChartBarValueOutline(color: .brown) + outline2.insets.top = 4 + outline2.insets.left = 2 + outline2.insets.bottom = 6 + outline2.insets.right = 8 + dataSet.barValueOutlines = [outline1, outline2] + + dataSet.barBorderWidth = 3 + dataSet.barBorderColor = .white + + let chart = setupDefaultChart(dataSets: [dataSet]) + chart.drawBordersEnabled = true + chart.notifyDataSetChanged() + assertChartSnapshot(matching: chart) + } + } diff --git a/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testDefaultValues-iOS_390-0_844-0.1.png b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testDefaultValues-iOS_390-0_844-0.1.png index 46c59dbc89..aa2c059a82 100644 Binary files a/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testDefaultValues-iOS_390-0_844-0.1.png and b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testDefaultValues-iOS_390-0_844-0.1.png differ diff --git a/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testDrawIcons-iOS_390-0_844-0.1.png b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testDrawIcons-iOS_390-0_844-0.1.png index fdc7e1cd26..6559bcdd11 100644 Binary files a/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testDrawIcons-iOS_390-0_844-0.1.png and b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testDrawIcons-iOS_390-0_844-0.1.png differ diff --git a/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testHideHorizontalGridlines-iOS_390-0_844-0.1.png b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testHideHorizontalGridlines-iOS_390-0_844-0.1.png index 7cb87b8c32..b7c245c8b1 100644 Binary files a/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testHideHorizontalGridlines-iOS_390-0_844-0.1.png and b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testHideHorizontalGridlines-iOS_390-0_844-0.1.png differ diff --git a/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testHideLeftAxis-iOS_390-0_844-0.1.png b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testHideLeftAxis-iOS_390-0_844-0.1.png index 3a4689a680..3004f52508 100644 Binary files a/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testHideLeftAxis-iOS_390-0_844-0.1.png and b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testHideLeftAxis-iOS_390-0_844-0.1.png differ diff --git a/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testHideRightAxis-iOS_390-0_844-0.1.png b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testHideRightAxis-iOS_390-0_844-0.1.png index 39a52c6745..69272844b8 100644 Binary files a/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testHideRightAxis-iOS_390-0_844-0.1.png and b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testHideRightAxis-iOS_390-0_844-0.1.png differ diff --git a/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testHideVerticalGridlines-iOS_390-0_844-0.1.png b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testHideVerticalGridlines-iOS_390-0_844-0.1.png index 267e59002a..65a0175aad 100644 Binary files a/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testHideVerticalGridlines-iOS_390-0_844-0.1.png and b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testHideVerticalGridlines-iOS_390-0_844-0.1.png differ diff --git a/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testHidesValues-iOS_390-0_844-0.1.png b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testHidesValues-iOS_390-0_844-0.1.png index b6917b5b60..c34af144a0 100644 Binary files a/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testHidesValues-iOS_390-0_844-0.1.png and b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testHidesValues-iOS_390-0_844-0.1.png differ diff --git a/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testInvertedLeftAxis-iOS_390-0_844-0.1.png b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testInvertedLeftAxis-iOS_390-0_844-0.1.png index 88b8c6c84f..dedb2af098 100644 Binary files a/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testInvertedLeftAxis-iOS_390-0_844-0.1.png and b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testInvertedLeftAxis-iOS_390-0_844-0.1.png differ diff --git a/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testInvertedLeftAxisWithNegativeValues-iOS_390-0_844-0.1.png b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testInvertedLeftAxisWithNegativeValues-iOS_390-0_844-0.1.png index a4b796dbd3..5ea67b77b6 100644 Binary files a/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testInvertedLeftAxisWithNegativeValues-iOS_390-0_844-0.1.png and b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testInvertedLeftAxisWithNegativeValues-iOS_390-0_844-0.1.png differ diff --git a/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testInvertedLeftAxisWithPositiveValues-iOS_390-0_844-0.1.png b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testInvertedLeftAxisWithPositiveValues-iOS_390-0_844-0.1.png index 9959c04a3f..346a6b5a8e 100644 Binary files a/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testInvertedLeftAxisWithPositiveValues-iOS_390-0_844-0.1.png and b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testInvertedLeftAxisWithPositiveValues-iOS_390-0_844-0.1.png differ diff --git a/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testInvertedRightAxis-iOS_390-0_844-0.1.png b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testInvertedRightAxis-iOS_390-0_844-0.1.png index fe0de42f4e..8ce3f4fe83 100644 Binary files a/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testInvertedRightAxis-iOS_390-0_844-0.1.png and b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testInvertedRightAxis-iOS_390-0_844-0.1.png differ diff --git a/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testInvertedRightAxisWithNegativeValues-iOS_390-0_844-0.1.png b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testInvertedRightAxisWithNegativeValues-iOS_390-0_844-0.1.png index 0a8159fa6a..b9d72f38f8 100644 Binary files a/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testInvertedRightAxisWithNegativeValues-iOS_390-0_844-0.1.png and b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testInvertedRightAxisWithNegativeValues-iOS_390-0_844-0.1.png differ diff --git a/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testInvertedRightAxisWithPositiveValues-iOS_390-0_844-0.1.png b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testInvertedRightAxisWithPositiveValues-iOS_390-0_844-0.1.png index 0807be8114..af704c662c 100644 Binary files a/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testInvertedRightAxisWithPositiveValues-iOS_390-0_844-0.1.png and b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testInvertedRightAxisWithPositiveValues-iOS_390-0_844-0.1.png differ diff --git a/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testNegativeValues-iOS_390-0_844-0.1.png b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testNegativeValues-iOS_390-0_844-0.1.png index 77b1434c89..26fc5dd1eb 100644 Binary files a/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testNegativeValues-iOS_390-0_844-0.1.png and b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testNegativeValues-iOS_390-0_844-0.1.png differ diff --git a/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testNegativeValuesWithCustomAxisMaximum-iOS_390-0_844-0.1.png b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testNegativeValuesWithCustomAxisMaximum-iOS_390-0_844-0.1.png index 7ce3b3c028..3d48921af4 100644 Binary files a/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testNegativeValuesWithCustomAxisMaximum-iOS_390-0_844-0.1.png and b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testNegativeValuesWithCustomAxisMaximum-iOS_390-0_844-0.1.png differ diff --git a/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testNegativeValuesWithCustomAxisMaximum2-iOS_390-0_844-0.1.png b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testNegativeValuesWithCustomAxisMaximum2-iOS_390-0_844-0.1.png index 41f6b26d2e..6db8f43086 100644 Binary files a/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testNegativeValuesWithCustomAxisMaximum2-iOS_390-0_844-0.1.png and b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testNegativeValuesWithCustomAxisMaximum2-iOS_390-0_844-0.1.png differ diff --git a/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testNegativeValuesWithCustomAxisMaximumAndCustomAxisMaximum-iOS_390-0_844-0.1.png b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testNegativeValuesWithCustomAxisMaximumAndCustomAxisMaximum-iOS_390-0_844-0.1.png index 5eae196a0e..5a4b7f55fc 100644 Binary files a/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testNegativeValuesWithCustomAxisMaximumAndCustomAxisMaximum-iOS_390-0_844-0.1.png and b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testNegativeValuesWithCustomAxisMaximumAndCustomAxisMaximum-iOS_390-0_844-0.1.png differ diff --git a/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testNegativeValuesWithCustomAxisMinimum-iOS_390-0_844-0.1.png b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testNegativeValuesWithCustomAxisMinimum-iOS_390-0_844-0.1.png index 91341b3059..29726a2918 100644 Binary files a/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testNegativeValuesWithCustomAxisMinimum-iOS_390-0_844-0.1.png and b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testNegativeValuesWithCustomAxisMinimum-iOS_390-0_844-0.1.png differ diff --git a/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testNegativeValuesWithCustomAxisMinimum2-iOS_390-0_844-0.1.png b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testNegativeValuesWithCustomAxisMinimum2-iOS_390-0_844-0.1.png index be83a2771e..b8bf0f7edb 100644 Binary files a/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testNegativeValuesWithCustomAxisMinimum2-iOS_390-0_844-0.1.png and b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testNegativeValuesWithCustomAxisMinimum2-iOS_390-0_844-0.1.png differ diff --git a/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testNotDrawValueAboveBars-iOS_390-0_844-0.1.png b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testNotDrawValueAboveBars-iOS_390-0_844-0.1.png index 7b8419b986..ebaf7bc8a7 100644 Binary files a/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testNotDrawValueAboveBars-iOS_390-0_844-0.1.png and b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testNotDrawValueAboveBars-iOS_390-0_844-0.1.png differ diff --git a/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testOutlinesNarrowValues-iOS_390-0_844-0.1.png b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testOutlinesNarrowValues-iOS_390-0_844-0.1.png new file mode 100644 index 0000000000..aa1ff8e7ed Binary files /dev/null and b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testOutlinesNarrowValues-iOS_390-0_844-0.1.png differ diff --git a/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testOutlinesNarrowWithNormalInsets-iOS_390-0_844-0.1.png b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testOutlinesNarrowWithNormalInsets-iOS_390-0_844-0.1.png new file mode 100644 index 0000000000..a3e22210de Binary files /dev/null and b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testOutlinesNarrowWithNormalInsets-iOS_390-0_844-0.1.png differ diff --git a/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testOutlinesNarrowWithTooBigInsets-iOS_390-0_844-0.1.png b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testOutlinesNarrowWithTooBigInsets-iOS_390-0_844-0.1.png new file mode 100644 index 0000000000..aa2c059a82 Binary files /dev/null and b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testOutlinesNarrowWithTooBigInsets-iOS_390-0_844-0.1.png differ diff --git a/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testOutlinesStacked-iOS_390-0_844-0.1.png b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testOutlinesStacked-iOS_390-0_844-0.1.png new file mode 100644 index 0000000000..739ea4bfee Binary files /dev/null and b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testOutlinesStacked-iOS_390-0_844-0.1.png differ diff --git a/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testOutlinesStackedBordered-iOS_390-0_844-0.1.png b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testOutlinesStackedBordered-iOS_390-0_844-0.1.png new file mode 100644 index 0000000000..0e19028a95 Binary files /dev/null and b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testOutlinesStackedBordered-iOS_390-0_844-0.1.png differ diff --git a/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testOutlinesWide-iOS_390-0_844-0.1.png b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testOutlinesWide-iOS_390-0_844-0.1.png new file mode 100644 index 0000000000..9e1010996d Binary files /dev/null and b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testOutlinesWide-iOS_390-0_844-0.1.png differ diff --git a/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testOutlinesWideValues-iOS_390-0_844-0.1.png b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testOutlinesWideValues-iOS_390-0_844-0.1.png new file mode 100644 index 0000000000..50099d0924 Binary files /dev/null and b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testOutlinesWideValues-iOS_390-0_844-0.1.png differ diff --git a/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testPositiveValues-iOS_390-0_844-0.1.png b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testPositiveValues-iOS_390-0_844-0.1.png index 0ada371676..f4b53a7fad 100644 Binary files a/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testPositiveValues-iOS_390-0_844-0.1.png and b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testPositiveValues-iOS_390-0_844-0.1.png differ diff --git a/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testPositiveValuesWithCustomAxisMaximum-iOS_390-0_844-0.1.png b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testPositiveValuesWithCustomAxisMaximum-iOS_390-0_844-0.1.png index 626f000cda..1240cb1f8d 100644 Binary files a/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testPositiveValuesWithCustomAxisMaximum-iOS_390-0_844-0.1.png and b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testPositiveValuesWithCustomAxisMaximum-iOS_390-0_844-0.1.png differ diff --git a/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testPositiveValuesWithCustomAxisMaximum2-iOS_390-0_844-0.1.png b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testPositiveValuesWithCustomAxisMaximum2-iOS_390-0_844-0.1.png index 56abec06aa..500701d066 100644 Binary files a/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testPositiveValuesWithCustomAxisMaximum2-iOS_390-0_844-0.1.png and b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testPositiveValuesWithCustomAxisMaximum2-iOS_390-0_844-0.1.png differ diff --git a/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testPositiveValuesWithCustomAxisMaximumAndCustomAxisMaximum-iOS_390-0_844-0.1.png b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testPositiveValuesWithCustomAxisMaximumAndCustomAxisMaximum-iOS_390-0_844-0.1.png index 189f6e56e2..4b5bb877a6 100644 Binary files a/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testPositiveValuesWithCustomAxisMaximumAndCustomAxisMaximum-iOS_390-0_844-0.1.png and b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testPositiveValuesWithCustomAxisMaximumAndCustomAxisMaximum-iOS_390-0_844-0.1.png differ diff --git a/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testPositiveValuesWithCustomAxisMinimum-iOS_390-0_844-0.1.png b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testPositiveValuesWithCustomAxisMinimum-iOS_390-0_844-0.1.png index 487687dc36..c57a431fe8 100644 Binary files a/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testPositiveValuesWithCustomAxisMinimum-iOS_390-0_844-0.1.png and b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testPositiveValuesWithCustomAxisMinimum-iOS_390-0_844-0.1.png differ diff --git a/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testPositiveValuesWithCustomAxisMinimum2-iOS_390-0_844-0.1.png b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testPositiveValuesWithCustomAxisMinimum2-iOS_390-0_844-0.1.png index 4c9440f576..ba973d23d3 100644 Binary files a/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testPositiveValuesWithCustomAxisMinimum2-iOS_390-0_844-0.1.png and b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testPositiveValuesWithCustomAxisMinimum2-iOS_390-0_844-0.1.png differ diff --git a/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testStackedDrawValues-iOS_390-0_844-0.1.png b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testStackedDrawValues-iOS_390-0_844-0.1.png index d6e003d6d5..138b8fbc49 100644 Binary files a/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testStackedDrawValues-iOS_390-0_844-0.1.png and b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testStackedDrawValues-iOS_390-0_844-0.1.png differ diff --git a/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testStackedNotDrawValues-iOS_390-0_844-0.1.png b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testStackedNotDrawValues-iOS_390-0_844-0.1.png index edf2b5af8b..38094afdf7 100644 Binary files a/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testStackedNotDrawValues-iOS_390-0_844-0.1.png and b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testStackedNotDrawValues-iOS_390-0_844-0.1.png differ diff --git a/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testStackedNotDrawValuesAboveBars-iOS_390-0_844-0.1.png b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testStackedNotDrawValuesAboveBars-iOS_390-0_844-0.1.png index 2511565dc4..8ff148cdee 100644 Binary files a/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testStackedNotDrawValuesAboveBars-iOS_390-0_844-0.1.png and b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testStackedNotDrawValuesAboveBars-iOS_390-0_844-0.1.png differ diff --git a/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testZeroValues-iOS_390-0_844-0.1.png b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testZeroValues-iOS_390-0_844-0.1.png index 2a68d6a9fe..c11a9c4b99 100644 Binary files a/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testZeroValues-iOS_390-0_844-0.1.png and b/Tests/ChartsTests/__Snapshots__AppleSilicon__/BarChartTests/testZeroValues-iOS_390-0_844-0.1.png differ diff --git a/Tests/ChartsTests/__Snapshots__AppleSilicon__/CombinedChartTests/testAllRightAxisDependency-iOS_390-0_844-0.1.png b/Tests/ChartsTests/__Snapshots__AppleSilicon__/CombinedChartTests/testAllRightAxisDependency-iOS_390-0_844-0.1.png index c4565d0fdf..1dc0a59dde 100644 Binary files a/Tests/ChartsTests/__Snapshots__AppleSilicon__/CombinedChartTests/testAllRightAxisDependency-iOS_390-0_844-0.1.png and b/Tests/ChartsTests/__Snapshots__AppleSilicon__/CombinedChartTests/testAllRightAxisDependency-iOS_390-0_844-0.1.png differ diff --git a/Tests/ChartsTests/__Snapshots__AppleSilicon__/CombinedChartTests/testDefaultAxisDependency-iOS_390-0_844-0.1.png b/Tests/ChartsTests/__Snapshots__AppleSilicon__/CombinedChartTests/testDefaultAxisDependency-iOS_390-0_844-0.1.png index c4565d0fdf..1dc0a59dde 100644 Binary files a/Tests/ChartsTests/__Snapshots__AppleSilicon__/CombinedChartTests/testDefaultAxisDependency-iOS_390-0_844-0.1.png and b/Tests/ChartsTests/__Snapshots__AppleSilicon__/CombinedChartTests/testDefaultAxisDependency-iOS_390-0_844-0.1.png differ diff --git a/Tests/ChartsTests/__Snapshots__AppleSilicon__/CombinedChartTests/testLeftRightAxisDependency-iOS_390-0_844-0.1.png b/Tests/ChartsTests/__Snapshots__AppleSilicon__/CombinedChartTests/testLeftRightAxisDependency-iOS_390-0_844-0.1.png index d1e69dbd21..91284dde56 100644 Binary files a/Tests/ChartsTests/__Snapshots__AppleSilicon__/CombinedChartTests/testLeftRightAxisDependency-iOS_390-0_844-0.1.png and b/Tests/ChartsTests/__Snapshots__AppleSilicon__/CombinedChartTests/testLeftRightAxisDependency-iOS_390-0_844-0.1.png differ diff --git a/Tests/ChartsTests/__Snapshots__AppleSilicon__/HorizontalBarChartTests/testDefaultValues-iOS_390-0_844-0.1.png b/Tests/ChartsTests/__Snapshots__AppleSilicon__/HorizontalBarChartTests/testDefaultValues-iOS_390-0_844-0.1.png index e891e3c99f..0cc1321377 100644 Binary files a/Tests/ChartsTests/__Snapshots__AppleSilicon__/HorizontalBarChartTests/testDefaultValues-iOS_390-0_844-0.1.png and b/Tests/ChartsTests/__Snapshots__AppleSilicon__/HorizontalBarChartTests/testDefaultValues-iOS_390-0_844-0.1.png differ diff --git a/Tests/ChartsTests/__Snapshots__AppleSilicon__/HorizontalBarChartTests/testHidesValues-iOS_390-0_844-0.1.png b/Tests/ChartsTests/__Snapshots__AppleSilicon__/HorizontalBarChartTests/testHidesValues-iOS_390-0_844-0.1.png index 093011787e..7b3590f8be 100644 Binary files a/Tests/ChartsTests/__Snapshots__AppleSilicon__/HorizontalBarChartTests/testHidesValues-iOS_390-0_844-0.1.png and b/Tests/ChartsTests/__Snapshots__AppleSilicon__/HorizontalBarChartTests/testHidesValues-iOS_390-0_844-0.1.png differ diff --git a/Tests/ChartsTests/__Snapshots__AppleSilicon__/HorizontalBarChartTests/testNotDrawValueAboveBars-iOS_390-0_844-0.1.png b/Tests/ChartsTests/__Snapshots__AppleSilicon__/HorizontalBarChartTests/testNotDrawValueAboveBars-iOS_390-0_844-0.1.png index a6580131d9..4edb0d2969 100644 Binary files a/Tests/ChartsTests/__Snapshots__AppleSilicon__/HorizontalBarChartTests/testNotDrawValueAboveBars-iOS_390-0_844-0.1.png and b/Tests/ChartsTests/__Snapshots__AppleSilicon__/HorizontalBarChartTests/testNotDrawValueAboveBars-iOS_390-0_844-0.1.png differ diff --git a/Tests/ChartsTests/__Snapshots__AppleSilicon__/HorizontalBarChartTests/testStackedDrawValues-iOS_390-0_844-0.1.png b/Tests/ChartsTests/__Snapshots__AppleSilicon__/HorizontalBarChartTests/testStackedDrawValues-iOS_390-0_844-0.1.png index a13167c2c7..2dd046eef5 100644 Binary files a/Tests/ChartsTests/__Snapshots__AppleSilicon__/HorizontalBarChartTests/testStackedDrawValues-iOS_390-0_844-0.1.png and b/Tests/ChartsTests/__Snapshots__AppleSilicon__/HorizontalBarChartTests/testStackedDrawValues-iOS_390-0_844-0.1.png differ diff --git a/Tests/ChartsTests/__Snapshots__AppleSilicon__/HorizontalBarChartTests/testStackedNotDrawValues-iOS_390-0_844-0.1.png b/Tests/ChartsTests/__Snapshots__AppleSilicon__/HorizontalBarChartTests/testStackedNotDrawValues-iOS_390-0_844-0.1.png index 155e95532b..7e0b03d815 100644 Binary files a/Tests/ChartsTests/__Snapshots__AppleSilicon__/HorizontalBarChartTests/testStackedNotDrawValues-iOS_390-0_844-0.1.png and b/Tests/ChartsTests/__Snapshots__AppleSilicon__/HorizontalBarChartTests/testStackedNotDrawValues-iOS_390-0_844-0.1.png differ diff --git a/Tests/ChartsTests/__Snapshots__AppleSilicon__/HorizontalBarChartTests/testStackedNotDrawValuesAboveBars-iOS_390-0_844-0.1.png b/Tests/ChartsTests/__Snapshots__AppleSilicon__/HorizontalBarChartTests/testStackedNotDrawValuesAboveBars-iOS_390-0_844-0.1.png index 6530fdda26..01c6fa49c4 100644 Binary files a/Tests/ChartsTests/__Snapshots__AppleSilicon__/HorizontalBarChartTests/testStackedNotDrawValuesAboveBars-iOS_390-0_844-0.1.png and b/Tests/ChartsTests/__Snapshots__AppleSilicon__/HorizontalBarChartTests/testStackedNotDrawValuesAboveBars-iOS_390-0_844-0.1.png differ diff --git a/Tests/ChartsTests/__Snapshots__AppleSilicon__/LineChartTests/testLimitLineLabelDefaultRotation-iOS_390-0_844-0.1.png b/Tests/ChartsTests/__Snapshots__AppleSilicon__/LineChartTests/testLimitLineLabelDefaultRotation-iOS_390-0_844-0.1.png new file mode 100644 index 0000000000..6b163e9283 Binary files /dev/null and b/Tests/ChartsTests/__Snapshots__AppleSilicon__/LineChartTests/testLimitLineLabelDefaultRotation-iOS_390-0_844-0.1.png differ diff --git a/Tests/ChartsTests/__Snapshots__AppleSilicon__/LineChartTests/testLimitLineLabelRotatedBy120-iOS_390-0_844-0.1.png b/Tests/ChartsTests/__Snapshots__AppleSilicon__/LineChartTests/testLimitLineLabelRotatedBy120-iOS_390-0_844-0.1.png new file mode 100644 index 0000000000..7b0517e38e Binary files /dev/null and b/Tests/ChartsTests/__Snapshots__AppleSilicon__/LineChartTests/testLimitLineLabelRotatedBy120-iOS_390-0_844-0.1.png differ diff --git a/Tests/ChartsTests/__Snapshots__AppleSilicon__/LineChartTests/testLimitLineLabelRotatedBy180-iOS_390-0_844-0.1.png b/Tests/ChartsTests/__Snapshots__AppleSilicon__/LineChartTests/testLimitLineLabelRotatedBy180-iOS_390-0_844-0.1.png new file mode 100644 index 0000000000..c4aaf53027 Binary files /dev/null and b/Tests/ChartsTests/__Snapshots__AppleSilicon__/LineChartTests/testLimitLineLabelRotatedBy180-iOS_390-0_844-0.1.png differ diff --git a/Tests/ChartsTests/__Snapshots__AppleSilicon__/LineChartTests/testLimitLineLabelRotatedBy30-iOS_390-0_844-0.1.png b/Tests/ChartsTests/__Snapshots__AppleSilicon__/LineChartTests/testLimitLineLabelRotatedBy30-iOS_390-0_844-0.1.png new file mode 100644 index 0000000000..2b002546a9 Binary files /dev/null and b/Tests/ChartsTests/__Snapshots__AppleSilicon__/LineChartTests/testLimitLineLabelRotatedBy30-iOS_390-0_844-0.1.png differ diff --git a/Tests/ChartsTests/__Snapshots__AppleSilicon__/LineChartTests/testLimitLineLabelRotatedBy45-iOS_390-0_844-0.1.png b/Tests/ChartsTests/__Snapshots__AppleSilicon__/LineChartTests/testLimitLineLabelRotatedBy45-iOS_390-0_844-0.1.png new file mode 100644 index 0000000000..3547f97417 Binary files /dev/null and b/Tests/ChartsTests/__Snapshots__AppleSilicon__/LineChartTests/testLimitLineLabelRotatedBy45-iOS_390-0_844-0.1.png differ diff --git a/Tests/ChartsTests/__Snapshots__AppleSilicon__/LineChartTests/testLimitLineLabelRotatedBy90-iOS_390-0_844-0.1.png b/Tests/ChartsTests/__Snapshots__AppleSilicon__/LineChartTests/testLimitLineLabelRotatedBy90-iOS_390-0_844-0.1.png new file mode 100644 index 0000000000..181ccd24c7 Binary files /dev/null and b/Tests/ChartsTests/__Snapshots__AppleSilicon__/LineChartTests/testLimitLineLabelRotatedBy90-iOS_390-0_844-0.1.png differ diff --git a/Tests/ChartsTests/__Snapshots__AppleSilicon__/PieChartTests/testDefaultValues-iOS_390-0_844-0.1.png b/Tests/ChartsTests/__Snapshots__AppleSilicon__/PieChartTests/testDefaultValues-iOS_390-0_844-0.1.png index 5eaaa6bffe..f8d8ef3bf3 100644 Binary files a/Tests/ChartsTests/__Snapshots__AppleSilicon__/PieChartTests/testDefaultValues-iOS_390-0_844-0.1.png and b/Tests/ChartsTests/__Snapshots__AppleSilicon__/PieChartTests/testDefaultValues-iOS_390-0_844-0.1.png differ diff --git a/Tests/ChartsTests/__Snapshots__AppleSilicon__/PieChartTests/testDrawIcons-iOS_390-0_844-0.1.png b/Tests/ChartsTests/__Snapshots__AppleSilicon__/PieChartTests/testDrawIcons-iOS_390-0_844-0.1.png index 4fe46c06d1..b939754cb4 100644 Binary files a/Tests/ChartsTests/__Snapshots__AppleSilicon__/PieChartTests/testDrawIcons-iOS_390-0_844-0.1.png and b/Tests/ChartsTests/__Snapshots__AppleSilicon__/PieChartTests/testDrawIcons-iOS_390-0_844-0.1.png differ diff --git a/Tests/ChartsTests/__Snapshots__AppleSilicon__/PieChartTests/testHidesValues-iOS_390-0_844-0.1.png b/Tests/ChartsTests/__Snapshots__AppleSilicon__/PieChartTests/testHidesValues-iOS_390-0_844-0.1.png index 1a27ba394b..13b4f21f3a 100644 Binary files a/Tests/ChartsTests/__Snapshots__AppleSilicon__/PieChartTests/testHidesValues-iOS_390-0_844-0.1.png and b/Tests/ChartsTests/__Snapshots__AppleSilicon__/PieChartTests/testHidesValues-iOS_390-0_844-0.1.png differ diff --git a/Tests/ChartsTests/__Snapshots__AppleSilicon__/PieChartTests/testHighlightDisabled-iOS_390-0_844-0.1.png b/Tests/ChartsTests/__Snapshots__AppleSilicon__/PieChartTests/testHighlightDisabled-iOS_390-0_844-0.1.png index 5eaaa6bffe..f8d8ef3bf3 100644 Binary files a/Tests/ChartsTests/__Snapshots__AppleSilicon__/PieChartTests/testHighlightDisabled-iOS_390-0_844-0.1.png and b/Tests/ChartsTests/__Snapshots__AppleSilicon__/PieChartTests/testHighlightDisabled-iOS_390-0_844-0.1.png differ diff --git a/Tests/ChartsTests/__Snapshots__AppleSilicon__/PieChartTests/testHighlightEnabled-iOS_390-0_844-0.1.png b/Tests/ChartsTests/__Snapshots__AppleSilicon__/PieChartTests/testHighlightEnabled-iOS_390-0_844-0.1.png index 11d3557dd5..d88f298315 100644 Binary files a/Tests/ChartsTests/__Snapshots__AppleSilicon__/PieChartTests/testHighlightEnabled-iOS_390-0_844-0.1.png and b/Tests/ChartsTests/__Snapshots__AppleSilicon__/PieChartTests/testHighlightEnabled-iOS_390-0_844-0.1.png differ diff --git a/Tests/ChartsTests/__Snapshots__x86__/BarChartTests/testOutlinesNarrowValues-iOS_390-0_844-0.1.png b/Tests/ChartsTests/__Snapshots__x86__/BarChartTests/testOutlinesNarrowValues-iOS_390-0_844-0.1.png new file mode 100644 index 0000000000..c1a8f93230 Binary files /dev/null and b/Tests/ChartsTests/__Snapshots__x86__/BarChartTests/testOutlinesNarrowValues-iOS_390-0_844-0.1.png differ diff --git a/Tests/ChartsTests/__Snapshots__x86__/BarChartTests/testOutlinesStacked-iOS_390-0_844-0.1.png b/Tests/ChartsTests/__Snapshots__x86__/BarChartTests/testOutlinesStacked-iOS_390-0_844-0.1.png new file mode 100644 index 0000000000..3a5b6dadad Binary files /dev/null and b/Tests/ChartsTests/__Snapshots__x86__/BarChartTests/testOutlinesStacked-iOS_390-0_844-0.1.png differ diff --git a/Tests/ChartsTests/__Snapshots__x86__/BarChartTests/testOutlinesStackedBordered-iOS_390-0_844-0.1.png b/Tests/ChartsTests/__Snapshots__x86__/BarChartTests/testOutlinesStackedBordered-iOS_390-0_844-0.1.png new file mode 100644 index 0000000000..2ffda96633 Binary files /dev/null and b/Tests/ChartsTests/__Snapshots__x86__/BarChartTests/testOutlinesStackedBordered-iOS_390-0_844-0.1.png differ diff --git a/Tests/ChartsTests/__Snapshots__x86__/BarChartTests/testOutlinesWide-iOS_390-0_844-0.1.png b/Tests/ChartsTests/__Snapshots__x86__/BarChartTests/testOutlinesWide-iOS_390-0_844-0.1.png new file mode 100644 index 0000000000..6c585870d3 Binary files /dev/null and b/Tests/ChartsTests/__Snapshots__x86__/BarChartTests/testOutlinesWide-iOS_390-0_844-0.1.png differ diff --git a/Tests/ChartsTests/__Snapshots__x86__/BarChartTests/testOutlinesWideValues-iOS_390-0_844-0.1.png b/Tests/ChartsTests/__Snapshots__x86__/BarChartTests/testOutlinesWideValues-iOS_390-0_844-0.1.png new file mode 100644 index 0000000000..24c3d7d5d8 Binary files /dev/null and b/Tests/ChartsTests/__Snapshots__x86__/BarChartTests/testOutlinesWideValues-iOS_390-0_844-0.1.png differ