-3
A
回答
0
我觉得that's不chart.js之标准
我做了一个小片段为其他圆圈图。你可以把它作为解决你的问题的基础。例程来自follwing链接。
How to calculate the SVG Path for an arc (of a circle)
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>svgPercent</title>
</head>
<body>
<svg width="200" height="200" viewBox="0 0 200 200">
<path id="arc1" fill="none" stroke="#ddd" stroke-width="20" stroke-linecap="round"/>
<path id="arc2" fill="none" stroke="#00f" stroke-width="20" stroke-linecap="round"/>
<text x="50%" y="40%"
font-family="Arial"
font-weight="bold"
font-size="50"
alignment-baseline="middle" text-anchor="middle">75</text>
<text x="50%" y="60%"
font-family="Arial"
font-weight="bold"
font-size="16"
alignment-baseline="middle" text-anchor="middle">73 (+2%)</text>
<line x1="100" y1="150" x2="100" y2="180" style="stroke:rgb(255,0,0);
stroke-width:5" stroke-linecap="round"/> \t \t
<line x1="100" y1="150" x2="105" y2="155" style="stroke:rgb(255,0,0);
stroke-width:5" stroke-linecap="round"/> \t
<line x1="100" y1="150" x2="95" y2="155" style="stroke:rgb(255,0,0);
stroke-width:5" stroke-linecap="round"/> \t
</svg>
<script>
function polarToCartesian(centerX, centerY, radius, angleInDegrees) {
var angleInRadians = (angleInDegrees-90) * Math.PI/180.0;
return {
x: centerX + (radius * Math.cos(angleInRadians)),
y: centerY + (radius * Math.sin(angleInRadians))
};
}
function describeArc(x, y, radius, startAngle, endAngle){
var start = polarToCartesian(x, y, radius, endAngle);
var end = polarToCartesian(x, y, radius, startAngle);
var largeArcFlag = endAngle - startAngle <= 180 ? "0" : "1";
var d = [
"M", start.x, start.y,
"A", radius, radius, 0, largeArcFlag, 0, end.x, end.y
].join(" ");
return d;
}
document.getElementById("arc1").setAttribute("d", describeArc(100, 100, 90, 210, 510));
document.getElementById("arc2").setAttribute("d", describeArc(100, 100, 90, 210, 360));
</script>
</body>
</html>
+0
问这些东西是的,我认为现在不可能使用ChartJS。但感谢您的实施。 –
相关问题
- 1. chart.js,不能使用AJAX的图形
- 2. 使用Chart.js和PHP配置饼图颜色使用Chart.js和PHP
- 3. 可能合并条形图中的2个条形图(chart.js)
- 4. 为什么chart.js不能使用angular JS
- 5. 如何使用lookup_context使该视图尽可能干?
- 6. 可能隐藏Chart.js网格线以外的图表吗?
- 7. 无法使用Chart.js初始化饼图
- 8. 在Chart.js中使用JSON数据图表
- 9. 使用chart.js时不显示条形图
- 10. 用Chart.js绘制条形图
- 11. 如果可能,应该使用cookie吗?
- 12. 可以从chart.js之
- 13. Chart.js显示无图
- 14. 就chart.js之线图
- 15. chart.js图例不适用于饼图
- 16. 使用chart.js在mysql中使用mysql数据的饼图
- 17. 我应该尽可能多地使用视图/视图控制器吗?
- 18. 如何使用Chart.js v1添加彩色图例框到饼图?
- 19. 如何使用角图表和chart.js之控制图的宽度?
- 20. 如何使用chart.js在圆环图中添加图像?
- 21. 我应该尽可能使我的功能尽可能通用吗?
- 22. 为什么我的数据集不能使用Chart.js显示在线图上?
- 23. 使用Angular2无法使用Chart.js
- 24. 如何使用angular-chart.js显示所有工具提示Chart.js 2
- 25. VUE-chart.js之:可作为计算性能数据,但不是在图表表示
- 26. chart.js django - 选项不适用于图表
- 27. chart.js之用JSON
- 28. 未生成Chart.JS图表
- 29. chart.js之在角雷达图
- 30. html2canvas Chart.js图表未呈现
您遇到了多张系列呢? – shv22
你可以在论坛http://www.jscharts.com/forum/list.php?2 – shv22