html5 canvas动态的饼状图动画特效代码

版权:原创 更新时间:1年以上
[该文章底部包含文件资源,可根据自己情况,决定是否下载资源使用,时间>金钱,如有需要,立即查看资源]

以下是 html5 canvas动态的饼状图动画特效代码 的示例演示效果:

当前平台(PC电脑)
  • 平台:

部分效果截图:

html5 canvas动态的饼状图动画特效代码

HTML代码(index.html):

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="jquery-1.11.1.min.js"></script>
<!--ECharts单文件引入-->
<script src="echarts-all.js" type="text/javascript"></script>
<title>html5 canvas动态的饼状图动画特效</title>
<style type="text/css">
.echarts_pie{
	height:570px;
	width:1000px;
	background: #E6E6E6;
}
#echart{
	height:538px;
	width:100%;
}
.echarts_pie ul{
	float:left;
	list-style:none;
}
.echarts_pie ul li{
	float:left;
}
.echarts_pie .government{
	margin-top:-500px;
	width:200px;
	height:60px;
	font-size: 15px;
	color: #4A4A4A;
	letter-spacing: 0px;
	line-height: 20px;
}
.echarts_pie .government_img{
	margin-top:-920px;
	margin-left:235px;
}
.echarts_pie .bussiness{
	width:195px;
	height:60px;
	font-size: 15px;
	color: #4A4A4A;
	letter-spacing: 0px;
	line-height: 20px;
	margin-top:140px;
}
.echarts_pie .bussiness_img{
	margin-top:-560px;
	margin-left:-170px;
}
.echarts_pie .industry{
	width:195px;
	height:60px;
	font-size: 15px;
	color: #4A4A4A;
	letter-spacing: 0px;
	line-height: 20px;
	margin-top:160px;
}
.echarts_pie .industry_img{
	margin-top:-180px;
	margin-left:-110px;
}
.echarts_pie .hospital_img{
	margin-top:-950px;
	margin-left:620px;
}
.echarts_pie .school_img{
	margin-top:-680px;
	margin-left:690px;
}
.echarts_pie .hotel_img{
	margin-top:-300px;
	margin-left:620px;
}
.echarts_pie .hospital{
	margin-top:-570px;
	margin-left:800px;
	font-size: 15px;
	color: #4A4A4A;
	letter-spacing: 0px;
	line-height: 20px;
}
.echarts_pie .school{
	font-size: 15px;
	color: #4A4A4A;
	letter-spacing: 0px;
	line-height: 20px;
	margin-left:800px;
	margin-top:110px;
}
.echarts_pie .hotel{
	font-size: 15px;
	color: #4A4A4A;
	letter-spacing: 0px;
	line-height: 20px;
	margin-left:810px;
	margin-top:190px;
}
</style>
</head>

<body>
<center>
<!--饼形图-->
<div class="echarts_pie">
	<div class="content">
		<div id="echart"></div>
	   
	</div>
</div>

<script>
//饼形图
// 基于准备好的dom,初始化echarts图表
var myChart = echarts.init(document.getElementById('echart'));
option = {
    legend: {
        orient : 'vertical',
        x : 'left',
        data:[]
    }, 
  	color:['#4A5873','#F76666','#16CF45','#119FD9','#E5D117','#FF7C41', '#FF5151'],
    
    calculable : false,
    series : [
        {
            name:'',
            type:'pie',
            selectedMode: 'single',
            radius : [0, 90],
            // for funnel
            x: '20%',
            width: '40%',
			y: '90%',
            funnelAlign: 'right',
            max: 1548,
            
            itemStyle : {
                normal : {
                    label : {
                        position : 'inner',
                    },
                    labelLine : {
                        show : false
                    }
                }
            },
            data:[
                {value:335, name:'六大解\n决方案\n\n\n'}
            ]
        },
        {
            name:'',
            type:'pie',
            radius : [100, 200],
            
            // for funnel
            x: '80%', 
            width: '70%',
            funnelAlign: 'left',
            max: 1048,
            itemStyle : {
                normal : {
                    label : {
                        position : 'inner'
                    },
                    labelLine : {
                        show : false
                    }
                }
            },
            data:[
                { value:500, name:'医院'},
				{ value:500,name:'校园'},
				{ value:500, name:'酒店'},
				{ value:500, name:'工业'},
				{ value:500,name:'商业\n建筑'},
				{ value:500,name:'政府'},
            ]
        }
    ]
};
// 为echarts对象加载数据 
myChart.setOption(option);
</script>
</center>
</body>
</html>
附件:下载该文件资源,减少时间成本(增值服务)
留言
该资源可下载
File Source
.rar
371.74 KB
html5特效
最新结算
HTML5 3D效果网页视频背景代码
类型: .rar 金额: CNY 2.31¥ 状态: 待结算 详细>
软件概要设计说明书Word下载
类型: .docx 金额: CNY 0.38¥ 状态: 待结算 详细>
软件概要设计说明书Word下载
类型: .docx 金额: CNY 3.02¥ 状态: 待结算 详细>
.net c#获取声卡信息,声卡数量
类型: .rar 金额: CNY 30.96¥ 状态: 待结算 详细>
.net c#获取声卡信息,声卡数量
类型: .rar 金额: CNY 3.87¥ 状态: 待结算 详细>
.net c#获取电脑的安装软件列表信息,包含名称和版本号
类型: .rar 金额: CNY 30.96¥ 状态: 待结算 详细>
.net c#获取电脑的安装软件列表信息,包含名称和版本号
类型: .rar 金额: CNY 3.87¥ 状态: 待结算 详细>
.net c#获取电脑显示适配器信息
类型: .rar 金额: CNY 30.96¥ 状态: 待结算 详细>
.net c#获取电脑的安装软件列表信息,包含名称和版本号
类型: .rar 金额: CNY 3.87¥ 状态: 待结算 详细>
.net c#获取电脑的安装软件列表信息,包含名称和版本号
类型: .rar 金额: CNY 30.96¥ 状态: 待结算 详细>
各执行环节公正透明,帮助企业完成从赛制策划、活动推广、评委评选到版权转让等系列工作,专业、高效、值得信赖。平均每场赛事可征集到数百至数千组源码作品
合作伙伴
联系我们
  • 邮箱:raozetian@hotmail.com
Copyright 2023-2024 eeigg.com·皖ICP备2024038726号-1
打赏文章