我正在使用 Chartist.js 来创建一些圆环图。到目前为止,它非常简单易用,但在过去三个小时里我一直在尝试在形状周围创建一个边框(不用说我无法使用 SVG stroke 属性,因为插件本身使用了 stroke创建甜甜圈效果)。
是否有一个插件选项可以给图表一个边框?
我创建甜甜圈的方式非常简单:
new Chartist.Pie('.donut-chart', {
series: [37.47, 62.53],
}, {
donut: true,
donutWidth: 8,
startAngle: 0,
total: 100,
showLabel: false
});
当然,任何形式的帮助将不胜感激!
编辑:我也尝试过使用 cdcarson 的插件分支(在https://github.com/gionkunz/chartist-js/pull/330处等待拉取请求)使用填充形状而不是笔划来生成图表,但似乎有些东西被打破