我想更改实时图表中所有图例和工具提示圈子的大小。 我搜索了所有文档,但不知道如何称呼它。如何更改工具提示和图例中每个圆圈的大小?
PieChart pieChart = new PieChart();
pieChart.Width = 400;
pieChart.Height = 300;
pieChart.LegendLocation = LegendLocation.Bottom;
PieSeries pieSeries = new PieSeries();
pieSeries.Values = new ChartValues<int> { 5 };
pieSeries.Title = "A";
pieSeries.DataLabels = true;
PieSeries pieSeries2 = new PieSeries();
pieSeries2.Values = new ChartValues<int> { 3 };
pieSeries2.Title = "B";
pieSeries2.DataLabels = true;
PieSeries pieSeries3 = new PieSeries();
pieSeries3.Values = new ChartValues<int> { 6 };
pieSeries3.Title = "C";
pieSeries3.DataLabels = true;
pieChart.Series.Add(pieSeries);
pieChart.Series.Add(pieSeries2);
pieChart.Series.Add(pieSeries3);
答案 0 :(得分:0)
我发现了它: 以编程方式:
PieChart pieChart = new PieChart();
((DefaultLegend)pieChart.ChartLegend).BulletSize = 50;
((DefaultTooltip)pieChart.DataTooltip).BulletSize = 50;
XAML:
<lvc:PieChart Name="myPieChart" Series="{Binding SeriesCollection}">
<lvc:PieChart.ChartLegend>
<lvc:DefaultLegend BulletSize="20"></lvc:DefaultLegend>
</lvc:PieChart.ChartLegend>
<lvc:PieChart.DataTooltip>
<lvc:DefaultTooltip BulletSize="20"></lvc:DefaultTooltip>
</lvc:PieChart.DataTooltip>
</lvc:PieChart>