如何使用nvd3做一个100%堆积的图表? [英] How can I make a 100% stacked chart with nvd3?

查看:84
本文介绍了如何使用nvd3做一个100%堆积的图表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看了nvd3堆积图表,有谁知道我怎么能做一个100%堆积图表与nvd3?

I looked at nvd3 stacked charts, and does anyone know how can I make a 100% stacked chart with nvd3?

例如,如下图所示: https://www.syncfusion.com/content/en-US/Products/Images/wpf/chart/wpf-chart-ColumnStacked100.jpg

推荐答案

我使用multibar图表,然后转换数据模拟100%堆叠条形图。我不得不添加每个条的值,然后在该条的值除以该条的总值。

I used the multibar chart and then transformed the data to simulate a 100% stacked bar chart. I had to add each of the bar's values and then divide value in the bar by the total value of the bar.

这篇关于如何使用nvd3做一个100%堆积的图表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆