I want to display month name in the last bar alone.i need output like but am getting output like this.how to add month in the last bar
apex code:
public with sharing class Rfleet_VFPageReport {
public class Month {
public Decimal year {get; set;}
public Decimal volume{get; set;}
Month(Decimal year,Decimal volume) {
this.year = year;
this.volume= volume;
}
}
public Month[] getMonths() {
Month[] months = new Month[] {};
for (AggregateResult ar : [select CALENDAR_YEAR(Current_month__c)Year,SUM(Countries_delivered_volume__c)Dvol from IKAM_Data__c
group by CALENDAR_YEAR(Current_month__c) order by CALENDAR_YEAR(Current_month__c)
]) {
months.add(new Month((Decimal )ar.get('Year'),(Decimal)ar.get('Dvol')));
}
system.debug('------->'+months);
return months;
}
}
VF:
<apex:page controller="Rfleet_VFPageReport" title="Deliveries By Year" >
<apex:form >
<apex:pageBlock title="Deliveries By Year" >
<style>
.pbTitle{
text-align : center;
}
</style>
<apex:chart height="400" width="400" data="{!months}" colorSet="#FFB547,#FFB547,#FFB547,#FFB547,#FFB547,#9ACD32" >
<apex:axis type="Numeric" position="left" fields="volume" grid="true" >
</apex:axis>
<apex:axis type="Category" position="bottom" fields="year">
</apex:axis>
<apex:barSeries highlight="false" orientation="vertical" axis="left" tips="false" xField="year" yField="volume" colorsProgressWithinSeries="true">
<apex:chartLabel field="volume" display="outside" orientation="horizontal"/>
</apex:barSeries>
</apex:chart>
</apex:pageBlock>
</apex:form>
</apex:page>