Question

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

Fiddle

What configuration with...

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

...is necessary?

Était-ce utile?

La solution

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/

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top