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

Why the coordinate points and the X axis the above data is not aligned? #1492

Closed
dadigua2333 opened this issue Sep 20, 2016 · 5 comments
Closed

Comments

@dadigua2333
Copy link

dadigua2333 commented Sep 20, 2016

I want "point C "and "X_value C" on the same vertical line, but now "point C" and "unknowValue" are on the same line.
In this picture below,as you see , I just added 4 points to chart.I want them to align one by one.

666

My second question is:

I want the X axis to always show the point I set.But when I zoom in on the Chart scale.
As shown below.
The data on the X axis is not my addition.
How to clear them?

2222

@dadigua2333 dadigua2333 changed the title [Line Chart] How to Let X axis alignment shown on the label of a turning point Why the coordinate points and the X axis the above data is not aligned? Sep 22, 2016
@danielgindi
Copy link
Collaborator

I honestly don't understand your questions

@Huang-Libo
Copy link

Huang-Libo commented Sep 29, 2016

@danielgindi
Forgive his English is not good...Maybe I can do some translation for you.
He @dadigua2333 may means :

  1. The time label's value on xAxis is not what he has set in initWithX:y: function.The answer: the value on xAxis has been rounded in AxisRendererBase.swift.You can learn more in (v3.0 + Swift3.0)IChartAxisValueFormatter's protocol function pass on a unexpected value(double value discard) #1503.
  2. There many label with same value(eg: 12:05) on xAxis. The answer: user granularity to handle this problem.

@dadigua2333
Copy link
Author

dadigua2333 commented Sep 29, 2016

@Huang-Libo
谢谢你的翻译~ 我的英文实在是不太好.用百度翻译 写上来的.
我试过用granularity 这个属性来调整. 有一个问题是:我的这个表格的X轴数据的个数不确定. 因为检测体温的总时长由用户自己决定. 难道要我计算出一个公式,加载一个动态的 granularity么?

@danielgindi
I will immediately edit my question. Thanks for your reading.

@danielgindi
Copy link
Collaborator

We need a code example to understand what's going on. Labels show the string that you return from the formatter. You can see a working demo in the Time Line Chart .
It is possible that you've set centerAxisLabelsEnabled to true, which is meant for centering below bars etc.

@liuxuan30
Copy link
Member

I think he wants to say that the point c's x value is some value other than 12:16, it wants the x axis to show point c's x value.

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