1

如何使用 BubbleSeries(或任何其他系列)在图表点内显示标签?

4

1 回答 1

1

这应该适用于 LiveCharts 中的任何系列:

  • 要在图表点上显示标签,请在系列上设置 DataLabels=true
  • 要自定义显示的标签,请使用系列上的 LabelPoint 属性

示例(注意 BubbleSeries 将在库的下一版本中更改为 ScatterSeries):

var mySeries = new ScatterSeries
{
    Values = new ChartValues<ScatterPoint> { new ScatterPoint(3,4,80) },
    DataLabels = true,
    LabelPoint = point => point.X + "," + point.Y + "," + point.Weight
};

将显示

在此处输入图像描述

于 2016-08-03T10:16:11.733 回答