首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >morris.js水平条形图

morris.js水平条形图
EN

Stack Overflow用户
提问于 2012-11-08 01:25:15
回答 5查看 21.6K关注 0票数 3

是否可以使用morris.js添加水平条形图?

http://jsbin.com/uzosiq/2/embed?javascript,live

非常感谢!

EN

回答 5

Stack Overflow用户

回答已采纳

发布于 2012-11-08 01:59:23

快速浏览一下morris.js网站,就会发现没有支持水平条形图的证据。

谷歌搜索“水平条形图javascript”会显示一些可能的候选者,包括这个:http://www.rgraph.net/examples/hbar.html

票数 1
EN

Stack Overflow用户

发布于 2016-08-30 20:50:54

如果您使用https://github.com/JelteF/morris.js中的莫里斯,则可以看到水平图形。

第#期455中给出的工作示例是- http://jsbin.com/pucadowa/8/edit?js,output

票数 4
EN

Stack Overflow用户

发布于 2017-09-19 07:58:24

实际上是有的,但是检查这个enter link description here需要写很多代码

代码语言:javascript
复制
/*
 * 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
});
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/13274917

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档