I'm creating a bar chart using visualforce charting and I'd like to add the row values near the bars on chart. Currently it looks like this: enter image description here

And that's what I'd like to achieve: enter image description here

Is it even possible ? I've went through the whole charting section in VF developer's guide and couldn't find that option.

I have 2 values for xField in barSeries, so using chartLabel won't work.

<apex:barSeries title="TitleA,TitleB" stacked="false" orientation="horizontal" axis="left"
xField="Actual,Planned" yField="allocationName" colorSet="red,blue" highlight="false">

Thanks! Kamil


You can achieve the desired result with the combination of apex:chartLabel and apex:barSeries like below.

<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="horizontal"/>

The orientation attribute in apex:chartLabel determines the placement of the label within the bar chart.

Hope it helps.

|improve this answer|||||
  • Thanks for your suggestion, but it won't work in my case. Please take a look at edited question. – KamilK Sep 7 '15 at 11:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.