[Chart:Funnel&Pyramid]????????

2014-03-20 11:01:55by ???

漏斗图和金字塔图

说明

这篇文章介绍的是如何制作漏斗图和金字塔图

思考

如下图是展示销售渠道的漏斗图,考虑以下几个重点

  1. 漏斗图的数据结构

  2. 怎样改变漏斗出口的高度和宽度

代码

                
<a:dataSets>
    <a:dataSet id="ds">
        <a:datas>
            <a:record count="15654" method="网页访问"/>
            <a:record count="4064" method="下载"/>
            <a:record count="1987" method="报价"/>
            <a:record count="976" method="发送发票"/>
            <a:record count="846" method="结算"/>
        </a:datas>
        <a:fields>
            <a:field name="method" prompt="操作"/>
            <a:field name="count" datatype="int" prompt="量"/>
        </a:fields>
    </a:dataSet>
</a:dataSets>
<a:chart bindTarget="ds" marginRight="100" type="funnel">
    <a:title text="销售渠道" x="-50"/>
    <a:xAxis>
        <a:xAxi name="method"/>
    </a:xAxis>
    <a:yAxis>
        <a:yAxi name="count"/>
    </a:yAxis>
    <a:legend enabled="false"/>
    <a:plotOptions>
        <a:series neckHeight="25%" neckWidth="30%">
            <a:dataLabels color="black" enabled="true"
				format="&lt;b&gt;{point.name}&lt;/b&gt; ({point.y:,.0f})" softConnector="true"/>
        </a:series>
    </a:plotOptions>
</a:chart>

注释

  1. softConnector属性控制连接线的柔和度

  2. neckHeight和neckWidth属性控制漏斗出口的高度和宽度

附:金字塔图

金字塔图和漏斗图属于同一类图,只要将属性type设为pyramid,另外需注意金字塔图没有neckHeight和neckWidth属性。如下图:

实现的代码如下

                
	<a:chart bindTarget="ds" marginRight="100" type="pyramid">
        <a:title text="销售渠道" x="-50"/>
        <a:xAxis>
            <a:xAxi name="method"/>
        </a:xAxis>
        <a:yAxis>
            <a:yAxi name="count"/>
        </a:yAxis>
        <a:legend enabled="false"/>
        <a:plotOptions>
            <a:series>
                <a:dataLabels color="black" enabled="true"
					format="&lt;b&gt;{point.name}&lt;/b&gt; ({point.y:,.0f})" softConnector="true"/>
            </a:series>
        </a:plotOptions>
    </a:chart>
	
Attachments
  1. ????????.rar

Comments

0 Responses to the article

暂时没有评论。

发表评论