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

In ios-charts how to set the maximum value for y-axis?

I am using ios-charts to display a Horizontal BarChart with one value like this: var dataEntries: [BarChartDataEntry] = [] let dataEntry = BarChartDataEntry(value: self.deductible!.deductiblePaid, xIndex: 0) …
userx
  • 1,083
  • 5
  • 18
  • 36
2
votes
7 answers

Cannot load underlying module for 'Charts'

I'm just getting started with the iOS charts library : I followed all the steps described under 'Usage' on the main page (https://github.com/danielgindi/ios-charts): I added a UIView and made it subclass LineChartView --> in ViewController.swift:…
kmn
  • 2,615
  • 4
  • 18
  • 28
1
vote
0 answers

Show Gap/Patch in line graph

I am using charts lib in app for creating line graph but i want a gap/patch in graph where empty dataset or in those xaxis there is no data. Thanks for help!
Arun sharma
  • 642
  • 1
  • 7
  • 17
1
vote
0 answers

Customized view in place of labels in Line Chart iOS

I am using this chart library to draw a line chart in swift. But the problem is I need to draw a custom view on x-axis instead of labels for values, please refer the attached image for reference. So far I have tried to cutomized valueFormatters and…
Rocky
  • 137
  • 1
  • 11
1
vote
1 answer

How to fix iOS Charts Bar Chart X Axis labels Duplicating and bleeding

I am trying to display a bar chart using this library with months as the X-label. However, the x labels seem to be duplicating and "bleeding" to the next columns especially when I scroll. How do I fix this? Code: let xAxis = barChartView.xAxis …
Mocha
  • 2,035
  • 12
  • 29
1
vote
0 answers

Swift Chart with multiple chart lines only displays the last line on the chart

I'm using the Swift version of the 'Charts' framework in iOS ( https://github.com/danielgindi/Charts ) to chart a series of lines. If I chart any one of the lines, it works fine. But if I attempt to chart all of the lines, only the last line…
Son of a Beach
  • 1,733
  • 1
  • 11
  • 29
1
vote
1 answer

iOS Charts: Where are the values actually coming from?

I have the following Xaxis formatter: extension ChartXAxisFormatter: IAxisValueFormatter { func stringForValue(_ value: Double, axis: AxisBase?) -> String { guard let referenceTimeInterval = referenceTimeInterval, let…
123432198765
  • 276
  • 3
  • 14
1
vote
0 answers

iOS Charts: how to set a specific background color for every data set of a bar chart?

I'm using Daniel Gindi's Charts library implementing a bar chart on iOS. My chart has several data sets. I'm able to set a specific color for every value of a bar. let dataSet = BarChartDataSet(entries: entries, label: nil) dataSet.colors =…
Dmytro Skorokhod
  • 424
  • 8
  • 17
1
vote
1 answer

Is it possible to always set 0 in the center of Charts's Y-axis with swift charts lib?

According example image I want to create my chart like that. My data entries have both positive and negative values, I want to set 0 in the middle of y-axis everytime. Is impossible to do that? Ps. I use Charts library with swift version 5.
Tar journey
  • 379
  • 4
  • 13
1
vote
0 answers

Identical values on the x-axis of charts

I am using the Charts to plot graph.Getting correct value at initially ,but when start to zoom graph, some values on the X-axis becomes identical. have written the code like this. self.lineChartView.setVisibleXRange(minXRange: 2, maxXRange:…
Manish Kumar
  • 997
  • 2
  • 13
  • 30
1
vote
1 answer

Set the maximum of the Y-Axis of a LineChartView | pod 'Charts'

I have created a LineChartView using the 'Charts' pod. I have made the plotted line follow a function (f(x) = ax^2) where the value 'a' is being randomized as soon as the user touches the LineChartView. The x-axis has a defined maximum of 100…
Gabriel
  • 37
  • 4
1
vote
1 answer

How to select pie chart slice by default in Charts library

Am using Pie chart in, Charts ios library. I want to know, how can i select first slice by default when it Pie chart loads. I found this chartView.highlightValue(x: 45, dataSetIndex: 0). But this code is not working. My pie chart has two slices with…
1
vote
0 answers

Display Discontinuous Line chart in iOS Charts

I am using iosCharts Framework for desiging Line and Bar charts in iOS application. I have a requirment of displaying the discontinuous line chart. Is it possible in iOSCharts framework. If Yes can any one provide me the solution.
Evoke iOS
  • 11
  • 2
1
vote
0 answers

How do I draw yaxis min value as different color on certain limit?

I am using iOS Charts to draw linechart but unable to draw the same graph as shown below in the image. I tried by setting leftAxis.axisMinimum = minValue but it also not working. If the given value is minimum on certain limit it should show in red…
Sunil Singh
  • 538
  • 3
  • 12
1
vote
1 answer

how to make horizontal padding in iOS danielgindi charts

I'm using the ios-charts library and I would like to add some horizontal padding to my line charts so that the line does not start immediately at the border of the graph. This is my current chart: but I would like the blue line to have some padding…
Jan
  • 7,444
  • 9
  • 50
  • 74