-
-
Notifications
You must be signed in to change notification settings - Fork 532
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
[Bug] overlay with point in the future does not saving right #459
Comments
Screen.Recording.2023-06-26.at.11.54.11.mov |
Best possible fix probably will be draw invisible candles all the way to the right. |
I fixed it in my repo by updating it in if (this.coordinateToPointTimestampDataIndexFlag()) {
const xAxis = chart.getPaneById(PaneIdConstants.XAXIS)?.getAxisComponent() as Axis
const dataIndex = xAxis.convertFromPixel(coordinate.x)
const timestamp = timeScaleStore.dataIndexToTimestamp(dataIndex) ?? undefined
const klines = chart.getChartStore().getDataList()
if (timestamp === undefined) {
const index = dataIndex < 0 ? 0 : dataIndex > klines.length - 1 ? klines.length - 1 : dataIndex
point.timestamp = klines[index].timestamp
point.dataIndex = index
} else {
point.dataIndex = dataIndex
point.timestamp = timestamp
}
} |
It may not be necessary to change the source code, listen to the onDrawing of overlay, and then determine if it exceeds the boundary, forcing a reassignment of points. |
I noticed this too |
But its not a solution for the problem. If library can't handle it should force it by default. |
KLineChart._.Features.preview.-.Google.Chrome.22.09.2023.09_49_57.online-video-cutter.com.mp4Likewise, if the starting and ending points are too far apart, the overlay remains hidden when LoadMore is not performed. (Even if it is within Timestamp borders) |
Version
9.5.9
Steps to Reproduce
Current Behavior
If check points data it will looks li that:
It will lead to bugs if saving it and restore later
Expected Behavior
Chart should calculate timestamp based on interval and point location or do not let user to make point in the future
Environment
Any additional comments?
No response
The text was updated successfully, but these errors were encountered: