<apex:lineSeries axis="left" xField="Month" yField="Score" markerType="circle" markerSize="4" markerFill="MarkerColour" />
I am using a formula field to store colour code in a formula field and passing as a parameter in constructor . And trying to use it in the VF Line Series.
It's not coming out correctly however . Any help?
VF :
<apex:outputPanel id="myChart">
<apex:chart data="{!MethodName}" height="200" width="90%" background="#FFFFFF">
<apex:legend position="top"/>
<apex:axis type="Numeric" position="left" grid="false" fields="Turnover" dashSize="2">
<apex:chartLabel />
</apex:axis>
<apex:axis type="Category" position="bottom" fields="InteractionClosedYearMonth" >
<apex:chartLabel rotate="315"/>
</apex:axis>
<apex:lineSeries axis="left" xField="InteractionClosedYearMonth" yField="Turnover" markerType="circle" markerSize="4" markerFill="MarkerColour" />
</apex:chart>
</apex:outputPanel>
Controller Method :
public class ABCD
{
public String MarkerColour {get; private set;}
public ABCD(String MarkerColour)
{
this.MarkerColour = MarkerColour;
}
}
public List<ABCD> getABCD()
{
List<CustomObject__c> List1= [select MarkerColour__c from CustomObject__c where Account__c ='id' ];
List<ABCD> List2 = new List<ABCD>();
Map<Id,Decimal> Map1 = new Map<Id,Decimal>();
if(List1.size()> 0)
{
for(CustomObject__c cc: List1)
{
//Some code }
for(CustomObject__c : List1)
{
for(Id Id1: Map1.keySet())
{
if(Id1 == cc.Id1){
List2.add(new ABCD(String.ValueOf(cc.MarkerColour__c)));
}
}
}
}
return List2;
}