User (Legacy) Posted August 11, 2006 Report Posted August 11, 2006 I have created a chart which uses a black background and so far I have been unable to change the font color used by the legend and axis titles. By default the color of the font is black, needless to say it does not show on the black background. Is it possible to change these font colors, and if so do I need to do it from code or can I do so at design time? Thanks, Gabor Maghera
Software FX Posted August 12, 2006 Report Posted August 12, 2006 You can change the Chart´s text color by doing: chart.ForeColor = Color.White; You can also do it in a per object basis, the Legend Object has a TextColor property, so does the Axis object: chart.LegendBox.TextColor = Color.White; chart.AxisX.TextColor = Color.White; Pretty much all objects that display text have a Font property and a TextColor property, these are inherited from the chart unless otherwise specified. To go back to the defaults you can set Font to null and TextColor to Color.Empty in any object (other than the chart itself). This will cause these settings to be inherited from the chart´s Font and ForeColor respectively. -- Francisco Padron www.chartfx.com "Gabor Maghera" <gmaghera@loanforte.com> wrote in message news:Unq6AhYvGHA.2572@webserver3.softwarefx.com... >I have created a chart which uses a black background and so far I have been >unable to change the font color used by the legend and axis titles. By >default the color of the font is black, needless to say it does not show on >the black background. Is it possible to change these font colors, and if >so do I need to do it from code or can I do so at design time? > > Thanks, > Gabor Maghera >
User (Legacy) Posted August 14, 2006 Author Report Posted August 14, 2006 Thanks for your help Francisco. Gabor "Software FX Support" <noreply@softwarefx.com> wrote in message news:4syh6pivGHA.1292@webserver3.softwarefx.com... > You can change the Chart´s text color by doing: > > chart.ForeColor = Color.White; > > You can also do it in a per object basis, the Legend Object has a > TextColor property, so does the Axis object: > > chart.LegendBox.TextColor = Color.White; > chart.AxisX.TextColor = Color.White; > > Pretty much all objects that display text have a Font property and a > TextColor property, these are inherited from the chart unless otherwise > specified. To go back to the defaults you can set Font to null and > TextColor to Color.Empty in any object (other than the chart itself). This > will cause these settings to be inherited from the chart´s Font and > ForeColor respectively. > > -- > Francisco Padron > www.chartfx.com > > > "Gabor Maghera" <gmaghera@loanforte.com> wrote in message > news:Unq6AhYvGHA.2572@webserver3.softwarefx.com... >>I have created a chart which uses a black background and so far I have >>been unable to change the font color used by the legend and axis titles. >>By default the color of the font is black, needless to say it does not >>show on the black background. Is it possible to change these font >>colors, and if so do I need to do it from code or can I do so at design >>time? >> >> Thanks, >> Gabor Maghera >> > >
Recommended Posts
Archived
This topic is now archived and is closed to further replies.