ios-charts

iOS-charts invert the X axis direction

与世无争的帅哥 提交于 2021-02-07 06:47:20
问题 I have a bar chart built using Daniel Gindi iOS-charts. It represents history data over a period of time. The issue I am having is that the data is being plotted from left-to-right (new data -> old data). I need it to be plotted as right-to-left (old data -> new data). I know that I can reverse the order I input data into BarChartData , but then I have the issue of the chart still being left aligned. It needs to be right aligned. I found a discussion here talking about the issue of inverting

Unable to share data between tab view controllers?

。_饼干妹妹 提交于 2021-02-04 08:10:21
问题 I am making an app where I take in user input and display it as a chart, which requires an array of data. I have managed to save data in an array using core data and I cannot figure out how to share that data from one tab to the other TabViewController. here is how the data is stored and fetched in the FirstViewController let number = Numbers(context: PersistenceService.context) number.numberInArray = Int16(numberEnteredInSlider) PersistenceService.saveContext() testArray.append(Int(Double

iosChart not displaying LineChartView points in UITableViewCell

非 Y 不嫁゛ 提交于 2021-01-29 04:44:54
问题 The following is based on the LineChartView example (from youtube) which worked fine in a standard View (single view app) & the BarChartView worked fine in a TableViewCell using the identical idiom to that shown below. I have a time expiring every two seconds to update the cells however not hooked-up yet. The x,y Axis are generated correctly (final graphic showing just 2 of the 9 cells), it's just that the points are not plotted. However, failure only occurs in the LineChartView . I've viewed

How to implement iOS Chart in a tableview cell?

余生颓废 提交于 2021-01-28 22:44:42
问题 I'm using iOS Charts (https://github.com/danielgindi/ios-charts) and it works great in a normal view controller. However, I want to implement these charts in a tableview cell where the data source will be different depending on the cell. Also, the outlet to the view that is displaying this chart is in my cell subclass. How do I implement this code (where it works in a non-repeating view controller) to display in a view in my cell subclass? Thanks in advance!! class ChartViewController:

ios-charts visible data in LineChartView

笑着哭i 提交于 2021-01-28 19:33:06
问题 I'm trying to figure out how to calculate which data indices (along x axis) are in range after panning/zooming the chart. For example, when I zoom in on my linechart, I want to be able to update a tableview to only show the details for the data points that are visible. I've searched the code and documentation i can find, to no avail. 回答1: There is highestVisibleXIndex and lowestVisibleXIndex should help you. I hope I would see your issue earlier, just another weekend not on SO 来源: https:/

iOS-Charts X Axis values are repeating indefinitely when setVisibleXRangeMaximum is set

折月煮酒 提交于 2021-01-28 08:24:04
问题 I am trying to draw a chart where the x-axis is TimeInterval and Y-axis is power consumption . There will be too much data to show as for each day there will be data. For that reason, I want to show 5 x values at a time. I achieved that by setting self.chart.setVisibleXRangeMaximum(5) after setting data for the chart. Though 5 x-axis values are showing but the values are repeating for an indefinite time. Like if the first day is 10/10/2016 all the x-axis values after that are the same for

How to show only 24hr column in line chart?

99封情书 提交于 2021-01-05 08:39:17
问题 I'm working with chart-ios library and i manage to show data in graph like below image. My Json data is like below. i showing field1+field2+field3 in X and created_at in y axis. this data is for 1 day. [ { "created_at": "2020-05-10T00:01:09Z", "field1": 17.57, "field2": 56.37, "field3": 44.06, "equipment": 3 }, { "created_at": "2020-05-10T00:01:55Z", "field1": 17.57, "field2": 54.52, "field3": 44.62, "equipment": 3 }, { "created_at": "2020-05-10T00:02:40Z", "field1": 21.63, "field2": 52.7,

iOS Charts Library - How to handle X-Axis duplicate values

Deadly 提交于 2020-12-04 09:44:05
问题 I have used Charts library by @danielgindi to generate the graph for my iOS application. All seems works fine but we are facing issue with X-Axis data duplication. Input Data for Graph in (X-Axis-Value, Y-Axis-Value) ("29/03/2017 00:00:00","2.7") ("29/03/2017 00:00:00","2.4") ("29/03/2017 00:10:00","1.3") ("29/03/2017 00:10:00","1.5") ("29/03/2017 00:20:00","1.8") .... .... .... ("29/03/2017 01:00:00","1.2") ("29/03/2017 09:00:00","2.7") ("29/03/2017 09:10:00","-10.8") .... .... .... ("29/03

iOS Charts Library - How to handle X-Axis duplicate values

感情迁移 提交于 2020-12-04 09:39:21
问题 I have used Charts library by @danielgindi to generate the graph for my iOS application. All seems works fine but we are facing issue with X-Axis data duplication. Input Data for Graph in (X-Axis-Value, Y-Axis-Value) ("29/03/2017 00:00:00","2.7") ("29/03/2017 00:00:00","2.4") ("29/03/2017 00:10:00","1.3") ("29/03/2017 00:10:00","1.5") ("29/03/2017 00:20:00","1.8") .... .... .... ("29/03/2017 01:00:00","1.2") ("29/03/2017 09:00:00","2.7") ("29/03/2017 09:10:00","-10.8") .... .... .... ("29/03

Chart viewport height increase when chart has no data plot on chart

自古美人都是妖i 提交于 2020-07-23 06:17:09
问题 I am using https://github.com/danielgindi/Charts library. When the chart has no data then chart height increased it should be the same as when the chart has data. Chart xAxis labels overlapped with char title. Any help would be appreciated. Code for chart setup var dataEntries: [ChartDataEntry] = [] axisFormatDelegate = self chartView.legend.form = .none let rightAxis = chartView.rightAxis rightAxis.enabled = false let yAxis = chartView.leftAxis let xAxisValue = chartView.xAxis xAxisValue