+ Start a Discussion

How to put a label on top of each bar in bar chart?

In a visualforce barchart, we need to be able to put a label on top of each bar which reads the peakvalue of that particular bar


Not sure VF built-in charting can do it. But, with Google Charting you can use the chm and chd params.


Thanks Boman !!!


My actual requirement is :


I have an apex class from which I am getting the data using List  to the VF page, and i could see the result,

but have to get the label at the top of the bar

I found the solution in another post. It is necessary to use the chartLabel tag inside the barSeries code block.

Here is the sample code for the solution.
<apex:barSeries title="Areas" orientation="vertical" axis="left"
			            xField="name" yField="data1" tips="true">
       <apex:chartTips height="20" width="120"/>
       <apex:chartLabel field="data1" display="outside" orientation="vertical"/>