You need to sign in to do that
Don't have an account?
Visualforce page chart not displaying colors correctly on Legend and showing 0 on top of the bar
Hi all I have created a Visualforce page chart but in this, i have 2 issues
1) On top of the first bar its showing "0"
2) colors are not displayed in Leged properly
Code :
<apex:chart data="{!data1}" height="400" width="500">
<apex:legend position="left" />
<apex:axis type="Numeric" position="left" title="Forecast" grid="true" fields="data1,data2,data3" dashSize="2" minimum="0" maximum="200">
<apex:chartLabel display="none" />
</apex:axis>
<apex:axis type="Category" position="bottom" fields="name" title="Q2" minimum="0" maximum="200">
<apex:chartLabel display="none" rotate="315"/>
</apex:axis>
<apex:barSeries orientation="vertical" axis="left" stacked="true" xField="name" yField="Actual,Forcast,Planned" colorsProgressWithinSeries="True" colorSet="blue,Magenta,Yellow,LightSeaGreen" >
<apex:chartLabel />
</apex:barSeries>
</apex:chart>
The number of yField is not the same as the number of color.
<apex:barSeries orientation="vertical" axis="left" stacked="true" xField="name" yField="Actual,Forcast,Planned" colorsProgressWithinSeries="True" colorSet="blue,Magenta,Yellow,
LightSeaGreen" ><apex:chartLabel />
Regards
Alain
We have used the like this
data.add(new Data('Quota', 30, 0, 0));
data.add(new Data('Forecast', 44, 15, 65));
here in quota, we are using only 1 value and in the forecast, we are using 3 different parameters.
So if you see my post we are getting 0 on top of the first bar I want to remove that and I want 4 different colors on the first bar there should be one color (Quota) and for the forecast, we need 3 different colors.
Thanks,
Krishna