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

 All Forums
 Tools for Microsoft .Net & .Net Compact Framework
 QCChart2D and QCChart2D CF (VB and C#)
 LegendItem color
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

fsjodin

26 Posts

Posted - 07 May 2007 :  14:31:20  Show Profile  Reply with Quote
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

quinncurtis

1555 Posts

Posted - 07 May 2007 :  15:40:44  Show Profile  Reply with Quote
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.
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