Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
Save Password
Forgot your Password?

 All Forums
 Tools for Microsoft .Net & .Net Compact Framework
 SPC Control Chart Tools for .Net
 Annotation text color
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  


4 Posts

Posted - 24 Jul 2016 :  10:31:36  Show Profile  Reply with Quote
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.


1569 Posts

Posted - 25 Jul 2016 :  10:50:03  Show Profile  Reply with Quote
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.
Go to Top of Page


4 Posts

Posted - 25 Jul 2016 :  12:17:08  Show Profile  Reply with Quote
Works great! Thanks.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Quinn-Curtis Forums © 2000-2018 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07