饼图非常受欢迎用于展示一篇作品的简洁概览或比较。虽然它们比柱状图难读但仍然是小型数据集的热门选择。完整版蛋黄成分饼图!DOCTYPE html html langzh-CN head meta charsetUTF-8 title蛋黄成分占比/title script srchttps://code.highcharts.com/highcharts.js/script style #container { width: 100%; height: 500px; } /style /head body div idcontainer/div script Highcharts.chart(container, { chart: { type: pie }, title: { text: 蛋黄营养成分占比 }, tooltip: { valueSuffix: % }, subtitle: { text: 数据来源a hrefhttps://www.mdpi.com/2072-6643/11/3/684/htm target_blankMDPI/a }, plotOptions: { pie: { allowPointSelect: true, cursor: pointer, dataLabels: [{ enabled: true, distance: 20 }, { enabled: true, distance: -40, format: {point.percentage:.1f}%, style: { fontSize: 1.2em, textOutline: none, opacity: 0.7 }, filter: { operator: , property: percentage, value: 10 } }] } }, series: [ { name: 占比, colorByPoint: true, data: [ { name: 水分, y: 55.02 }, { name: 脂肪, sliced: true, selected: true, y: 26.71 }, { name: 碳水化合物, y: 1.09 }, { name: 蛋白质, y: 15.5 }, { name: 矿物质, y: 1.68 } ] } ] }); /script /body /html图表功能可点击扇区分离自动显示百分比鼠标悬浮显示详情美观双层标签100% 中文显示