How to label Google Column Chart bars

前端 未结 2 1909
情书的邮戳
情书的邮戳 2020-12-16 02:43

I am using Google Chart API to create chart for values which goes from 1 to millions.

Problem The bars which are representing smaller values (ex: l

2条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-16 02:44

    I had some setbacks using annotation and the invisible line (for example, having it displayed in the tooltip as another series).

    I've made a hack to the ComboChart (could work with BarChart and ColumnChart as well, with a couple of changes) to insert the labels into the SVG.

    Check out this fiddle: http://jsfiddle.net/augustomen/FE2nh/

    Tested on Firefox 21, Chrome 27 and IE 9.

提交回复
热议问题