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

Force to show min/max on x axis

I am working with library. Anybody know if is it possible to force show min and max label on x-axis. What I have: What I want to achieve: My implementation: private func prepareXAxis() { lineChart.xAxis.labelPosition = .bottom …
Kamil Harasimowicz
  • 4,684
  • 5
  • 32
  • 58
2
votes
1 answer

How to add background color to chart`s legend

I am working with library to build a great charts in my app. Everything works good but today I encountered a problem. I want to add simply background color below chart`s legend. My legend looks like this: I want to achieve something like this: My…
Kamil Harasimowicz
  • 4,684
  • 5
  • 32
  • 58
2
votes
2 answers

iOS Charts 3 - Align X Labels (dates) with plots

I have found a similar question on here, but the answer did not help me. I think due to my data structure. I have an array made up of individual arrays, each for its own line in the chart. this is then made up of multiple structs for the plot points…
ThundercatChris
  • 481
  • 6
  • 25
2
votes
1 answer

Trouble getting chart object to work in custom UIView

I'm using Daniel Gindi's Charts library (iOS-charts), and in order to keep things simple I'm using a custom UIView to store the chart view (as a ChartViewBase). I have a class hierarchy of View Controller classes where the leaf class has the…
Sean Zlatnik
  • 187
  • 2
  • 12
2
votes
1 answer

how to set space Between Labels of xAxis

I got a problem of chart showing,you can see it from the picture.The old version of charts has api spaceBetweenLabels to set space Between Labels. I only find api spaceMax and spaceMin in the newest version. I try to use them to set space between…
C.Lee
  • 21
  • 6
2
votes
1 answer

Animating Auto Layout Constraints Not Working

iOS 10, Swift 3.1 I have a UIView called graphPopup inside a UITableViewCell that I'm trying to animate. Basically when someone taps a graph, a popup appears and I'd like it to animate its x and y into place. Everything is working except the…
Clifton Labrum
  • 13,053
  • 9
  • 65
  • 128
2
votes
1 answer

IOS Charts using Swift X-Axis issues

I have recently upgraded to the latest version of IOS Charts and X-Code (8.3) and I'm having an issue with IOS Charts, and my x-axis. My x-Axis is supported to be displaying a date, but since the upgrade I cannot get it working, I just get 0 to 6.…
Dave
  • 351
  • 4
  • 18
2
votes
0 answers

iOS-Charts: How to include a gap between data points & lines

I'm using iOS-Charts with Swift to draw line charts, and I'm looking for a way to place a gap between the data points (circles) and the lines themselves. Something like this: example I've tried playing around with some values under the drawLinear…
2
votes
1 answer

iOS Charts: Determine Circle Position on chartValueSelected()

I am using iOS Charts with Swift 3. When a user clicks on a circle/point on my graph, I want to show a popup that has the value and a date. I detect the click inside chartValueSelected() and show the popup like this: func chartValueSelected(_…
Clifton Labrum
  • 13,053
  • 9
  • 65
  • 128
2
votes
1 answer

Working with Charts( BarChartDataEntry) iOS library inObjective C with Xcode 8

I installed the Chart library (version 3.0.1) (https://github.com/danielgindi/Charts) in my objective-C project. In the previous version of my code, below line works successfully, BarChartDataSet *set12 = [[BarChartDataSet alloc]…
pkc456
  • 8,350
  • 38
  • 53
  • 109
2
votes
0 answers

Horizontal stacked barChartView with ios-charts (port of MPAndroidChart) in Swift

I'm trying to recreate a stacked horizontal bar chart similar to this example: http://www.highcharts.com/demo/bar-stacked My current chart is pretty close to the example, but I don't have the flexibility in the labeling / coloring that I would like…
user479947
2
votes
4 answers

Line graph using ios charts swift 3

I am using ios chart to implement Line graph in Swift 3 . As in earlier versions of Swift, we had constructor to bind x values to Line graph, but there doesn't seems any such in Swift 3? Kindly help if anyone has some inputs.
Bhagyalaxmi Poojary
  • 1,213
  • 1
  • 12
  • 17
2
votes
1 answer

IOS Charts crashes when data source has only 1 value

I am not sure how IOS Charts should behave when there is only 1 value to display, but for me it crashes all the time with the error: fatal error: Index out of range Here is where the problem is happening: func stringForValue(_ value: Double, axis:…
Adrian
  • 19,440
  • 34
  • 112
  • 219
2
votes
1 answer

iOS-Charts - Blank Line appears on bottom of chart

I'm using iOS-Charts and after upgrading to Swift3, I'm now noticing there is a strange blank space where the description would go at the bottom of the chart. I tried hiding the description (setting it to "" or enabled = false) but it still shows…
NullHypothesis
  • 4,286
  • 6
  • 37
  • 79
2
votes
1 answer

Data points not showing in line chart

I'm using iOS-Charts library to make charts in my project. I tried to plot some reading against dateTime stamp. I converted the date object to milliseconds in order to make it as a double value which the line chart accepts. When I tried this method…
Praveen Kumar
  • 547
  • 1
  • 7
  • 33