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
36
votes
3 answers

How to hide labels in ios-charts?

I need disable some elements from my chart. I used the iOS-charts library in (Swift 2), however I can't understand how to disable the following: Hide right and left numbers Hide description color square Hide all vertical lines
VladyslavPG
  • 557
  • 1
  • 8
  • 19
28
votes
6 answers

How to add Strings on X Axis in iOS-charts?

With the new release i had some troubles to create some graphs the previous code was: func setChart(dataPoints: [String], values: [Double]) { var dataEntries: [BarChartDataEntry] = [] for i in 0..
27
votes
6 answers

How to set x-axis labels with ios charts

I've recently started using the ios charts library and am having trouble finding information on how to manipulate the x-axis with the swift3 update. What I want to do is label the x-axis with time values, e.g. 2:03:00, 2:03:01, 2:03:02, etc. In the…
matt
  • 291
  • 1
  • 3
  • 5
21
votes
8 answers

Remove all slice text from Pie Chart (ios-charts/mpandroidchart)

I know the method for removing the x-values but how do I remove the y-values. I basically don't want ANY text on my Pie Chart. The image shows the current-state with the 80.0 and 20.0 labels on top of the pie chart.
Husein Kareem
  • 516
  • 1
  • 4
  • 12
20
votes
7 answers

Module file's deployment target is ios9.0 v9.0 with Xcode 7 / Swift 2

I have a project using some modules that I have installed via cocoapods. One of them is Charts. In order to migrate my project from Swift 1.2 to Swift 2 I have gone through the wizard that comes up when first opening the project with Xcode 7. The…
Christian Anton
  • 357
  • 1
  • 4
  • 13
19
votes
4 answers

How can I remove Description Label in ios-chart?

I am trying to remove Description Label in ios-chart library. You can see it on the image below: And I know that, on Android (MPAndroidChart library which is the predecessor of ios-chart), I can do the following: barchart.setDescription(" "); but…
Francisco Romero
  • 12,787
  • 22
  • 92
  • 167
18
votes
4 answers

Rounded bars in ios Charts

I've created a BarChart using BarChartView from ios-Charts but I can't figure out howto add rounded corners to bars. This is the code that I'm using: let barChart: BarChartView //... var xVals = [String]() var yVals =…
lifeisfoo
  • 15,478
  • 6
  • 74
  • 115
16
votes
3 answers

Remove Border and Margin around iOS Charts in Swift

I am using iOS Charts with Swift 3, and I can't figure out how to do a couple things: I want to remove the margin around the chart. I know the chart goes edge-to-edge in my UI because if I change the chart's background color, it goes all the way to…
Clifton Labrum
  • 13,053
  • 9
  • 65
  • 128
15
votes
2 answers

How to create a floating graph marker with ios-charts

I'm using the ios-charts framework and want to create a marker that floats over the graph when I touch and move my finger from side to side. I'm using a line chart just for reference. However, I can't figure out how to get the position of the…
Rob Norback
  • 6,401
  • 2
  • 34
  • 38
15
votes
4 answers

iOS Charts - set minimum y axis range

I'm using the fabulous iOS Charts library (https://github.com/danielgindi/ios-charts) and I'm having a hard time finding anything to support this behavior in the documentation. I'd like to force the y-axis to always display a range from 0-35.…
Clay Ellis
  • 4,960
  • 2
  • 37
  • 45
14
votes
4 answers

ios Charts 3.0 - Align x labels (dates) with plots

I am having a hard time to migrate library Charts (from Daniel Gindi) from version 2 (Swift 2.3) to 3 (Swift 3). Basically, I can't have the x labels (dates) aligned correctly with the corresponding plots. This is what I had before in version 2: In…
Frederic Adda
  • 5,905
  • 4
  • 56
  • 71
14
votes
3 answers

How can I hide 0 values on ios-chart?

I know that it is possible to hide y values when their values are equal to 0 on MPAndroidChart using a custom class for your value formatter (MPAndroidChart: Hide 0 value labels in a stacked bar chart). Despite this, I am not able to create the same…
Francisco Romero
  • 12,787
  • 22
  • 92
  • 167
14
votes
4 answers

iOS Charts Swift bar graph exceeds beyond view

I have a problem with the Charts library. The problem I am facing is that the bar graph is not "fit" within the borders of my view. The following image shows that, the both first and last bar are cut into half and label of the highest bar is also…
Woodahack
  • 143
  • 1
  • 5
14
votes
6 answers

Gradient Fill in Swift for iOS-Charts

I am trying to create a nice gradient fill as seen in the demos on the ios-charts page. However, I cannot figure this out in swift vs obj-c. Here is the obj-c code: NSArray *gradientColors = @[ (id)[ChartColorTemplates…
throb
  • 185
  • 1
  • 1
  • 6
13
votes
1 answer

iOS Charts Pie Chart Size

I am using iOS Charts with Swift 3. I have a 100 x 100 PieChartView that renders the pie chart, but it's not filling the view (an NSView, to be precise). The gray box is the view and there's a large gap between the pie and the edge. I have…
Clifton Labrum
  • 13,053
  • 9
  • 65
  • 128
1
2 3
56 57