如何在Office Doc图表中查找和修改此项目? [英] How to find and modify just this item in Office Doc chart?
问题描述
<c:chart>
<c:plotArea>
<c:layout/>
<c:valAx>
<c:axId val="470561776"/>
<c:scaling>
<c:orientation val="minMax"/>
<c:max val="1"/>
尝试钻取xml并修改Max轴的值
Trying to drill into the xml and modify the value for Max axis
布拉德利:)
推荐答案
嗨布拉德利Rogers,
根据你的描述,我建议你可以创建一个Word文档,然后插入BarChart并保存。之后,您可以打开并更改此文档中图表中水平(值)轴的比例,然后将此文档另存为其他
名称,请参阅以下链接:
Hi Bradley Rogers,
According to your description, I suggest that you could create one Word document, then insert BarChart and save. After that you could open and change the scale of the horizontal (value) axis in a chart in this document, then save as this document with an other name, refer to below link:
更改图表中水平(类别)轴的比例
您可以使用Open比较这两个文档文件XML SDK生产力工具,然后是"查看零件代码",您将获得C#代码来查找和修改此项目。
Change the scale of the horizontal (category) axis in a chart
You could compare these two document file by use Open XML SDK productivity Tool, then "View Part Code", you would get C# code to find and modify this item.
public void ChangeChartPart(ChartPart chartPart1)
{
C.ChartSpace chartSpace1 = chartPart1.ChartSpace;
C.Chart chart1=chartSpace1.GetFirstChild<C.Chart>();
C.PlotArea plotArea1=chart1.GetFirstChild<C.PlotArea>();
C.ValueAxis valueAxis1=plotArea1.GetFirstChild<C.ValueAxis>();
C.Scaling scaling1=valueAxis1.GetFirstChild<C.Scaling>();
C.MinAxisValue minAxisValue1 = new C.MinAxisValue(){ Val = 3D };
scaling1.Append(minAxisValue1);
}
感谢您的理解。
Thanks for your understanding.
这篇关于如何在Office Doc图表中查找和修改此项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!