KLineChart icon indicating copy to clipboard operation
KLineChart copied to clipboard

[Feature] Provide timestamps for Shape points in the future (beyond the right-most candle)

Open aelr opened this issue 4 years ago • 3 comments

Feature Description

I'm trying to draw trend lines that extend into the future, using the segment Shape. However, point[1].timestamp on the segment is undefined. I expect that it's possible to determine the timestamp, even though it extends beyond the chart. I'm looking for a way to do so.

By the way, this library is awesome. Thank you for all of the hard work!

To Do

Provide a value for timestamps even when they are off of the chart area.

aelr avatar Jun 30 '22 05:06 aelr

You can set the timestamp and dataIndex values manually. I needed the segment shape to begin before the first data timestamp point. I left the point[0].timestamp undefined and assigned the negative point[0].dataIndex value - it worked.

olablt avatar Jun 30 '22 06:06 olablt

I needed the actual timestamp values for use externally. I was able to solve the problem by adding a bunch of dummy candles to the right of the chart.

aelr avatar Jul 01 '22 21:07 aelr

Creating the line does work. But I'm trying to get the timestamp value for the drawn line for external processing.


From: Melitonas @.> Sent: Thursday, June 30, 2022 2:05:02 AM To: liihuu/KLineChart @.> Cc: aelr @.>; Author @.> Subject: Re: [liihuu/KLineChart] [Feature] Provide timestamps for Shape points in the future (beyond the right-most candle) (Issue #260)

I think you can set the timestamp and index values manually. I needed the segment shape to begin before the first data timestamp point. I left the timestamp undefined and assigned the negative index value - it worked.

— Reply to this email directly, view it on GitHubhttps://github.com/liihuu/KLineChart/issues/260#issuecomment-1170803344, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAZRH2OOUKYWCUI4X7OZJK3VRU2I5ANCNFSM52IBYNFA. You are receiving this because you authored the thread.Message ID: @.***>

aelr avatar Oct 11 '22 06:10 aelr