Overlay (Annotation) with images and textboxes

A forum dedicated to WPF version of LightningChart Ultimate.

Moderator: Arction_LasseP

Rudolf Kajan
Posts: 1
Joined: Wed Oct 25, 2017 12:51 pm

Overlay (Annotation) with images and textboxes

Post by Rudolf Kajan » Wed Oct 25, 2017 1:00 pm

Hello,

I would like to ask if it is possible to have in annotations more complex elements than just text - e.g., images or checkboxes. Or is there some other type of overlay components which supports it?

Example of what I need to achieve:

Image

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

Re: Overlay (Annotation) with images and textboxes

Post by ArctionKestutis » Thu Oct 26, 2017 7:10 am

Hello Rudolf,

Yes, annotation class is probably best option to achieve complex table-image. LightningChart's Annotation is very flexible object. You can have multiple lines of text in Annotation as shown in our Demo App example "Multi-channel cursor tracking"
Annotation multi-line
Annotation multi-line
Annotation multi-line.jpg (212.81 KiB) Viewed 5496 times
You can have Annnotation's background filled with bitmap image. For that just set corresponding Fill properties:

Code: Select all

            annot1.Fill.Style = RectFillStyle.Bitmap;
            annot1.Fill.Bitmap.Image = SomeImage;
            annot1.Fill.Bitmap.Layout = BitmapFillLayout.Center;
Our example "Custom rendering" illustrates how it can be used
Annotation custom bitmap
Annotation custom bitmap
Annotation custom bitmap.jpg (86.79 KiB) Viewed 5496 times
The checkbox image could be added this way.

Finally you could add several Annotations together by building table like object. This could be found in example "Annotations table"
Annotations table
Annotations table
Annotation table.jpg (173.25 KiB) Viewed 5496 times
However, LightningChart's Annotation is not the only object, which could have image and text. For example EventMarkers (Series or Chart) have text label as well as symbol, which could take not only geometrical shape, but bitmap image as well.

Hope this helps.
All the best.

peter9898
Posts: 1
Joined: Thu Oct 26, 2017 7:49 am

Re: Overlay (Annotation) with images and textboxes

Post by peter9898 » Thu Oct 26, 2017 7:52 am

Could you post us example code how to template semibinding Annotation ? For example from xaml.
We want to use own content template with for example content presenter.

Could you also post us links to download example codes ?

Thanks

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

Re: Overlay (Annotation) with images and textboxes

Post by ArctionKestutis » Thu Oct 26, 2017 8:39 am

LightningChart was installed with Demo binaries as well as Demo source code. To find them just run DemoApp, select example you interested in and then click on one of two last icons in top ToolBar:
Demo toolbar.JPG
Demo toolbar.JPG (20.8 KiB) Viewed 5488 times
It either opens example's source code or solution in Visual Studio.

Hope this helps.