javascript - Google charts column chart ignoring 0 values for annotation positioning -
the issue having annotation positioning in google charts column chart not respecting 0 values in data set , such not appearing outside column configured.
instead appearing within column (depending on height) not expected behavior , looks this:

you can see 21 cat b. starting bottom 3 cat d instead of @ top cat a.
i have above example coded here: http://jsfiddle.net/7x6lxr3t/2/ can see chart data follows:
var data = [ ["statuses", "definition", "dev", "test", "closed", {type: 'string', role: 'annotation'}], ["cat a.", 28, 25, 3, 7, 63], ["cat b.", 3, 19, 0, 0, 21], ["cat c.", 0, 0, 0, 0, 0], ["cat d.", 0, 3, 0, 0, 3] ]; and annotations configured follows:
annotations: { alwaysoutside: true, textstyle: { fontsize: 14, bold: true, color: '#000000' } }, and know last 0 value before annotation because if change cat b. data to:
["cat b.", 3, 19, 0, 1, 21], the annotation in correct positioning:

any suggestions appreciated.
Comments
Post a Comment