[英]morris.js horizontal bar chart
is it possible add horizontal bar chart with morris.js? 可以使用morris.js添加水平条形图吗?
http://jsbin.com/uzosiq/2/embed?javascript,live http://jsbin.com/uzosiq/2/embed?javascript,live
Thank you very much! 非常感谢你!
If you use morris from https://github.com/JelteF/morris.js it is possible to see horizontal graphs. 如果您使用https://github.com/JelteF/morris.js中的 morris,则可能会看到水平图。
Working example given in issue # 455 is - http://jsbin.com/pucadowa/8/edit?js,output 问题455中给出的工作示例是-http://jsbin.com/pucadowa/8/edit?js,输出
Actually there is, but a lot of code have to be written check this enter link description here 确实有,但是必须编写很多代码,请在此处输入链接说明
/*
* Play with this code and it'll update in the panel opposite.
*
* Why not try some of the options above?
*/
/* @license
morris.js v0.5.0
Copyright 2014 Olly Smith All rights reserved.
Licensed under the BSD-2-Clause License.
*/
/* @license
morris.js v0.5.1
Copyright 2014 Olly Smith All rights reserved.
Licensed under the BSD-2-Clause License.
*/
(function(){var a,b,c,d,e=[].slice,f=function(a,b){return function(){return .......}).call(this);
Morris.Bar({
element: 'bar-example',
data: [
{ y: '2006', a: 100, b: 90 },
{ y: '2007', a: 75, b: 65 },
{ y: '2008', a: 50, b: 40 },
{ y: '2009', a: 75, b: 65 },
{ y: '2010', a: 50, b: 40 },
{ y: '2011', a: 75, b: 65 },
{ y: '2012', a: 100, b: 90 }
],
xkey: 'y',
ykeys: ['a', 'b'],
labels: ['Series A', 'Series B'],
horizontal: true,
stacked: true
});
A quick perusal of the morris.js website shows no evidence of support for horizontal bar charts. 快速浏览morris.js网站不会显示支持水平条形图的证据。
A Google search "horizontal bar charts javascript" shows a number of possible candidates including this one : http://www.rgraph.net/examples/hbar.html Google搜索“水平条形图javascript”显示了许多可能的候选者,包括: http : //www.rgraph.net/examples/hbar.html
I don't think so but you can try 我不这么认为,但您可以尝试
http://www.jqplot.com/tests/bar-charts.php http://www.jqplot.com/tests/bar-charts.php
or 要么
If someone is looking for an updated version of morris then check out this forked version of the original one morrisjs version 6 如果有人正在寻找morris的更新版本,请查看原始morrisjs版本6的此分叉版本。
Plus it is way much better and updated ! 加上它的方式要好得多并且已更新!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.