fahd.malik Posted August 9, 2007 Report Share Posted August 9, 2007 Is there an option in ChartFX for Bar Charts to show both the label and value on each bar? I know values can be shown for each bar by using Chart2.PointLabels = true But, for instance, there are two bars (total sales, revenue) I want the two bars to display their corresponding label (total sales, revenue) as well as their value (900, 400). Quote Link to comment Share on other sites More sharing options...
Frank Posted August 9, 2007 Report Share Posted August 9, 2007 You can use PointLabels.Format to change the content of the Point Labels. For example to show the series text plust the value set: chart1.AllSeries.PointLabels.Format = "%s %v"; Quote Link to comment Share on other sites More sharing options...
fahd.malik Posted August 10, 2007 Author Report Share Posted August 10, 2007 Thanks. I actually had to do Chart2.PointLabelMask = "%s %v" to make it work. One more thing, when the labels are long they tend to overlap each other, hence making it hard to read the contents of the labels, is there a way to avoid that? Quote Link to comment Share on other sites More sharing options...
Frank Posted August 10, 2007 Report Share Posted August 10, 2007 Yes. The code I gave you is for Chart FX for VS 2005 (7.0) and so is this forum. Your code if for Chart FX 6.x. As for the legends overlapping, there is no way to avoid that automatically, you can change the orientation and alignment to minimize the possibility of overlapping. We included the feature of label re-arrangement in Chart FX 7.0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.