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
5
votes
1 answer

ios-charts Draw grid lines only below data

I need to draw grid lines (on line chart) only below the data. I couldn't find an API for it, yet. Here I drew something showing what I get and what I need: Top drawing is what I get. Below is what I need. Sorry for awful drawing talent :) Any…
Arda Oğul Üçpınar
  • 881
  • 1
  • 14
  • 38
5
votes
1 answer

Remove all grid lines in ios-charts

I already have let chartView = LineChartView() chartView.rightAxis.enabled = false chartView.leftAxis.enabled = false chartView.drawBordersEnabled = false This chart is simply sample data: let values = (0..<30).map { (i) -> ChartDataEntry in let…
dareniott
  • 355
  • 4
  • 8
5
votes
1 answer

How to use String values for X-Axis in Charts instead of doubles?

I want to display String values for X-Axis in line chart via using 'Charts' I've followed tutorial for same here. As per wrote there let lineChartData = LineChartData(xVals: dataPoints, dataSet: lineChartDataSet) I'm not finding in current latest…
Mrugesh Tank
  • 3,495
  • 2
  • 29
  • 59
5
votes
1 answer

ticks below x-axis (iOS Charts)

I want to make ticks below the x-axis where the date labels (3.6., 7.6., 12.6. 17.6, 21.6., 26.6.) are (see image below). I'm using the iOS Charts library (https://github.com/danielgindi/Charts). I managed to make ticks inside the graph by…
chris
  • 353
  • 3
  • 8
5
votes
3 answers

Remove Value Labels from iOS Charts Pie Chart

I have a pie chart and I'm trying to remove the value labels from the chart as they are spilling on to each other, but no code seems to take it away. This is the code I've been using to try to remove it: chartIMG.drawEntryLabelsEnabled = false but…
Chris Campbell
  • 313
  • 7
  • 21
5
votes
1 answer

Line chart fill color is faded

I am trying to setup a line chart with one fill colour but for some reason, the fill colour is faded. Example Both the random view I have added to middle of screen and the fill colour of the line chart are set to be red, but for some reason the…
AdamM
  • 4,400
  • 5
  • 49
  • 95
5
votes
5 answers

How to customize datapoint labels in iOS Charts?

I'm trying to make my datapoint labels in a linechart display a custom string instead of their actual number (using the iOS Charts/ Charts library). I want to know if there is something like IAxisFormatter which I used to format my x and y axis…
holycamolie
  • 277
  • 1
  • 3
  • 10
5
votes
3 answers

iOS Charts - always show limit line

I'm using the "Charts" library (by Daniel Gindi) on iOS. I draw a LineChartView (no issue there), and want to add a limit line to represent the target value: let targetLine = ChartLimitLine(limit: targetValue, label:…
Frederic Adda
  • 5,905
  • 4
  • 56
  • 71
5
votes
2 answers

Combined Chart (line- and bar chart) using iOS-Charts

I am trying to combine a line- and bar chart in swift (iOS-charts). Both the x- and the y-axis seem to be scaled properly, but the data is not showing on the chart. What am I missing? import UIKit import Charts class CombinedChartsTest:…
Nils
  • 313
  • 1
  • 2
  • 14
5
votes
1 answer

Tap callback on bar in BarChart in iOS-Charts

I have implemented a bar chart and I would like to move to a more specific view when tapping a specific bar - just as if I tapped a UIButton. Is this possible? I need to know which bar I tapped in order to fill my other view with correct data, but I…
ClockWise
  • 1,509
  • 15
  • 32
5
votes
2 answers

Overcrowded labels are unreadable in piechart and barcharts

For PieCharts, there are often several "slices" with a very small portion of the data (< 2%, for example), and as a result, the labels overlap each other and are unreadable, displayed below. Does anyone know solutions to this? I've seen some…
Mahir
  • 1,684
  • 5
  • 31
  • 59
4
votes
2 answers

Swift ios : Implement scroll on Bar chart

Tried to implement scroll on Barchart using scale x to 2 for zoom in. But the issue is the x-axis values are not center-aligned with Bar chart. Labels count is based on day and month values. barChartView.xAxis.axisMinimum =…
Vinay Podili
  • 335
  • 1
  • 3
  • 16
4
votes
1 answer

iOS charts will not draw multiple datasets when the sets use different ranges of X-coordinates

When creating a line chart from more than one data sets, the line chart only shows one of the data sets and when zooming or panning the chart it crashes with Fatal error: Can't form Range with upperBound < lowerBound. If I create the line chart from…
pbm
  • 5,081
  • 4
  • 18
  • 31
4
votes
0 answers

How to add animation to a marker using iOS charts?

I'm trying to add a scale-up animation to the marker using UIView.animate() but it doesn't seem to work. Here's what I did... class BubbleMarkerView: MarkerView { @IBOutlet weak var gradeLabel: UILabel! @IBOutlet weak var bubbleView:…
Nobin Jacob
  • 573
  • 5
  • 9
4
votes
1 answer

How to show the Y grid lines without the Y-Axis in iOS-charts

I am working on a chart, with the "danielgindi/Charts" ( iOS-charts ), I want to be able to show the grid lines for the Y axis, but without the base. This should be the result: But I am stuck and can't get the lines without having to enable the…
J Arango
  • 939
  • 1
  • 8
  • 21