【问题标题】:Easy Pie Chart - percentage not centered简易饼图 - 百分比不居中
【发布时间】:2014-04-22 21:43:56
【问题描述】:

我正在使用简易饼图:https://github.com/rendro/easy-pie-chart

一切都很好,除了百分比没有出现在圆圈中间,而是出现在左下角(圆圈外)。

我已经搜索了一个解决方案,我发现了这个:Easy Pie Chart : Bug percentage not centered?,但它没有解决问题(在我的案例中,类“图表”已经很重要了)。

代码如下:

HTML:

<div class="chart" data-percent="73">73%</div>

JS:

$(function() {
    $('.chart').easyPieChart({      
    animate: 2000,
    scaleColor: false,
    lineWidth: 12,
    lineCap: 'square',
    size: 100,
    trackColor: '#e5e5e5',
    barColor: '#3da0ea'
});
});

帮助表示赞赏!

【问题讨论】:

    标签: jquery jquery-plugins progress-bar


    【解决方案1】:

    您可以通过支持板找到此问题的解决方案。这取决于您使用的是 jquery 还是 angular。在您使用 jquery 的情况下,您需要访问事件,然后更新节点的内容。 https://github.com/rendro/easy-pie-chart/issues/88

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-07-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多