+ Start a Discussion
asapjimasapjim 

How to display totals above stacked columns on a VisualForce Chart?

Hi, we would like to display the totals above the stacked columns on a chart.  Hopefully the image shows up with this post, it is a good representation of what we are trying to acheive.  Is there anyway to do this?

Thanks!Stacked Chart with totals
NagendraNagendra (Salesforce Developers) 
Hi,

If you really need the totals you'll need to use a Grouped Bar Chart (like this)
User-added image
Hope this helps.

Kindly mark this as solved if the reply was helpful so that it gets removed from the unanswered queue which results in helping others who are encountering a similar issue.

Thanks,
Nagendra
asapjimasapjim
Hi Nagendra, thank you for your response.  can the chart be displayed on a VisualForce page?  Here's the mark up of my VisualForce chart.  it shows the total for each item in the columns, but not the total for all of the items above the bar.
<apex:chart data="{!ChartData}" height="425" width="100%" resizable="true" >
                                
                                <apex:legend position="bottom"/>
                                <apex:axis type="Numeric" position="left" title="" grid="false"
                                           fields="IPA,Pilsner" dashSize="0" rendered="true">
                                </apex:axis>
                                <apex:axis type="Category" position="bottom" fields="Month" title="" >
                                    <apex:chartLabel rotate="315"/>
                                </apex:axis>
                                <apex:barSeries orientation="vertical" axis="left" stacked="true"
                                                xField="Month"  yField="IPA, Pilsner" title="IPA pints,Pilsner pints" tips="false" >
                                    <apex:chartLabel field="Total" display="outside" orientation="horizontal"/>
                                </apex:barSeries>
                            </apex:chart>

Thanks!

-Jim​