Quinn-Curtis Forums
Home
|
Profile
|
Register
|
Active Topics
|
Members
|
Search
|
FAQ
Username:
Password:
Save Password
Forgot your Password?
All Forums
Tools for Microsoft .Net
SPC Control Chart Tools for .Net
Annotation text color
New Topic
Reply to Topic
Printer Friendly
Author
Topic
rdc1997
USA
4 Posts
Posted - 24 Jul 2016 : 10:31:36
Good day.
Is it possible to set the color of annotation text?
Example:
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.
quinncurtis
1586 Posts
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];
textobj.SetColor(c);
}
It calls the base class AddAnnotaion, and then sets the color of the resulting ChartText object to your specified color.
rdc1997
USA
4 Posts
Posted - 25 Jul 2016 : 12:17:08
Works great! Thanks.
Topic
New Topic
Reply to Topic
Printer Friendly
Jump To:
Select Forum
Tools for Java
QCSPCChart SPC for Java
QCRTGraph for Java
QCChart2D for Java
Tools for Javascript/Typescript
QCSPCChart for Javascript/Typescript
QCSPCChart for Javascript/GWT
QCRTGraph for Javascript/Typescript
QCChart2D for Javascript/Typescript
Tools for Microsoft .Net
SPC Control Chart Tools for .Net
Real-Time Graphics Tools for .Net (VB and C#)
QCChart3D 3D Charting Tools for .Net (VB and C#)
--------------------
Home
Active Topics
Frequently Asked Questions
Member Information
Search Page
Quinn-Curtis Forums
© 2000-2018 Quinn-Curtis, Inc.