1
A
回答
3
你可能想看看使用极坐标图(见http://www.highcharts.com/demo/polar)。
尝试使用Highcharts演示中的“列”系列作为起点;那就是应该让你最接近你想要实现的版本。您可以使每个点具有不同的颜色以符合您的示例。
更新(2016年5月29日):我的工作你比如像上严格基于样本小提琴:https://jsfiddle.net/brightmatrix/uzna0mk6/
这是我从Highcharts'极坐标图演示修改了代码。它不是100%完美的,因为楔形标签在你的示例图像中格式化会很棘手,但这应该会让你变得相当不错。
我希望这有助于!
$(function() {
$('#container').highcharts({
chart: { polar: true },
title: { text: 'Highcharts polar chart with colored wedges' },
legend: { enabled: false },
plotOptions: {
// starts the chart at the 12-o-clock position
pointPlacement: 'on'
},
xAxis: {
type: 'category',
categories: ['series A','series B','series C','series D','series E'],
},
yAxis: {
min: 0, max: 100,
labels: { enabled: false }
},
plotOptions: {
series: {
dataLabels: {
enabled: true,
inside: true,
verticalAlign: 'middle'
},
// keeps the pie wedges joined together
pointPadding: 0,
groupPadding: 0,
stacking: 'normal'
}
},
series: [{
type: 'column',
name: 'background fill for the wedges',
data: [18,30,45,47,5],
color: '#BCBCBC',
enableMouseTracking: false, // prevent the user from interacting with this series
dataLabels: { enabled: false }
}, {
type: 'column',
name: 'wedge value',
data: [
// each slice of the pie gets its own color
{ y: 82, color: 'blue' },
{ y: 70, color: 'purple' },
{ y: 55, color: 'orange' },
{ y: 53, color: 'yellow' },
{ y: 95, color: 'green' }
]
}]
});
});
相关问题
- 1. WAP彩色图片
- 2. 如何彩色Telerik Kendo UI饼图楔?
- 3. Highcharts与饼图切片颜色相同的图例颜色
- 4. JqPlot饼图 - 更改饼切片颜色
- 5. iPhone彩色图像分析
- 6. jQuery饼图与深入/可点击的饼图部分
- 7. 彩色小插图着色器(外部部分) - LIBGDX
- 8. 在高图中分享饼图和列之间的颜色
- 9. 如何使用Chart.js v1添加彩色图例框到饼图?
- 10. 多个彩色框图与图例
- 11. 谷歌饼图饼图背景图片
- 12. 用Plotly定义饼图切片颜色
- 13. HTML:图片/图片高度百分比
- 14. Unity3d:彩色图层
- 15. 生成彩色图
- 16. Matplotlib:彩色条的高度与绘图相同
- 17. Flot饼图 - 外部选择切片
- 18. 将饼图分成相等部分jfreechart
- 19. 与芯图(饼图)
- 20. 绘图与色彩对应的标记
- 21. 将图片插入饼图切片
- 22. PHP饼图不会分裂成片
- 23. d3饼图颜色分配到圆弧
- 24. GNUPLOT - 在饼图中分配颜色
- 25. R图例颜色与饼图颜色不匹配
- 26. Matlab /八度饼图饼图分类
- 27. jQPlot饼图 - 如何更改饼图切片标签的文本颜色
- 28. rdlc(饼图)不同部分的自定义颜色
- 29. 更改饼图高图中的默认颜色角度
- 30. 如何更改我的高图饼图的颜色?
谢谢,Brightmatrix。我原来看到它,但是因为我的“馅饼切片”的大小不一样,所以我认为这是极坐标图的要求。我弄错了吗? –
@jeromeso好消息是,您的切片不需要为极坐标图的大小相同。这就是为什么我向你推荐这种图表类型的原因......你在这里得到的是一个真正的柱形图,它被调整为形成馅饼楔子。如果你喜欢,我可以从这个图像中设置一个工作小提琴。 –
谢谢,Brightmatrix。如果你能向我展示如何做到这一点,这将是一个很好的例子! –