【发布时间】:2013-05-24 22:50:01
【问题描述】:
使用office open XML SDK我绘制了一个带有平滑线的散点图,但想知道如何更改系列的线条样式以显示虚线?
【问题讨论】:
标签: ms-office openxml openxml-sdk
使用office open XML SDK我绘制了一个带有平滑线的散点图,但想知道如何更改系列的线条样式以显示虚线?
【问题讨论】:
标签: ms-office openxml openxml-sdk
最后我使用 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);
}
【讨论】: