xAxis values on both sides of Line Charts - ios

I am using the iOS Charts library in my application. Charts are plotted correctly but the X axis values are shown on both sides in Line Charts. Is there any way to hide it or remove it ?

You can use lineChartView.rightAxis.enabled = false to hide rightAxis or replace with leftAxis

Related

How do I change the color of the separator between two slices of a pie chart in charts for iOS?

I am using the Charts pod for iOS (github here: https://github.com/danielgindi/Charts ) to make a pie chart.
There is a 1 pixel line in between each slice of the chart. I would like to change the color of this line and/or make it thicker. However, I have not been able to find a way to do either of these things. How do I do this?
Here is what I tried unsuccessfully based on what I found in the PieChartView docs:
chart.tintColor = .blue
chart.maxAngle = 5
Its slice spacing between each slice of Pie Chart. If you want to change or increase that space then you can set space using yourPieChartDataSet.sliceSpace = 5.
i think ther are no seprators you can change the background color of your view and set the corner radius to height / 2

How to shift data on xAxis to right on Daniel Gindi charts?

I have a data chart DataChart would like to shift data of xAxis along with data lines to right by certain value.
DataChart Screen Shot
Please help me out which property to use from the library that would be able to solve this purpose.
I am using Daniel Gindi line charts for this purpose.
I use this to create an offset to the left of my chart
myChart.xAxis.spaceMin = 10
maybe it'll do for you
And to align the yAxis lines in front of the labels, i think you could remove the background grid and create your own limit lines if you don't find any other way around
is it viable to subtract the distance d from the x values? that would shift it rightward.
d = 7.0
rightShifted = newGraphData.values.map{ChartDataEntry(x:$0.x-d, y:$0.y)}

How to remove text from Pie chart section in IOS Swift 3?

I am in mid of developing small 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.
But then I don't want to show the the text inside the pie chart because it doesn't look great/overlap with other text when the area size is very less.
Any idea, how to do it? Those Jan, Feb text should not appear inside the pie chart circle.
you have to FALSE below properties for chart
chartView.highlightPerTapEnabled = false
chartView.usePercentValuesEnabled = false
chartView.drawEntryLabelsEnabled = false

iOS-charts radar chart removing labels and filling the web with color

Probably a very basic question.
I am using iOS-charts and am working with a radar chart.
I am struggling to figure out how to remove the labels from the graph and I am really struggling to FILL the web. I can change the outer lines but I want to fill the web/data in a specific colour.
any help would be much appreciated.
Kind regards
Wayne
So, there are two types of labels on a radar chart, the axis label that shows you the list of possible values on the chart from min to max and the labels that correspond to each point on your graph.
REMOVING AXIS LABELS
Grab either the x or y axis on your radar chart view and set drawLabelsEnabled to false depending on the axis of the labels that you wish to hide
let yAxis = radarChartView.yAxis
let xAxis = radarChartView.xAxis
yAxis.drawLabelsEnabled = false
xAxis.drawLabelsEnabled = false
REMOVING LABELS FOR VALUE OF EACH POINT
Go to the location that you create your RadarChartDataSet
Before using it to create your RadarChartData, set the drawValuesEnabled property to false
let radarChartDataSet = RadarChartDataSet(yVals: dataEntries, label: "label")
radarChartDataSet.drawValuesEnabled = false
Also, here's a link to the Charts documentation page which can also be helpful (although it is not fully filled-in): http://cocoadocs.org/docsets/Charts/2.0.9/index.html

setting yAxis in iOS-charts swift iOS 8

I'm learning ios-charts and I was wondering how to manipulare the yAxis since there is no method related to that. On the contrary xAxis can be customized.
A small example, by default I have two set of labels for the yAxis as the figure shows.
I managed to move the xAxis labels using
lineChartView.xAxis.labelPosition = .Bottom
but there is no such thing for the yAxis.
Is it possible to leave just the labels on the left clearing the labels on the right?
use rightAxis.drawLabelsEnabled = false or even rightAxis.enabled = false.
The xAxis is rendered by xIndex, which means the distance between each data point on xAxis is equal. But yAxis is rendered by the data value and the yaxis range.
So be careful, when you are setting the dataSet, you got a chance to set the axis dependency, like dataSet.axisDependency = axisDependencyRight. Then it will use rightAxis to render your line chart, not left axis. By default, it is axisDependencyLeft
You can choose which yAxis you would like to have, and just disable the other one. rightAxis.drawLabelsEnabled = false just don't render the label, but still calculated and rendererd. Watch out for this.
I think that the only way to do it is the following
let yaxis = lineChartView.getAxis(ChartYAxis.AxisDependency.Right)
yaxis.drawLabelsEnabled = false

Resources