How do I change the border colour of a data label or turn off the border?


https://www.nevron.com/Forum/Topic9184.aspx
Print Topic | Close Window

By Kevin Harrison - 9 Years Ago

This is using 14.8.12.12
 I cannot get the data label border to change using DataLabelStyle.TextStyle.BorderStyle.Color,
or turn it off using DataLabelStyle.TextStyle.BorderStyle.Width = 0.
I have also tried using TextStyle.BackplaneStyle but it has no BorderStyle, only a FillStyle.
I always get a black border no matter what.
What am I doing wrong?
Thanks
Kevin



 

By Nevron Support - 9 Years Ago
Hi Kevin,

The following code shows how disable the border around the data labels:

bar.DataLabelStyle.TextStyle.BackplaneStyle.StandardFrameStyle.Visible = false;
bar.DataLabelStyle.TextStyle.BackplaneStyle.FillStyle = new NColorFillStyle(Color.Cyan);

Hope this helps - let us know if you meet any problems.
By Kevin Harrison - 9 Years Ago
Thanks - the first one removes the border.
Now, how do I change the border colour? Neither StandardFrameStyle.InnerBorderColor or StandardFrameStyle.OuterBorderColor seem to work?
Regards
Kevin
By Nevron Support - 9 Years Ago
Hi Kevin,

The InnerBorderColor changes the color of the frame:

bar.DataLabelStyle.TextStyle.BackplaneStyle.StandardFrameStyle.InnerBorderColor = Color.Blue;

You can also take a look at the following topic in the documentation:
http://helpdotnetvision.nevron.com/Presentation_Graphics_AppearanceStyles_FrameStyles_Standard_Frame_Style.html

Let us know if you meet any problems.
By Kevin Harrison - 9 Years Ago
Thanks, I don't know why I hadn't tried that, or thought it didn't work.
I don't think the diagram at the top of the link you sent me is labelled correctly though?