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

iOS Charts - How to set the y values under the x axis

I'm using the danielgindi/Charts library and I'm trying to put the Y Value under the X axis. At the moment I have this: And I need this: My code: private func setupBarChart(){ var barChart = BarChartView(frame: frame) …
4
votes
1 answer

How do I update the limit lines in IOS Charts, danielgindi/Charts

So I have added a couple of limit lines. func addLimitLines() { let stopLoss = ChartLimitLine(limit: Double(1.70) , label: "stop loss") stopLoss.lineWidth = 0.5 stopLoss.lineColor = .blue stopLoss.lineDashLengths = [8.0] …
Chris Mikkelsen
  • 3,987
  • 9
  • 29
  • 41
4
votes
1 answer

Multiple Line chart with 2 dataSets

I am trying to draw Multiple line chart using iOS-Charts danielgindi/Charts library by as show in picture. Expected Output: Data1 = [Jun: 34, Jul: 42, Aug: 32, Sep: 30, Oct: 38] Data2 = [Oct: 38, Nov: 40, Dec: 32, Jan: 40] let dataSet1 =…
Rameez
  • 312
  • 4
  • 20
4
votes
0 answers

Allow vertical scrolling of UIScrollView with Charts on iOS

I have a LineChartView from the Charts framework within a UIScrollView. Values on the chart can be highlighted by panning around to see more details about the specific data points. These are my goals for the overall behaviour of panning within my…
4
votes
1 answer

How to disable the rotation option of pie charts in iOS charts?

If I set below property pieChartView.isUserInteractionEnabled = false then it will disable the gesture option also, but in my requirements I have to disable the rotation option. How can I do this one? Thanks in advance
Shilpashree MC
  • 611
  • 1
  • 6
  • 16
4
votes
0 answers

iOS Charts: How to properly scale the bar width based on number of entries?

I'm currently using the iOS Charts library, and I'm trying to scale the width of the bar when using a BarChartView, but I'm having a difficult ensuring the width remains almost the same regardless of how many entries there are in the…
Pangu
  • 3,721
  • 11
  • 53
  • 120
4
votes
1 answer

IOS Charts Labels not centered to data points. Charts Library

I am currently using IOS Charts to for a line chart. This is the link to it: Link It is horribly documented and I am having trouble centering my X-Axis labels to the plots on my chart. I have already enabled granularity and set it to 1. - This…
ethanfox27
  • 890
  • 1
  • 9
  • 25
4
votes
1 answer

Horizontal Bar Chart Labels

I recently upgraded one of my client projects from Swift2 and iOS-charts 2 to Swift3 and iOS-charts 3. Most of the code is functioning as expected after a few days of manual tweaking, however, I am still having an issue with my horizontal bar…
kclair
  • 41
  • 1
  • 3
4
votes
2 answers

Creating custom iOS-Charts renderer

I'm using iOS-Charts library, and I need to subclass HorizontalBarChartRenderer so that I can change implementation of drawDataSet(...). This should be possible as stated before, like in this answer. So I created my custom renderer, but because of…
Adam Bardon
  • 3,829
  • 7
  • 38
  • 73
4
votes
2 answers

How to add tap gesture recognition in Swift3 IOS Pie chart?

I am in mid of developing small practice IOS app using Swift 3. Inside that app, I would like to have a Pie chart. To build a Pie chart, I followed this link and pie chart is getting generated. Now I want to add one more functionality. When user tap…
NGR
  • 1,230
  • 2
  • 15
  • 44
4
votes
4 answers

ios charts label for every bar

I'm using ios charts to display a bar chart. That looks like this: What I want to achive are the labels in the red box (for all bars, I just didn't want to repeat this so often... :P ). That means that every bar get its own "title" label so the…
user2529173
  • 1,884
  • 6
  • 30
  • 43
4
votes
1 answer

X Axis values being repeated rather than replaced iOS Charts

The values on the the axis seem to be repeated rather than being replaced as you can see in the screenshot below it should be plotting the "Jan", "Feb", "Mar", "Apr", "May", "Jun" rather than the result in the simulator. Here is the code class…
Tunds
  • 1,804
  • 2
  • 15
  • 30
4
votes
0 answers

ios-charts horizontal bar charts issues

I experience a number of issues with the horizontal bar chart since I updated to the last version of ios-chart (3.0.0). First thing is that I had labels for the x axis on the charts. With the new version of ios-charts I had to write my own formatter…
M.R.E.D.
  • 41
  • 3
4
votes
1 answer

danielgindi iOS Chart Can I have two different Yaxis scale on a combined chart

I have created a combined chart with line/bar. now, bar chart and line chart using same y scale as left axis(0-5). Can I have line chart remain with it but have bar chart stick to right axis scale(0-10)? linechart yaxis scale from(0-5), barchart…
Nevermore
  • 237
  • 2
  • 14
4
votes
3 answers

How to stretch PieChartView the entire width and length of the parent View

I use the following charts library and have the following custom control: But after chart loaded i got the following picture: Its obvious that PieChartView has greater sizes than output chart. My question is how to make final chart to occupy…
Andrey M.
  • 3,021
  • 29
  • 42