I'm using charts library to show realtime linechart when i add new entry of data at that time graph flicker, please help me to stop flickering at new entry of data.
let currentDataSet = self.graphView.data?.dataSets[0]
let xIndex :…
I am making a Mac app that displays data using a Swift Charts line chart. Once the data is displayed I want to be able to "zoom" the X and Y axis using a drag gesture. For example if fully displaying all of the data required a X axis that went from…
I'm trying to plot temperature data on a LineMark chart. My array of chartDATETIME values are formatted to the timezone at the coordinates that the user selects. I know those values are correct because I've printed them.
For some reason, when I plot…
I am working on a SwiftUI iOS app that plays a live radio stream using AVPlayer. I would like to visualize the soundwave of the live radio stream and have it pulsate to the rhythm of music played in the stream. I have already implemented the audio…
I have a chart with a line:
let ints = Array([0...10])
Chart {
ForEach(ints) { int in
let someRandomYValue = Int.random()
LineMark(x: int, y: someRandomYValue)
}
}
At the halfway point across the chart, I need an annotation…
The code below draws a RuleMark at the top and bottom of the area I would like to highlight, however, instead of 2 lines I would like to shade this area grey to show the normal range. How can I do this?
import SwiftUI
import Charts
struct…
I would like to be able to pass the GaugeStyle for a Gauge as a parameter to my own SwiftUI view, however I can't seem to get this to work with the compiler. When I try the below code I get an error, Type 'any View' cannot conform to 'View'.
import…
this is what i get when i try to change the color sorry can't post image here yet so i suggested to use link
I used RectangleMark from apple Charts Api
here is my chart, my chartData has low, high, open, and close prices
I want to have it to look…
I am new to coding and SwiftUI in general, I am coding a crypto portfolio app
I am doing the candle stick chart using apple chart API, get my API data fetched.
sorry if my code is messy.
JSON from market data rest API
the "60" means the number of…
I am new to charts, I have to implement horizontal bar charts,It always have two horizontal bar and 3 x-axis value and four y-axis value. I am able to draw horizontal bar, but not able to add labels for x-axis and y-axis.
@IBOutlet weak var…
I am trying to make my Int enum conform to Plottable in order to use a legend in my Swift Charts. I'm not sure if I've understood the way on how to implement it correctly. Here is how my enum:
enum Type: Int, CaseIterable, Identifiable, Plottable {
…
Apple's Swift Charts was recently introduced at WWDC. However, my practice chart has a redundancy. The legend is not needed. How do I create the chart with all the colors but no legend?
Using “.foregroundStyle(by: .value("Shape", shape.type))”…
what is the best way to handle Line Chart data to send in API?
we have chart like this It has Hours, Days, Weeks, Months Data so how Will I manage with easy way?
I tired normal X,Y values but there is bulk data in every category so it is hard to…
I spent more than half of my day on it and unable to figure out solution
drawing bar chart using Charts pod facing two problems
Wanna Corner radius bars as mentioned in required Image
wanna bars besides the grid line as in below image
Required
My…
I am trying to draw line chart in my project using SwiftChart pod. I am getting response from API as ["activity_count":0 , "date": "2020-10-31"] but graph works on double values so I don't know How I draw the chart.
import UIKit
import…