private void SetTooltipIndicatorLabel(Tooltip tooltip, Axis axis, ChartLabel label) { if (label == null) { return; } if (double.IsPositiveInfinity(axis.context.pointerValue)) { return; } label.SetActive(true); label.SetTextActive(true); label.SetPosition(axis.context.pointerLabelPosition); if (axis.IsCategory()) { label.SetText(axis.GetData((int)axis.context.pointerValue)); } else { label.SetText(axis.context.pointerValue.ToString("f2")); } var textColor = axis.axisLabel.textStyle.GetColor(chart.theme.axis.textColor); if (ChartHelper.IsClearColor(tooltip.indicatorLabelStyle.background.color)) { label.color = textColor; } else { label.color = tooltip.indicatorLabelStyle.background.color; } label.SetTextColor(Color.white); }