apexcharts实现对称人口年龄柱状图效果代码
代码语言:html
所属分类:图表
代码描述:apexcharts实现对称人口年龄柱状图效果代码
代码标签: apexcharts 对称 人口 年龄 柱状图 图表
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta http-equiv="X-UA-Compatible" content="ie=edge" /> <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/apexcharts.js"></script> <style> #chart { max-width: 650px; margin: 35px auto; } </style> </head> <body> <div id="chart"></div> <script> var options = { series: [{ name: 'Males', data: [0.4, 0.65, 0.76, 0.88, 1.5, 2.1, 2.9, 3.8, 3.9, 4.2, 4, 4.3, 4.1, 4.2, 4.5, 3.9, 3.5, 3 ] }, { name: 'Females', data: [-0.8, -1.05, -1.06, -1.18, -1.4, -2.2, -2.85, -3.7, -3.96, -4.22, -4.3, -4.4, -4.1, -4, -4.1, -3.4, -3.1, -2.8 ] } ], chart: { type: 'bar', height: 440, stacked: true }, colors: ['#008FFB', '#FF4560'], plotOptions: { bar: { horizontal: true, barHeight: '80%', }, }, dataLabels: { enabled: false }, stroke: { width: 1, colors: ["#fff"] }, .........完整代码请登录后点击上方下载按钮下载查看
网友评论0