C# 在气泡列表中的图表点内显示标签

C# 在气泡列表中的图表点内显示标签,c#,livecharts,C#,Livecharts,如何使用BubbleSeries(或任何其他系列)在图表点内显示标签?这适用于LiveCharts中的任何系列: 要在图表点上显示标签,请在序列上设置DataLabels=true 要自定义显示的标签,请使用序列上的LabelPoint特性 示例(请注意,在库的下一个版本中,BubbleSeries将更改为ScatterSeries): var mySeries=new ScatterSeries { 值=新图表值{新散射点(3,4,80)}, DataLabels=true, LabelP

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

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

  • 要在图表点上显示标签,请在序列上设置DataLabels=true
  • 要自定义显示的标签,请使用序列上的LabelPoint特性
示例(请注意,在库的下一个版本中,BubbleSeries将更改为ScatterSeries):

var mySeries=new ScatterSeries
{
值=新图表值{新散射点(3,4,80)},
DataLabels=true,
LabelPoint=point=>point.X+“,“+point.Y+”,“+point.Weight
};
将显示

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