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

Custom xAxisRenderer #2230

Closed
npmrtsv opened this issue Mar 7, 2017 · 2 comments
Closed

Custom xAxisRenderer #2230

npmrtsv opened this issue Mar 7, 2017 · 2 comments

Comments

@npmrtsv
Copy link

npmrtsv commented Mar 7, 2017

I'm trying to set my custom xAxisRenderer like this:

  class CustomXAxisRenderer: XAxisRenderer{
  }

  chart.xAxisRenderer = CustomXAxisRenderer(viewPortHandler: chart.viewPortHandler, xAxis: chart.xAxis, transformer: Transformer(viewPortHandler: chart.viewPortHandler))

But after that I can't see any xAxis labels or grid lines, because of incorrect valueToPixelMatrix. What is correct way to set custom renderer?

@npmrtsv
Copy link
Author

npmrtsv commented Mar 8, 2017

Ok, I solved it.

  chart.xAxisRenderer = CustomXAxisRenderer(viewPortHandler: chart.viewPortHandler, xAxis: chart.xAxis, transformer: transformer: chart.getTransformer(forAxis: .left))

@npmrtsv npmrtsv closed this as completed Mar 8, 2017
@hernanarber
Copy link

VERY HELPFUL! Thanks

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