سؤال

How to add annotation to serie C if value is > 0?

Fiddle

What configuration with...

data.addColumn({type: 'string', role: 'annotation'});

...is necessary?

هل كانت مفيدة؟

المحلول

You can add a calculated annotation column via the chart's view parameter:

view: {
    columns: [0, 1, 2, 3, {
        type: 'string',
        role: 'annotation',
        calc: function (dt, row) {
            return (dt.getValue(row, 3) > 0) ? 'Yes' : null;
        }
    }]
}

See working example: http://jsfiddle.net/asgallant/hRpDp/3/

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top