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

Set intervals for Y axis labels #55

Open
sakshityagi opened this issue Nov 2, 2016 · 2 comments
Open

Set intervals for Y axis labels #55

sakshityagi opened this issue Nov 2, 2016 · 2 comments

Comments

@sakshityagi
Copy link

I want the labels on Y axis of my line chart to show with definite intervals. For example like 0, 1, 2, 3 or 0, 2,4,6.. so on.

I tried using granularity property as mentioned in MP chart library like :

yAxis={{drawGridLines:true,textColor:"#FFFFFF",granularity:"1"}}

, but nothing happened. Can you please guide me on this.

@hongyin163
Copy link
Owner

this project didn't surport granularity ,you can add it to project refer to mpandroidchart project

@qianhy
Copy link

qianhy commented Jan 23, 2017

你好 我在 MPBarLineChartManager.java 中的private void setYAxisInfo(YAxis axis,ReadableMap v)函数添加了if(v.hasKey("granularity")) axis.setGranularity((float) (v.getDouble("granularity"))); 确实有设置最小间隔,但是我在设置为小数时出现问题。 Y轴标志没有出现预想到的小数数值,反倒都是整数就像是被取整了一样。
yAxis={{
startAtZero:false,
drawGridLines:true,
granularity:0.1,
//granularityEnabled:false,
position:"OUTSIDE_CHART",
textColor: "#E94343"
}}这个是我Y轴设置
希望你能帮我

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

3 participants