So I have a chart displaying line data at equal x intervals, with varying y values - something like this:
let ints = Array([0...10])
Chart {
ForEach(ints) { int in
let someRandomYValue = Int.random()
LineMark(x: int, y:…
I'm using Swift Charts in a SwiftUI app to make a line chart. I would like to rotate the Y axis label such that it reads from bottom to top. I tried to rotate the text but the rotation causes the label to not render properly. Is there a way to…
Is this the place to ask for clarification on previously written lines of code? I apologize if not. I'm trying to understand some Swift code for using LineCharts. Code was written for line charts using iOS16's Swift Charts. My understanding is…
I am trying to use Apple's Swift Charts (iOS 16 only) but it can't compile, I presume because the import statement is interpreted as targeting this library: https://github.com/danielgindi/Charts (that I am using in other places in the App and…
I have two data sets and I want to show them in the same chart.
Both data sets are time based (x axis) and with same time range. They have different units of measure and scaling (y axis).
Is it possible to show both data sets in the same chart, but…
I am trying to use a legacy framework as a Swift package. This framework has an umbrella header which imports UIKit via #import , so the swift source files do not explicitly import UIKit. Building via SPM fails with error messages…
Require a LineChart where in it allows y value as nil. As when no data for that particular day(x) is there the line should just go forward.
Currently I have researched on SwiftChart & Charts but both doesn't provide that functionality.
Please refer…
I want to set multiple background colors in a chart view. A single color can be set in a background of the chart view but there is no way to set multiple colors.
Percentage-wise wants to add background color 0% to 20% - Red color, 21% to 60% -…
I have used SwiftChart to implement Line and area chart like below image .
It works fine with Xcode 7.3. Now am porting my code to iOS 10 so converting the code to Swift 3.0. I'm getting following error:
U
CGPathMoveToPoint(area, nil,…
I am currently using SwiftChart library. I would like to add legend to a multi line chart. I cannot find if there is a way to do this. Can anyone help me here?
I am trying to iterate over an Array of coordinates to create an object from each coordinate. The coordinates are stored as tuples (x,y,z,label).
private enum University
{
case Uni0,Uni1,Uni2, Uni3
}
let models: [(x: CGFloat, y:CGFloat,…
I'm using Swift Charts to create a heat map as shown below and there are faint lines in the chart. In the screen shot, you can see the line in the Digital Color Meter window. I thought the lines were the grid lines of the chart but I made the X and…
I am making a chart using Swift Charts. I have added pinch zoom and panning to the chart. The problem I have can be seen in this video I made. The annotations on the BarMarks collide with the edges of the chart's parent view, creating this "squeeze"…
I am attempting to make a small app where you can log your emotion for the day and plot it on a chart. I am making this using Swift Playgrounds in an effort to challenge myself with the constraints of the app, and it has been extremely challenging.…
enum SwiftChartEnergyType {
case Burned
case Consumed
}
struct SwiftChartEnergyObject: Identifiable {
let id = UUID()
let energy: Int
let date: Date
var swiftChartEnergyType: SwiftChartEnergyType
}
@available(iOS 16.0,…