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

where is the code for draw the xAxis and yAxis indicateLine #3628

Closed
milkatgit opened this issue Sep 7, 2018 · 4 comments
Closed

where is the code for draw the xAxis and yAxis indicateLine #3628

milkatgit opened this issue Sep 7, 2018 · 4 comments

Comments

@milkatgit
Copy link

milkatgit commented Sep 7, 2018

img_2979

@milkatgit
Copy link
Author

I have seen the drawRect method in ChartViewBase file, But I don't know where the code of draw the xAxis and yAxis
390aab79-d0ad-4903-9594-ecf766af6d77
line

@abhi137
Copy link

abhi137 commented Sep 7, 2018

Look for XAxisRenderer.swift

@LuoPengFei
Copy link

BarLineChartViewBase.swift

`if leftAxis.isEnabled
{
leftYAxisRenderer.computeAxis(min: leftAxis._axisMinimum, max: leftAxis._axisMaximum, inverted: leftAxis.isInverted)
}

    if rightAxis.isEnabled
    {
        rightYAxisRenderer.computeAxis(min: rightAxis._axisMinimum, max: rightAxis._axisMaximum, inverted: rightAxis.isInverted)
    }
    
    
    if _xAxis.isEnabled
    {
        xAxisRenderer.computeAxis(min: _xAxis._axisMinimum, max: _xAxis._axisMaximum, inverted: false)
    }
    
    xAxisRenderer.renderAxisLine(context: context)
    leftYAxisRenderer.renderAxisLine(context: context)
    rightYAxisRenderer.renderAxisLine(context: context)

    // The renderers are responsible for clipping, to account for line-width center etc.
    xAxisRenderer.renderGridLines(context: context)
    leftYAxisRenderer.renderGridLines(context: context)
    rightYAxisRenderer.renderGridLines(context: context)
    `

@liuxuan30
Copy link
Member

you mean renderGridLines

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

4 participants