Questions tagged [ios-charts]

ios-charts is a powerful chart library for iOS, written in Swift.

ios-charts is a powerful chart library for iOS, written in Swift. It is the iOS equivalent to the popular MPAndroidChart.

845 questions
1
vote
0 answers

iOS draw line in Scatter Graph Using Charts framework

Add line in Scatter Graph. Below is normal code for draw the Scatter Graph using iOS Chart Framework. let xAxisValue: [Double] =…
1
vote
2 answers

How can i remove the space between xAxis and the chart?

In the following image there is a space between the xAxis of the chart and the bottom of the bars, the area in red. I want to know how to remove such space so the labels get closer to the bars. Here is my code: let chart = BarChartView() …
1
vote
1 answer

IOS Charts - YAxis scaling number round to nearest hundred, thousands, etc

Is there a way with the iOs Charts lib (3.6.0) to scale the Y axis with the nearest hundred, thousands, etc ? I'm probably missing something but my Y axis doesn't make any sense : In this exemple, I would like my Y axis to be something like : 75…
belyarv
  • 23
  • 3
1
vote
1 answer

How to make a dashed line in iOS Charts?

How do you make a line chart dashed using the nifty iOS Charts? It is done this way in the Android charts version, but that approach does not work for iOS.
Ben
  • 3,346
  • 6
  • 32
  • 51
1
vote
1 answer

Disable X-axis grouping of columns

I want the dates on the X-axis to follow without missing dates (i.e. 1, 2, 3, 4, and so on). When I know exactly how many columns there will be in the chart, I can solve the problem by calling setScaleMinima(_:scaleY:): But when I have a large…
RareScrap
  • 541
  • 1
  • 7
  • 17
1
vote
1 answer

How do I display barChart ""bars from "zero "on the y axis

I have created a simple bar chart with some data all in the same range( between 20 and 30). the generated chart displays the data starting at just bellow 20 to just above 30. How can I render the graph to display the data from 0 on the y…
francois
  • 13
  • 3
1
vote
1 answer

Correct way to recreate translation in ios-charts LineChartView

I am failing to correctly define the translation/center of a LineChartView when calling: zoom(scaleX: CGFloat, scaleY: CGFloat, x: CGFloat, y: CGFloat) I want to store the scale & center chosen by the user and then use it later to recreate the…
eklektek
  • 1,083
  • 1
  • 16
  • 31
1
vote
1 answer

How to remove label from chart if value is 0 %

I am using iOS-Chart to display this image i know that value is coming from label but i need to hide zero labels from chart but not from below description.I have tried to pass empty on label but that wont make it dynamic. What i want is --> if it is…
1
vote
1 answer

Showing circle only for selected/highlighted value

I was looking everywhere for this and wasn't able to find any solution or any hint on how to achieve this. I want to draw an indicator (circle) only for selected/highlighted point. Right now I have dataSet.drawCircleHoleEnabled =…
cojoj
  • 6,405
  • 4
  • 30
  • 52
1
vote
1 answer

Get the position of a circle in swift charts

I'm using swift charts to make a line chart. I am drawing a circle on the last value, but I want to get the position of that circle so I can add an animation to it. Is this possible in charts? My Chart func setupIntradayLine(data: [ChartDataEntry],…
Nick
  • 247
  • 2
  • 9
1
vote
0 answers

How to create a limit line for each bar chart in iOS swift

How to create a limit line for each bar chart in iOS swift. I'm using Chart Library Here is my code: - var chartView: BarChartView! var entries: [BarChartDataEntry] = [] var data: [Double]? func draw() { for index in 0..
1
vote
1 answer

UIViewRepresentable wont update my ios chart dataset

I am trying to my data derived from an API into a line chart but I can't seem to get it to work. I am storing the data in an observable object so it takes a few seconds to get it so it won't show up on my graph but when I hardcode data it works I am…
Anthony
  • 31
  • 1
  • 9
1
vote
1 answer

Unable to share data between tab view controllers?

I am making an app where I take in user input and display it as a chart, which requires an array of data. I have managed to save data in an array using core data and I cannot figure out how to share that data from one tab to the other…
Uditi
  • 19
  • 2
1
vote
1 answer

Specify Z-order of lines

I plot an unknown number of series. For sake of explanation, assume that there are three; a, b and c. This leads the issue with the first serie a to be "hidden" behind the other series. This is most noticeable when then each have different colors…
T'n'E
  • 598
  • 5
  • 17
1
vote
1 answer

iOS Charts Bar-Bar Combined-Charts

I'm using iOS charts library and trying to do a bar-bar combined chart. I'm not sure this is possible but i did not see any limitation regarding on the documentation so i'm assuming there such an option. This is the code i'm using to add the…
Itzik984
  • 15,968
  • 28
  • 69
  • 107