viewxy - candlestick items without any stock information

A forum dedicated to WinForms version of LightningChart Ultimate.

Moderator: Arction_LasseP

greggorob64
Posts: 183
Joined: Tue Mar 18, 2014 2:55 pm

viewxy - candlestick items without any stock information

Post by greggorob64 » Mon Jun 06, 2016 9:25 pm

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

ArctionKestutis
Posts: 400
Joined: Mon Mar 14, 2016 9:22 am

Re: viewxy - candlestick items without any stock information

Post by ArctionKestutis » Tue Jun 07, 2016 7:28 am

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.

greggorob64
Posts: 183
Joined: Tue Mar 18, 2014 2:55 pm

Re: viewxy - candlestick items without any stock information

Post by greggorob64 » Tue Jun 07, 2016 8:25 pm

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

greggorob64
Posts: 183
Joined: Tue Mar 18, 2014 2:55 pm

Re: viewxy - candlestick items without any stock information

Post by greggorob64 » Tue Jun 07, 2016 8:36 pm

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

ArctionKestutis
Posts: 400
Joined: Mon Mar 14, 2016 9:22 am

Re: viewxy - candlestick items without any stock information

Post by ArctionKestutis » Wed Jun 08, 2016 1:36 pm

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.

greggorob64
Posts: 183
Joined: Tue Mar 18, 2014 2:55 pm

Re: viewxy - candlestick items without any stock information

Post by greggorob64 » Wed Jun 08, 2016 4:33 pm

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