User (Legacy) Posted October 16, 2006 Report Share Posted October 16, 2006 Hello, Is there a way to hide point labels which have the value 0 ? Thanks Mark Attachments.zip Link to comment Share on other sites More sharing options...
Software FX Posted October 16, 2006 Report Share Posted October 16, 2006 Zero is not special for us, there is no difference between zero and say 102. Maybe instead of zero you want to set this point to null (Chart.Hidden) ? This is a special value and it will not display anything at all. Also if is zero that you want to make special you can create a conditional attribute that turns PointLabels off for all values equal to zero. The following code will do just that: ConditionalAttributes conditionalAttributes = new ConditionalAttributes(); conditionalAttributes.Condition.From = 0; conditionalAttributes.Condition.To = 0; conditionalAttributes.PointLabels.Visible = false; chart1.ConditionalAttributes.Add(conditionalAttributes); -- Francisco Padron www.chartfx.com Link to comment Share on other sites More sharing options...
User (Legacy) Posted October 16, 2006 Author Report Share Posted October 16, 2006 Ah, sweet. Thanks for the fast response on this one. The conditional logic worked great. Mark "SoftwareFX Support" <noreply@softwarefx.com> wrote in message news:G8OZeuV8GHA.1788@webserver3.softwarefx.com... > Zero is not special for us, there is no difference between zero and say > 102. > > Maybe instead of zero you want to set this point to null (Chart.Hidden) ? > This is a special value and it will not display anything at all. > > Also if is zero that you want to make special you can create a conditional > attribute that turns PointLabels off for all values equal to zero. The > following code will do just that: > > ConditionalAttributes conditionalAttributes = new ConditionalAttributes(); > > conditionalAttributes.Condition.From = 0; > > conditionalAttributes.Condition.To = 0; > > conditionalAttributes.PointLabels.Visible = false; > > chart1.ConditionalAttributes.Add(conditionalAttributes); > > > -- > Francisco Padron > www.chartfx.com > Link to comment Share on other sites More sharing options...
User (Legacy) Posted October 16, 2006 Author Report Share Posted October 16, 2006 Spoke too soon. It correctly hides point labels with a value of zero using the conditional logic you supplied. If the user turns point labels off, then on again, and the graph is rebuilt, the ConditionalAttribute seems to be ignored and it shows zero point labels. I checked the chart.ConditionalAttributes collection and it has the entry I placed there. Ideas ? Mark "SoftwareFX Support" <noreply@softwarefx.com> wrote in message news:G8OZeuV8GHA.1788@webserver3.softwarefx.com... > Zero is not special for us, there is no difference between zero and say > 102. > > Maybe instead of zero you want to set this point to null (Chart.Hidden) ? > This is a special value and it will not display anything at all. > > Also if is zero that you want to make special you can create a conditional > attribute that turns PointLabels off for all values equal to zero. The > following code will do just that: > > ConditionalAttributes conditionalAttributes = new ConditionalAttributes(); > > conditionalAttributes.Condition.From = 0; > > conditionalAttributes.Condition.To = 0; > > conditionalAttributes.PointLabels.Visible = false; > > chart1.ConditionalAttributes.Add(conditionalAttributes); > > > -- > Francisco Padron > www.chartfx.com > Link to comment Share on other sites More sharing options...
Software FX Posted October 16, 2006 Report Share Posted October 16, 2006 What do you mean by: "the graph is rebuilt" ? -- Francisco Padron www.chartfx.com Link to comment Share on other sites More sharing options...
hari7priya Posted October 23, 2013 Report Share Posted October 23, 2013 Hi, I have a bar graph for which I am passing a null value. I would like to have the respective tickmark to be invisible or hidden. Could anyone please help me on this? Thanks, Hari Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.