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

Chart > Indicator 인디케이터의 dataIndex가 0일 때 위치가 정확하지 않음 #1299

Closed
Mun94 opened this issue Oct 19, 2022 · 0 comments

Comments

@Mun94
Copy link
Collaborator

Mun94 commented Oct 19, 2022

image

Mun94 added a commit that referenced this issue Oct 20, 2022
#####################################################
[원인]
 - SelectedLabel 데이터 많을 때 정확하게 0번째 위치에 인디케이터가 생기지 않는데 데이터가 많아서 그래프의 포인트간 간격이 6 이하일 때 원하는 차트의 날짜에 클릭했을 때 정확하게 인디케이터가 생성 되지 않음.

[수정 내용]
 - 차트 포인트 간격이 6 미만일 때 데이터간 간격의 최소 값인 1.5로 계산하여 데이터 값의 x - 1.5 < 클릭한 차트의 xp 위치 && xp < x + 1.5로 오차 범위를 최소화 함.
Mun94 added a commit that referenced this issue Oct 24, 2022
#####################################################
 [원인]
 - SelectedLabel 데이터 많을 때 정확하게 0번째 위치에 인디케이터가 생기지 않는데 데이터가 많아서 그래프의 포인트간 간격이 6 이하일 때 원하는 차트의 날짜에 클릭했을 때 정확하게 인디케이터가 생성 되지 않음.

[수정 내용]
 - 차트 포인트 간격이 6 미만일 때 데이터간 간격의 최소 값인 1.5로 계산하여 데이터 값의 x - 1.5 < 클릭한 차트의 xp 위치 && xp < x + 1.5로 오차 범위를 최소화 함.

[수정 범위]
 - line chart
jhee564 pushed a commit that referenced this issue Oct 24, 2022
* [#1299] Chart > Indicator 인디케이터의 dataIndex가 0일 때 위치가 정확하지 않음
#####################################################
 [원인]
 - SelectedLabel 데이터 많을 때 정확하게 0번째 위치에 인디케이터가 생기지 않는데 데이터가 많아서 그래프의 포인트간 간격이 6 이하일 때 원하는 차트의 날짜에 클릭했을 때 정확하게 인디케이터가 생성 되지 않음.

[수정 내용]
 - 차트 포인트 간격이 6 미만일 때 데이터간 간격의 최소 값인 1.5로 계산하여 데이터 값의 x - 1.5 < 클릭한 차트의 xp 위치 && xp < x + 1.5로 오차 범위를 최소화 함.

[수정 범위]
 - line chart

* version update
Mun94 added a commit that referenced this issue Oct 25, 2022
#########################################
[원인]
 - gdata의 0, 1 인덱스 요소가 없을 때 xp 프로퍼티를 찾지 못하게 되고 타입에러가 발생하게 됨.

[수정 내용]
 - gdata에 1개 이상 데이터 있을 경우 findGraphData 함수 내부 로직 실행.
 - gdata의 원소가 1개 뿐이여서 xp 간 간격을 계산 할 수 없을 경우 undefined - xp < 6 은 false로 기존 값인 6을 가지고 내부 로직이 실행 되도록 수정.
Mun94 added a commit that referenced this issue Oct 25, 2022
Mun94 added a commit that referenced this issue Oct 25, 2022
#########################################
 - gdata의 length 참조 전에 Optional Chaining 추가
@Mun94 Mun94 closed this as completed Nov 3, 2022
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

1 participant