Office Open XML:在图表中绘制虚线

时间:2013-05-24 22:50:01

标签: ms-office openxml openxml-sdk

使用office open XML SDK我已经绘制了一个带有平滑线的散点图,但想知道如何更改该系列的线条样式以显示虚线?

1 个答案:

答案 0 :(得分:0)

最后,我使用OPenXML Productivity工具找出了它。您必须将PresetDash属性更改为System.Dash。

private void MakeSeriesDashedLine(ScatterChartSeries scs)
            {
                C.ChartShapeProperties chartShapeProperties1 = new C.ChartShapeProperties();
                A.Outline outline1 = new A.Outline();
                A.PresetDash presetDash1 = new A.PresetDash() { Val = A.PresetLineDashValues.SystemDash };

                outline1.Append(presetDash1);
                chartShapeProperties1.Append(outline1);
                scs.Append(chartShapeProperties1);
            }
相关问题