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
1
vote
1 answer

How to add Strings on Left Axis in iOS-charts?

I am using this code for config left axis: let leftAxis = chartView.leftAxis leftAxis.removeAllLimitLines() leftAxis.gridLineDashLengths = [5, 5] leftAxis.drawLimitLinesBehindDataEnabled = true leftAxis.labelTextColor = .white leftAxis.axisMinimum…
reza_khalafi
  • 6,230
  • 7
  • 56
  • 82
1
vote
1 answer

iOS charts what to do with empty dataset

I use charts for my project. However, I now run into a problem that if a dataset is empty I will all report error when I see debug area. Now I am trying to find a solution to be able to stop creating the chart if the dataset is empty. the error…
Wouter
  • 809
  • 7
  • 19
1
vote
1 answer

iOS Charts zoom into a range of values

Is it possible to set the chart zoom to a range of values within the dataset? So currently we have a chart that can display close to 100 values within it. What we're trying to achieve is the ability to zoom into a range of values i.e. The first 12…
TundsAds
  • 51
  • 3
1
vote
2 answers

How to detect tap gesture on chart marker?

I am using Charts to create custom graphs in an application. The one thing I am having trouble with is detecting touch events on the chart marker that is presented for the current value. I want to perform and action based on the marker that was…
smandrus
  • 305
  • 1
  • 2
  • 16
1
vote
1 answer

Pie Chart entries outside slices have different position offsets

The Charts library I'm using: Daniel Gindi - Charts If you look at the above image, the position offset of entries outside each slice are variable both in distance from the slice as well as in alignment. What I want: Align the entry text to be at…
Rameswar Prasad
  • 1,331
  • 17
  • 35
1
vote
1 answer

Line Chart xAxis label with multiple colour using (iOS-charts) and LineChartData setValueTextColor

Here i'm using iOS-charts to implement line chart. I'm stuck with using multiple colours for xAxis labels and value at each data point. https://github.com/danielgindi/Charts For xAxis i need NSAttributedString with two different colours, this is the…
Sandeep
  • 110
  • 9
1
vote
0 answers

Custom scaling of the X-Axis

I have a daily record over a period of 5 years. In the X-axis, however, I would like to display only the years. Is there a best practice for this approach? Maybe to override some functions from the XAxisRenderer…
1
vote
1 answer

Returning to xcode/swift/ios project - suddenly get "no such module"

I think xcode is having a laugh at me. I open my old project that uses charts library https://github.com/danielgindi/Charts/ and get error No such module Charts where I use import Charts I then tried to remove Charts from my project. Downloaded…
Tom
  • 3,587
  • 9
  • 69
  • 124
1
vote
2 answers

danielgindi/iOSCharts library : x axis label in horizontal bar chart

with the following code barchart.xAxis.labelTextColor = UIColor.white barchart.xAxis.labelPosition = .topInside barChart.xAxis.setLabelCount(7, force: true) Issue: x axis grid get destructed barchart.xAxis.labelTextColor =…
Marios
  • 509
  • 1
  • 7
  • 23
1
vote
1 answer

iOS Charts: Showing grid with axis disabled

I'm working with the charts library but I'm facing an issue I cannot solve. I deactivated my Y and X axis so that the graph goes till the screen margins: mainChartView.rightAxis.enabled = false mainChartView.leftAxis.enabled =…
gmoraleda
  • 1,731
  • 1
  • 17
  • 44
1
vote
0 answers

Bar chart persist chartvalues using UserDefaults

I am trying to persist bar chart values using UserDefaults so that every time the app is invoked it doesn't show blank chart. let defaults = UserDefaults.standard let dataSet = BarChartDataSet(values: [entry1, entry2, entry3, entry4],…
dpathik
  • 11
  • 2
1
vote
0 answers

Get Y value in line chart using cubic lines

I am using the Charts library in an iOS application. The required chart I am implementing, displays realtime values fed from a hardware peripheral. I already implemented adding new entries and scrolling to the latest value, so the chart appears to…
davidv
  • 373
  • 5
  • 14
1
vote
0 answers

How to set maxVisibleCount variable in iOS charts

I'm using Horizontal bar chart and all the values I have is between 10 and 30. I want to display the values in the chart, however the drawValuesEnabled depends on maxVisibleCount (from iOS-charts source) From BaseDataSet.swift /// Set this to true…
deepakssn
  • 5,195
  • 2
  • 24
  • 19
1
vote
1 answer

Why doesn't my line chart display its data?

I'm trying out @danielgindi's Charts framework to create a Line Chart but my data won't display on the chart: I started with the CombinedChartViewController demo because I wanted some of the features that it has. My plan was to remove the chart…
Jim
  • 1,260
  • 15
  • 37
1
vote
1 answer

How can I add the arrow of the maximum and minimum value in iOS-charts?

I want to show the arrow of the maximum and minimum value just like the picture below. Does anyone have ideas about how to achieve it using iOS-Charts? Thanks a lot.
Robin
  • 13
  • 2