ozykaboo Posted December 7, 2009 Report Share Posted December 7, 2009 I am trying to create a stacked bar chart and display the TOTAL of each stack of series in the Chart. For example, currently if we want to show the pointlabels for a stacked bar chart, the labels we will only see are the value for each series in the stack individually. What I would like to do is, in addition to showing each series value, is at the very top of the stack, to have it display the total for the entire stack of all series. Is this possible in any way? Quote Link to comment Share on other sites More sharing options...
Frank Posted December 7, 2009 Report Share Posted December 7, 2009 Yes. This is possible. The question is where do you want to display this total. Since you want to display the actual value and, in addition, the total value, you will have to decide where to display it as the space for the label will be already taken. Foe example, if you want the total, and then in the next line the value for the last bar you can do: chart1.AllSeries.PointLabels.Visible = true;chart1.Series[chart1.Data.Series - 1].PointLabels.Format = "%T\n%v"; Quote Link to comment Share on other sites More sharing options...
ozykaboo Posted December 7, 2009 Author Report Share Posted December 7, 2009 The formatting code you gave me works great for getting the total.. thanks. However, I was hoping to label the stack so that each series displayed its individual series value in the middle of its bar, with the total of the stack on very top (outside the stacked bars). This is assuming that you are using vertical bars of course... Maybe this could be posible with a work around through code by manually calculating the totals somehow??? 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.