Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Tools for Microsoft .Net & .Net Compact Framework
 SPC Control Chart Tools for .Net
 Annotation text color

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List

* Forum Code is ON
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]


T O P I C    R E V I E W
rdc1997 Posted - 24 Jul 2016 : 10:31:36
Good day.

Is it possible to set the color of annotation text?

When using a statement similar to:

this.AddAnnotation(SPCChartObjects.PRIMARY_CHART, 23, "XY");

can the foreground and/or the background color of XY be controlled?

If so, is it a global setting or can the attributes of each annotation be set individually?

Thank you.
2   L A T E S T    R E P L I E S    (Newest First)
rdc1997 Posted - 25 Jul 2016 : 12:17:08
Works great! Thanks.
quinncurtis Posted - 25 Jul 2016 : 10:50:03
You can set the color of the annotation (each can be different) by adding this method to your chart defining class:

void AddAnnotation(int chart, int dataindex, String text, Color c)
int textindex = AddAnnotation(chart, dataindex, text);
SPCChartObjects chartobj = (chart == SPCChartObjects.PRIMARY_CHART ? PrimaryChart : SecondaryChart);
ChartText textobj = (ChartText)chartobj.AnnotationArray[textindex];


It calls the base class AddAnnotaion, and then sets the color of the resulting ChartText object to your specified color.

Quinn-Curtis Forums © 2000-2018 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07