【问题标题】:Office Open XML: Drawing Dashed Line in ChartOffice Open XML:在图表中绘制虚线
【发布时间】:2013-05-24 22:50:01
【问题描述】:

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

【问题讨论】:

    标签: ms-office openxml openxml-sdk


    【解决方案1】:

    最后我使用 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);
                }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2022-11-08
      • 2016-08-22
      • 2010-12-02
      • 2012-08-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多