这是解决方案。
如果要根据
yAxis
dataLabels总计。
[HIStackLabels alloc]init];
yaxis.stackLabels.enabled = [[NSNumber alloc] initWithBool:true];
yaxis.stackLabels.formatter = [[HIFunction alloc] initWithFunction:@"function() { if(this.total > 9) return 'Good'; if(this.y == 30) return 'Average';}"];
如果我们想根据特定列设置文本。
column1.dataLabels = [[HIDataLabels alloc]init];
column1.dataLabels.enabled = [NSNumber numberWithInteger:1];
column1.dataLabels.formatter = [[HIFunction alloc] initWithFunction:@"function() { if(this.y == 60) return 'Poor'; if(this.y == 30) return 'Average';}"];