You need to sign in to do that
Don't have an account?
Bar Chart Horizontal?
Hi All,
I have created a vertical bar chart in visualforce page without any issues. Now I would like to do the same with 'horizontal' orientation.
What changes do I need to make apart from changing the Orientation,xField,yField to make a vertical chart to horizontal one?
Below are the 2 codes and outputs.
VERTICAL <apex:chart height="250" width="350" data="{!GenerateChart}"> <apex:axis type="Numeric" position="left" fields="data" title="MT WON" /> <apex:axis type="Category" position="bottom" fields="name" title="Month"/> <apex:barSeries orientation="vertical" axis="left" xField="name" yField="data" /> </apex:chart> HORIZONTAL <apex:chart height="250" width="350" data="{!GenerateChart}"> <apex:axis type="Numeric" position="left" fields="data" title="MT WON" /> <apex:axis type="Category" position="bottom" fields="name" title="Month"/> <apex:barSeries orientation="horizontal" axis="left" xField="data" yField="name" /> </apex:chart>
The horizontal one is weird!
http://i44.tinypic.com/2rqj1o2.jpg
Let me know. Thanks
Manish,
I suppose the axis will be reverse in the horizontal bar graph so you should alter the code accordingly.