I’m using the transform property on a barchart to get sum/avg/count/… of a group. I’d like to display the calculated value on top of the barchart, but I can’t figure out how to access the value.
Code:
_d.forEach(trace => {
graph_data.push({
y: trace.values,
x: trace.dates.map(date => this.transformDate(date)),
customdata: trace.info,
type: 'bar',
text: "i want to be the aggregate value",
name: trace.info[0].naam,
transforms: [{
type: 'aggregate',
groups: trace.dates.map(date => this.transformDate(date)),
aggregations: [
{target: 'y', func: aggregation, enabled: true}
]
}]
});
});