Bar Charts
Each data element in a linear series is described by an X,Y coordinate. The data series defines how to draw the coordinate on the grid. The <apex:barSeries> charts draw bars stretching between an origin axis and the X,Y coordinates. Theorientation attribute determines whether the origin axis is the left axis (Y) or the bottom axis (X). Set <apex:barSeries orientation="horizontal"> for bars that originate on the left side of the chart, and <apex:barSeriesorientation="vertical"> for a column chart with bars that rise from the bottom of the chart.
<apex:barSeries orientation="vertical" axis="left"
xField="name" yField="data1,data2,data3"/>
Use the gutter attribute to adjust spacing between grouped bars. Use the groupGutter attribute to adjust spacing between groups. Use the xPadding and yPadding attributes to adjust the spacing between the chart axes and the bars themselves.
<apex:chart data="{!data}" height="400" width="500"> <apex:legend position="left"/> <apex:axis type="Numeric" position="left" title="Closed Won" grid="true"
fields="data1,data2,data3" dashSize="2"> <apex:chartLabel/> </apex:axis> <apex:axis type="Category" position="bottom" fields="name" title="Stacked Bars"> <apex:chartLabel rotate="315"/> </apex:axis> <apex:barSeries orientation="vertical" axis="left" stacked="true"
xField="name" yField="data1,data2,data3" title="MacDonald,Promas,Worle"/> </apex:chart>
Various trademarks held by their respective owners.
No comments:
Post a Comment