Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Tools for Microsoft .Net & .Net Compact Framework
 QCChart2D and QCChart2D CF (VB and C#)
 LegendItem color

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

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

* HTML is OFF
* Forum Code is ON
Smilies
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
fsjodin Posted - 07 May 2007 : 14:31:20
I want to change the color of a LegendItem when the line color of the axis changes.

I might be doing something wrong but the LegendItem color does not seem to automatically change when I change the line color of the underlying y axis. Is the legend supposed to automatically reflect changes in the line color?

I tried calling 'SetColor' on the LegendItem but that did not result in the color changing.

Thanks
1   L A T E S T    R E P L I E S    (Newest First)
quinncurtis Posted - 07 May 2007 : 15:40:44
Nothing automatic happens with the legends when you change other attributes of the graph. Only the programmer know what they actually need.

The LegendItem text and symbol have independent colors, and you may or may not want to change both. The code below works:

StandardLegend legend;
.
.
.
int legenditem = 0;
legend.GetLegendItem(legenditem).LegendItemSymbol.LineColor = Color.Black;
legend.GetLegendItem(legenditem).LegendItemText.LineColor = Color.Black;

Once you are through making changes you must call the ChartView.UpdateDraw method to force the graph to update on the screen.

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