AnnotationsXY and Embedded Control Functionality

A forum dedicated to WinForms version of LightningChart Ultimate.

Moderator: Queue Moderators

Post Reply
plotter
Posts: 41
Joined: Thu Apr 06, 2017 2:29 am

AnnotationsXY and Embedded Control Functionality

Post by plotter » Fri May 05, 2017 1:48 pm

Hi,
I have implemented several AnnotationXY based tables based on your example,

BUT, I need to implement user interactivity such as hiding the table (a 'X' button in the top right corner comes to mind),
as well as checkboxes and other buttons or comboBoxes within the table, etc.
Somethings are ideal for an image (pinning), but others seem like they would benefit most from an actual winform control.

I would love to do this with embedded controls, rather than try to do it with images...

Is this possible?
If so could you point me in the right direction?

Also the Legend Box seems to always render on top of the annotation 'Tables', can I change this as well?

Thanks,

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

Re: AnnotationsXY and Embedded Control Functionality

Post by ArctionKestutis » Mon May 08, 2017 9:00 am

Hi,

LightningChart works almost like any other Windows control. If you would like to have Button on top of the Chart, it should not be any obstacles to do so. However, if you would like to have inside of the Chart (as a content), it is not possible at the moment. It is so because content is used by LightningChart internally and could not be used for other means. You could mimic button-in-the-chart behavior with Annotation object.
For even closer resemblance, you could add bitmap-fill for annotation object:

Code: Select all

annotation.Fill.Bitmap.Image = bitmap;
annotation.Fill.Bitmap.Layout = BitmapFillLayout.Center;
annotation.Fill.Style = RectFillStyle.Bitmap;
and subscribe to corresponding mouse event: MouseUP, MouseDown, MouseClick etc.
Similar look and functionality could be achieved with ChartEventMarkers or SeriesEventMarkers (they also support mouse events and bitmap fill).

LegendBox is the last element to be rendered on any view. Why you would like to be otherwise? If you don't need, you could just disable visibility. More subtle solution place is to place LegendBox on any predefined location, including margins, where it will not overlap with anything.

All the best.

Post Reply