Page 1 of 1

viewxy - candlestick items without any stock information

Posted: Mon Jun 06, 2016 9:25 pm
by greggorob64
Hello. I have a chart, and would like to put a couple of candlestick 'points' at arbitrary coordinates.

When you hover over a specific point, i want to add a few lines on the screen (easy), but also draw one of the candlestick objects away about 25px to the right. I put a little mockup below of what I'd like:

Is there a way for me to arbitrary place a candlestick point on my chart like this? I'm hoping I don't have to completely make it from scratch, but its seeming liek I'll need to.


Image

Re: viewxy - candlestick items without any stock information

Posted: Tue Jun 07, 2016 7:28 am
by ArctionKestutis
Hello,
You could subscribe to MouseEventHandler for the Chart. In the event-handler you check that mouse over desired series and do other things you would like to add. For example, you can add annotation table, get nearest value, draw line etc. There is an example in demo apps, which shows most of those steps:
XYview -> Stock/Trading -> Customized candles
Other way around is to use arrow-caliper (specific Annotation object) in your event-handler. There are many annotation-examples, please check those for ideas.

Re: viewxy - candlestick items without any stock information

Posted: Tue Jun 07, 2016 8:25 pm
by greggorob64
Well I started with arrow-caliper annotations, and I'm not quite sure how to leverage that into what I need (something resembling candlestick). So far it just looks like an arrow with a line in the end, is there more to it than that I'm missing?

Image

Re: viewxy - candlestick items without any stock information

Posted: Tue Jun 07, 2016 8:36 pm
by greggorob64
Following up with my own post, I'm not sure how to approach using the stock points. They require Date/Time as thier X axis to connect to, and all of my Y axis are numeric. Is there way to make the two work on the same axis? Having to generate another X axis would be a pretty massive amount of work

Re: viewxy - candlestick items without any stock information

Posted: Wed Jun 08, 2016 1:36 pm
by ArctionKestutis
You could build your own “candlestick”. Check the example “Box/Whisker plot” from LightningChart demo. The candlestick could be built from PolygonSeries and LineCollection, therefore, maybe not completely from scratch.

Re: viewxy - candlestick items without any stock information

Posted: Wed Jun 08, 2016 4:33 pm
by greggorob64
At that point it woudl just be easier to use a rectangle annoation with fill and a couple of line notations, which sounds like my only solution. It