繁体   English   中英

RGraph条形图轴反转不起作用

[英]RGraph bar chart axis invert not working

我试图绘制一个条形图,将比例尺反转,即顶部的0和底部的xaxis交叉处的100,但是即使使用ylabels.invert也无效。 谁能帮我?

    var bar4 = new RGraph.Bar(canvM,  [[74,80],[74,80],[75,81],[76,82],[77,83],[76,84],[75,83],[79,84],[77,85],[79,86],[79],[80]])
    .Set('labels', ['2º Semestre 2008','1º Semestre 2009','2º Semestre 2009','1º Semestre 2010','2º Semestre 2010','1º Semestre 2011','2º Semestre 2011','1º Semestre 2012','2º Semestre 2012','1º Semestre 2013','2º Semestre 2013','1º Semestre 2014'])
    .Set('strokestyle', 'transparent')
    .Set('hmargin.grouped', 0)
    .Set('hmargin', 10)
            .Set('ylabels.invert', true)
    .Set('scale.round', true)
    .Set('gutter.bottom', 150)
    .Set('gutter.left', 60)
    .Set('gutter.top', 40)
    .Set('gutter.right', 30)
    .Set('text.angle', 90)
    .Set('labels.above', true)
    .Set('labels.above.size', 8)
    .Set('labels.above.decimals', 2)
    .Set('ymax', 100)
    .Set('shadow', false)
    .Set('background.grid.autofit.numhlines', 4)
    .Set('numxticks', 12)
    .Set('background.grid.autofit.numvlines', 12)
    .Set('colors', ['#e98f16', '#8e493e'])
    .Set('variant', '3d')
    .Set('bevel', true)
    .Set('numyticks', 4)
    .Set('ylabels.count', 4)
    .Set('scale.decimals', 2)
    .Set('units.post', '%')
    .Draw();

条形图没有反转选项。 但是您可以做的是关闭条形图Y轴并使用图形API Y轴对象-可以。

http://www.rgraph.net/docs/drawing-api-yaxis.html

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM