+ Start a Discussion
Eric FortenberryEric Fortenberry 

Visualforce Chart -- BarSeries Chart Label Offset Issue

I have created an apex:chart and added a chartLabel to the barSeries; however, the labels are not centered over the bars.  Does anyone know how to fix this?  I can't seem to add a styleClass or use any sort of css.  Thanks!  

 

chart

 

<apex:pageBlockSection title="Future Tasks">
    <apex:chart height="250" width="800" data="{!
<apex:axis type="Category" position="bottom" fields="ActivityDate" title="Day of Month"> <apex:chartLabel orientation="vertical"/> </apex:axis> <apex:axis type="Numeric" position="left" fields="Total" title="Open Tasks"/> <apex:barSeries axis="bottom" orientation="vertical" xField="ActivityDate" yField="Total"> <apex:chartLabel display="outside" /> </apex:barSeries> </apex:chart> </apex:pageblocksection>

 

Skip KSkip K

I know it has been a while but is there an answer for this? I'm using:

<apex:chartLabel display="outside" />

It looks like the numeric value is not centered over its bar the same way as Eric's example.

 

Any help would be appreciated.


Skip

WilmerWilmer
I read about that tag's properties and found minMargin property, but in spite of I modified its value until 0 (50 by default), it seems like it's not responding to that setting value.
<apex:chartLabel field="data1" display="outside" minMargin="5"/>
Look how it looks like...
Bar labels at the top are not centered.

Any other suggestions?