开发者

gRaphael: How to increase spacing between bars in bar graph

I have created a horizontal bar graph using gRaphael charting library. I want to increase the spacing between the bars. Is there an option to 开发者_如何学Pythondo that?


Well, from what I know there's not exactly a way to increase spacing but you can do so by manipulating the gutter value during initialization.

See:

g.raphael docs here


increase the gutter. It can be received as an option or just change g.bar.js


From what I have seen using the dotchart, the spacing is controlled indirectly using the width and height of a chart.

I originally thought that the x_coords and y_coords variables I have below specify the exact pixel locations of the data, but it appears they only indirectly control this.

var r = Raphael(div_tag);  

r.dotchart(x_center,y_center,width,height,x_coords,y_coords,data, {symbol: "o", max: 10, heat: true, axis: "0 0 1 1", axisxstep: axisx_step, axisystep: axisy_step, axisxlabels: g_xaxis, axisxtype: " ", axisytype: " ", axisylabels: g_yaxis}

So the spacing is proportional to width/(# of values on the x axis) .

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜