Annotation Size

A forum dedicated to WPF version of LightningChart Ultimate.

Moderator: Queue Moderators

Post Reply
vifani
Posts: 49
Joined: Thu May 02, 2013 8:35 am

Annotation Size

Post by vifani » Thu Aug 21, 2014 3:25 pm

Hi,

again :D .

Is it possible to have the width an height of the annotation box when

Annotation.Sizing = AnnotationXYSizing.Automatic;

??

Kr

Antonio Pinnelli

User avatar
ArctionPasi
Posts: 1367
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland
Contact:

Re: Annotation Size

Post by ArctionPasi » Thu Aug 21, 2014 7:00 pm

This should do the trick:

Code: Select all

PointInt p = m_chart.MeasureText(annotation.Text, annotation.TextStyle.Font); 
int width = p.X +annotation.AutoSizePadding; 
int height = p.Y +annotation.AutoSizePadding; 
EDIT:
make that

Code: Select all

int width = p.X +annotation.AutoSizePadding * 2; 
int height = p.Y +annotation.AutoSizePadding * 2; 
LightningChart Support Team, PT

vifani
Posts: 49
Joined: Thu May 02, 2013 8:35 am

Re: Annotation Size

Post by vifani » Fri Aug 22, 2014 6:45 am

thank you.

Post Reply