提交 b233ff5b 编写于 作者: C Catouse

* add scaleLineHeight option to pie chart and update document file.

上级 7c625846
......@@ -427,6 +427,9 @@ var myDoughnutChart = $("#myDoughnutChart").doughnutChart(data, {segmentShowStro
// 'auto' - 自动决定显示位置
scaleLabelPlacement: "auto",
// Number - 标签行高
scaleLineHeight: 1,
//Number - 动画执行总步数
animationSteps : 60,
......
......@@ -242,7 +242,7 @@
x = Math.min(chartWidthHalf - segment.outerRadius - 10, x - 30 + chartWidthHalf);
}
var textHeight = options.scaleFontSize;
var textHeight = options.scaleFontSize * (options.scaleLineHeight || 1);
var labelPos = Math.round((y * 0.8 + chartHeightHalf) / textHeight) + 1;
var maxPos = Math.floor(this.chart.width / textHeight) + 1;
var labelPosDirection = isRight ? 1 : (-1);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册