Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chart auto min/max does not take into account second line #1136

Closed
A1exandre opened this issue Jun 14, 2016 · 0 comments
Closed

Chart auto min/max does not take into account second line #1136

A1exandre opened this issue Jun 14, 2016 · 0 comments

Comments

@A1exandre
Copy link

A1exandre commented Jun 14, 2016

Hi,

I have a custom LineChartView, with two lines and I use self.leftAxis.resetCustomAxisMax() and Min().
However, I've noticed that if a min or a max is in the second line, it is not taken into account by the auto max/min of the chart.

Here's how my code is setup:

self.data = FirstLineDataSet
self.data.addDataSet(secondLineDataSet)

then I set all the chart's settings, including calling resetCustomAxisMax

 self.backgroundColor = UIColor(white: 0, alpha:0)
        self.leftAxis.removeAllLimitLines()
        self.rightAxis.removeAllLimitLines()
        self.leftAxis.enabled = true
        self.rightAxis.enabled = false

        self.xAxis.labelFont = UIFont(name: "Bariol", size: 10)!
        self.gridBackgroundColor = UIColor(white: 0, alpha:0)
        self.noDataText = ""

        self.leftAxis.labelPosition = .OutsideChart
        self.leftAxis.drawLabelsEnabled = false
        self.leftAxis.drawAxisLineEnabled = false
        self.leftAxis.enabled = true

        self.xAxis.enabled = true
        self.xAxis.drawAxisLineEnabled = true

        self.legend.enabled = false
        self.descriptionText = ""
        self.backgroundColor = UIColor(white:0, alpha:0)

        self.xAxis.drawAxisLineEnabled = false
        self.xAxis.drawGridLinesEnabled = false
        self.xAxis.labelPosition = .Bottom

            self.pinchZoomEnabled = false
        self.doubleTapToZoomEnabled = false
        self.dragEnabled = false
        self.drawMarkers = false


        self.xAxis.avoidFirstLastClippingEnabled = true
        self.extraLeftOffset = 15
        self.extraRightOffset = 15

        self.leftAxis.resetCustomAxisMax()
        self.leftAxis.resetCustomAxisMin()
@A1exandre A1exandre changed the title Chart auto min/max does not take into account Chart auto min/max does not take into account second line Jun 14, 2016
@jjatie jjatie closed this as completed Apr 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants