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
7
votes
2 answers

Attributes of text above specific bar with ios-charts

How can I change attributes (e.g. font size, text color, etc...) of text above a specific bar in a BarChart? In this example, I want "-$5,000.00" in red and to increase the font size of every text above bars. Here's some code: @IBOutlet weak var…
horothesun
  • 427
  • 1
  • 6
  • 15
7
votes
3 answers

uiscrollview won't scroll when dragging on ios-charts subview

I have a ios-chart as a subview that takes up half the screen. When I pan up on any other subview it scrolls. But not when I pan on the chart. I tried setting: [self.chart setDefaultTouchEventsEnabled:YES]; //and [self.chart setScaleEnabled:NO]; It…
Entrabiter
  • 752
  • 7
  • 13
7
votes
1 answer

ios-charts How to invalidate/redraw after setting data

See Updates At Bottom (4/30/2015) I'm implementing a Pie Chart in Swift for iOS using ios-charts, and have chosen to customize the legend. Of note, the chart is displayed within a cell of a UICollectionView. The problem is that on first display,…
MojoTosh
  • 1,886
  • 1
  • 18
  • 23
6
votes
0 answers

danielgindi/charts: How get round corners for Graph?

I am using iOS Charts (https://github.com/danielgindi/Charts) for line chart. I gave background color to grid (Light Gray) as don’t want to include axis values. lineChartView.gridBackgroundColor = .lightGray Is there any way i can make corner of…
Kunal Parekh
  • 121
  • 4
6
votes
1 answer

How to apply gradient to bar in bar chart in ios-Charts

Is there any way to fill the bar in a bar chart with a gradient. I can make the gradient like this as explained in the link below: let gradientColors = [UIColor.cyan.cgColor, UIColor.clear.cgColor] as CFArray // Colors of the gradient let…
Kashif
  • 4,642
  • 7
  • 44
  • 97
6
votes
1 answer

How to create multiple y-axis Line chart in danielgindi iOS chart?

I want to create a graph with multiple y-axis. Duel y-axis graph is possible in danielgindi chart but I want more the two y-axis graph. Like below image: let set1 = LineChartDataSet(values: yVals1, label: "DataSet 1") set1.axisDependency =…
Saurabh Jain
  • 1,688
  • 14
  • 28
6
votes
2 answers

iOS-Charts Library: x-axis labels without backing data not showing

I am using version 3.1.1 of the popular charts library for iOS. I have run into an issue with x-axis labeling that I can't seem to find the answer for online: Let's say I want to have a chart with one x-axis label for every day of the week (namely:…
Brian Sachetta
  • 3,319
  • 2
  • 34
  • 45
6
votes
1 answer

iOS charts - draw value only when highlighted

I want to highlight and show value only when tapping on the iOS-Chart. I enabled the highlight but not the values because I only want them when tap and highlight lineChartDataSet.drawValuesEnabled = false lineChartDataSet.highlightEnabled =…
Maruta
  • 1,063
  • 11
  • 24
6
votes
4 answers

iOS Charts remove decimal from yValues

How to remove decimals from y values in iOS Charts? Im using the latest iOS Charts release with Swift3
johnny
  • 555
  • 4
  • 16
6
votes
4 answers

How do I display labels on bottom axis (xVals) correctly on iOS Chart?

I have been following very simple tutorial of iOS Charts. The values in my chart are now showing correctly, however the label on the bottom is not showing. override func viewDidLoad() { results = ["Won", "Drawn", "Lost"] let games =…
RDowns
  • 651
  • 1
  • 10
  • 35
6
votes
2 answers

Is it possible to handle tap events on a column of BarChart?

I know that on MPAndroidChart is possible to handle events on the charts. On its documentation are all well documented. Nevertheless I am not able to find any documentation about the same events on ios-chart. I know that its creator tells that we…
Francisco Romero
  • 12,787
  • 22
  • 92
  • 167
6
votes
1 answer

How to add labels for XAxis for BarChartView in ios-charts

I added a bar chart to the storyboard, but I cannot properly set labels for my data entries. here is my code: var names = ["aaa", "bbb", "ccc", "ddd"] var values = [230.0, 280.0, 450.0, 340.0] setChart(dataPoints: names, values: values) setChart…
Mehdi Mirzaei
  • 376
  • 3
  • 13
6
votes
3 answers

iOS-charts invert the X axis direction

I have a bar chart built using Daniel Gindi iOS-charts. It represents history data over a period of time. The issue I am having is that the data is being plotted from left-to-right (new data -> old data). I need it to be plotted as right-to-left…
Camon
  • 1,003
  • 1
  • 10
  • 22
6
votes
3 answers

Set an horizontal scroll to my Barchart in swift

I am using the Charts framework from Daniel Cohen Gindi which is great but: I would like my barchart to scroll horizontally to see additional data. I've tried to add a scroll view but it didn't worked. I also tried different value like…
Ciboulette
  • 145
  • 1
  • 2
  • 9
6
votes
2 answers

Hide bottom x axis in horizontal bar chart?

I want to render a (stacked) horizontal bar chart using ios-charts that does not render any x axis or grid lines. I've disabled every setting I can find, but the bottom x axis still renders. func setUpBarChart() { // General bar chart settings …
Greg Ferreri
  • 2,652
  • 5
  • 28
  • 38