ZedGraph饼图标签重叠

时间:2019-09-12 10:54:13

标签: c# zedgraph

我正在尝试使用C#编写饼图。不幸的是,这些值相差很大,因此饼图重叠的标签也不同。我想要一些帮助以使标签不重叠,或者希望在其他位置显示标签而不与图表连接?

我正在使用Zedgraph来执行此操作,但是无法在线找到任何帮助。

var zedGraph = new ZedGraphControl();
        GraphPane myPane = zedGraph.GraphPane;
        zedGraph.Size = new Size(1000, 1000);
        zedGraph.IsShowPointValues = true;


        myPane.Title.Text = "Matching Days Analysis";
        myPane.Fill = new Fill(Color.Cornsilk);
        myPane.Legend.IsVisible = true;

        // Add some pie slices
        PieItem segment1 = myPane.AddPieSlice(overmatch0, Color.Blue, 0, "Today's Matches");

        PieItem segment2 = myPane.AddPieSlice(overmatch1, Color.Red, 0, "1 Day");
        PieItem segment3 = myPane.AddPieSlice(overmatch2, Color.Yellow, 0, "2 Day");
        PieItem segment4 = myPane.AddPieSlice(overmatch3, Color.Green, 0, "3 Day");
        PieItem segment5 = myPane.AddPieSlice(overmatch4, Color.Aquamarine, 0, "4 Day");
        PieItem segment6 = myPane.AddPieSlice(overmatch5, Color.FloralWhite, 0, "5 Day");
        segment1.LabelType = PieLabelType.Name_Value;
        segment2.LabelType = PieLabelType.Name_Value;
        segment3.LabelType = PieLabelType.Name_Value;
        segment4.LabelType = PieLabelType.Name_Value;
        segment5.LabelType = PieLabelType.Name_Value;
        segment6.LabelType = PieLabelType.Name_Value;

        zedGraph.AxisChange();

条形图标签重叠。

0 个答案:

没有答案