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

Dynamic generate Int values for axis #2253

Closed
LiborZ opened this issue Mar 17, 2017 · 1 comment
Closed

Dynamic generate Int values for axis #2253

LiborZ opened this issue Mar 17, 2017 · 1 comment

Comments

@LiborZ
Copy link

LiborZ commented Mar 17, 2017

Hi, I like this library but I am not sure how to fix my problem. It's better if I describe it with image:
screenshot 2017-03-17 at 08 38 13

I would like to have integers in x and y axis. I can change it by setting valueFormatter to change double value to integer value and then to string. Thats what I have done for y axis. But the problem is that originally values generated are 1.7, 2.3 etc. so there could be same values twice or more times and line chart points aren't in same level as y or x axis.

How can I fix it? How can I generate only integer values for axis?

@liuxuan30
Copy link
Member

take a look at computeAxisValues(), where generate the axis values. You can override this method, or tweak the original method like forceLabelEnabled feature to get what you want.

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