本文整理汇总了C#中ExcelDrawings类的典型用法代码示例。如果您正苦于以下问题:C# ExcelDrawings类的具体用法?C# ExcelDrawings怎么用?C# ExcelDrawings使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ExcelDrawings类属于命名空间,在下文中一共展示了ExcelDrawings类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ExcelBarChart
internal ExcelBarChart(ExcelDrawings drawings, XmlNode node, eChartType type)
: base(drawings, node, type)
{
SetChartNodeText();
SetTypeProperties(drawings, type);
}
示例2: ExcelBarChart
//internal ExcelBarChart(ExcelDrawings drawings, XmlNode node) :
// base(drawings, node/*, 1*/)
//{
// SetChartNodeText("");
//}
//internal ExcelBarChart(ExcelDrawings drawings, XmlNode node, eChartType type) :
// base(drawings, node, type)
//{
// SetChartNodeText("");
// SetTypeProperties(drawings, type);
//}
internal ExcelBarChart(ExcelDrawings drawings, XmlNode node, eChartType type, ExcelChart topChart, ExcelPivotTable PivotTableSource)
: base(drawings, node, type, topChart, PivotTableSource)
{
SetChartNodeText("");
SetTypeProperties(drawings, type);
}
示例3: ExcelPicture
internal ExcelPicture(ExcelDrawings drawings, XmlNode node) :
base(drawings, node, "xdr:pic/xdr:nvPicPr/xdr:cNvPr/@name")
{
XmlNode picNode = node.SelectSingleNode("xdr:pic/xdr:blipFill/a:blip", drawings.NameSpaceManager);
if (picNode != null)
{
RelPic = drawings.Part.GetRelationship(picNode.Attributes["r:embed"].Value);
UriPic = PackUriHelper.ResolvePartUri(drawings.UriDrawing, RelPic.TargetUri);
Part = drawings.Part.Package.GetPart(UriPic);
FileInfo f = new FileInfo(UriPic.OriginalString);
ContentType = GetContentType(f.Extension);
_image = Image.FromStream(Part.GetStream());
ImageConverter ic=new ImageConverter();
var iby=(byte[])ic.ConvertTo(_image, typeof(byte[]));
var ii = _drawings._package.LoadImage(iby, UriPic, Part);
ImageHash = ii.Hash;
string relID = GetXmlNodeString("xdr:pic/xdr:nvPicPr/xdr:cNvPr/a:hlinkClick/@r:id");
if (!string.IsNullOrEmpty(relID))
{
HypRel = drawings.Part.GetRelationship(relID);
if (HypRel.TargetUri.IsAbsoluteUri)
{
_hyperlink = new ExcelHyperLink(HypRel.TargetUri.AbsoluteUri);
}
else
{
_hyperlink = new ExcelHyperLink(HypRel.TargetUri.OriginalString, UriKind.Relative);
}
((ExcelHyperLink)_hyperlink).ToolTip = GetXmlNodeString("xdr:pic/xdr:nvPicPr/xdr:cNvPr/a:hlinkClick/@tooltip");
}
}
}
示例4: ExcelBubbleChart
internal ExcelBubbleChart(ExcelDrawings drawings, XmlNode node, eChartType type, ExcelChart topChart, ExcelPivotTable PivotTableSource)
: base(drawings, node, type, topChart, PivotTableSource)
{
ShowNegativeBubbles = false;
BubbleScale = 100;
_chartSeries = new ExcelBubbleChartSeries(this, drawings.NameSpaceManager, _chartNode, PivotTableSource!=null);
//SetTypeProperties();
}
示例5: ExcelLineChart
internal ExcelLineChart(ExcelDrawings drawings, XmlNode node, Uri uriChart, PackagePart part, XmlDocument chartXml, XmlNode chartNode)
: base(drawings, node, uriChart, part, chartXml, chartNode)
{
//_chartTopPath = string.Format(_chartTopPath, chartNode.Name);
}
示例6: SetTypeProperties
private void SetTypeProperties(ExcelDrawings drawings, eChartType type)
{
/******* Bar direction *******/
if (type == eChartType.BarClustered ||
type == eChartType.BarStacked ||
type == eChartType.BarStacked100 ||
type == eChartType.BarClustered3D ||
type == eChartType.BarStacked3D ||
type == eChartType.BarStacked1003D ||
type == eChartType.ConeBarClustered ||
type == eChartType.ConeBarStacked ||
type == eChartType.ConeBarStacked100 ||
type == eChartType.CylinderBarClustered ||
type == eChartType.CylinderBarStacked ||
type == eChartType.CylinderBarStacked100 ||
type == eChartType.PyramidBarClustered ||
type == eChartType.PyramidBarStacked ||
type == eChartType.PyramidBarStacked100)
{
Direction = eDirection.Bar;
}
else if (
type == eChartType.ColumnClustered ||
type == eChartType.ColumnStacked ||
type == eChartType.ColumnStacked100 ||
type == eChartType.Column3D ||
type == eChartType.ColumnClustered3D ||
type == eChartType.ColumnStacked3D ||
type == eChartType.ColumnStacked1003D ||
type == eChartType.ConeCol ||
type == eChartType.ConeColClustered ||
type == eChartType.ConeColStacked ||
type == eChartType.ConeColStacked100 ||
type == eChartType.CylinderCol ||
type == eChartType.CylinderColClustered ||
type == eChartType.CylinderColStacked ||
type == eChartType.CylinderColStacked100 ||
type == eChartType.PyramidCol ||
type == eChartType.PyramidColClustered ||
type == eChartType.PyramidColStacked ||
type == eChartType.PyramidColStacked100)
{
Direction = eDirection.Column;
}
/****** Shape ******/
if (type == eChartType.ColumnClustered ||
type == eChartType.ColumnStacked ||
type == eChartType.ColumnStacked100 ||
type == eChartType.Column3D ||
type == eChartType.ColumnClustered3D ||
type == eChartType.ColumnStacked3D ||
type == eChartType.ColumnStacked1003D ||
type == eChartType.BarClustered ||
type == eChartType.BarStacked ||
type == eChartType.BarStacked100 ||
type == eChartType.BarClustered3D ||
type == eChartType.BarStacked3D ||
type == eChartType.BarStacked1003D)
{
Shape = eShape.Box;
}
else if (
type == eChartType.CylinderBarClustered ||
type == eChartType.CylinderBarStacked ||
type == eChartType.CylinderBarStacked100 ||
type == eChartType.CylinderCol ||
type == eChartType.CylinderColClustered ||
type == eChartType.CylinderColStacked ||
type == eChartType.CylinderColStacked100)
{
Shape = eShape.Cylinder;
}
else if (
type == eChartType.ConeBarClustered ||
type == eChartType.ConeBarStacked ||
type == eChartType.ConeBarStacked100 ||
type == eChartType.ConeCol ||
type == eChartType.ConeColClustered ||
type == eChartType.ConeColStacked ||
type == eChartType.ConeColStacked100)
{
Shape = eShape.Cone;
}
else if (
type == eChartType.PyramidBarClustered ||
type == eChartType.PyramidBarStacked ||
type == eChartType.PyramidBarStacked100 ||
type == eChartType.PyramidCol ||
type == eChartType.PyramidColClustered ||
type == eChartType.PyramidColStacked ||
type == eChartType.PyramidColStacked100)
{
Shape = eShape.Pyramid;
}
}
示例7: GetChart
internal static ExcelChart GetChart(XmlElement chartNode, ExcelDrawings drawings, XmlNode node, Uri uriChart, Packaging.ZipPackagePart part, XmlDocument chartXml, ExcelChart topChart)
{
switch (chartNode.LocalName)
{
case "area3DChart":
case "areaChart":
case "stockChart":
if (topChart == null)
{
return new ExcelChart(drawings, node, uriChart, part, chartXml, chartNode);
}
else
{
return new ExcelChart(topChart, chartNode);
}
case "surface3DChart":
case "surfaceChart":
if (topChart == null)
{
return new ExcelSurfaceChart(drawings, node, uriChart, part, chartXml, chartNode);
}
else
{
return new ExcelSurfaceChart(topChart, chartNode);
}
case "radarChart":
if (topChart == null)
{
return new ExcelRadarChart(drawings, node, uriChart, part, chartXml, chartNode);
}
else
{
return new ExcelRadarChart(topChart, chartNode);
}
case "bubbleChart":
if (topChart == null)
{
return new ExcelBubbleChart(drawings, node, uriChart, part, chartXml, chartNode);
}
else
{
return new ExcelBubbleChart(topChart, chartNode);
}
case "barChart":
case "bar3DChart":
if (topChart == null)
{
return new ExcelBarChart(drawings, node, uriChart, part, chartXml, chartNode);
}
else
{
return new ExcelBarChart(topChart, chartNode);
}
case "doughnutChart":
if (topChart == null)
{
return new ExcelDoughnutChart(drawings, node, uriChart, part, chartXml, chartNode);
}
else
{
return new ExcelDoughnutChart(topChart, chartNode);
}
case "pie3DChart":
case "pieChart":
if (topChart == null)
{
return new ExcelPieChart(drawings, node, uriChart, part, chartXml, chartNode);
}
else
{
return new ExcelPieChart(topChart, chartNode);
}
case "ofPieChart":
if (topChart == null)
{
return new ExcelOfPieChart(drawings, node, uriChart, part, chartXml, chartNode);
}
else
{
return new ExcelBarChart(topChart, chartNode);
}
case "lineChart":
case "line3DChart":
if (topChart == null)
{
return new ExcelLineChart(drawings, node, uriChart, part, chartXml, chartNode);
}
else
{
return new ExcelLineChart(topChart, chartNode);
}
case "scatterChart":
if (topChart == null)
{
return new ExcelScatterChart(drawings, node, uriChart, part, chartXml, chartNode);
}
else
{
return new ExcelScatterChart(topChart, chartNode);
}
//.........这里部分代码省略.........
示例8: ExcelChart
internal ExcelChart(ExcelDrawings drawings, XmlNode node, Uri uriChart, ZipPackagePart part, XmlDocument chartXml, XmlNode chartNode)
: base(drawings, node, "xdr:graphicFrame/xdr:nvGraphicFramePr/xdr:cNvPr/@name")
{
UriChart = uriChart;
Part = part;
ChartXml = chartXml;
_chartNode = chartNode;
InitChartLoad(drawings, chartNode);
ChartType = GetChartType(chartNode.LocalName);
}
示例9: ExcelShape
internal ExcelShape(ExcelDrawings drawings, XmlNode node) :
base(drawings, node, "xdr:sp/xdr:nvSpPr/xdr:cNvPr/@name")
{
init();
}
示例10: ExcelDoughnutChart
internal ExcelDoughnutChart(ExcelDrawings drawings, XmlNode node, Uri uriChart, Packaging.ZipPackagePart part, XmlDocument chartXml, XmlNode chartNode) :
base(drawings, node, uriChart, part, chartXml, chartNode)
{
//SetPaths();
}
示例11: ExcelScatterChart
internal ExcelScatterChart(ExcelDrawings drawings, XmlNode node, Uri uriChart, PackagePart part, XmlDocument chartXml, XmlNode chartNode)
: base(drawings, node, uriChart, part, chartXml, chartNode)
{
SetTypeProperties();
}
示例12: ExcelLineChart
internal ExcelLineChart(ExcelDrawings drawings, XmlNode node, eChartType type, ExcelChart topChart, ExcelPivotTable PivotTableSource) :
base(drawings, node, type, topChart, PivotTableSource)
{
Smooth = false;
}
示例13: Init
private void Init(ExcelDrawings drawings, XmlNode chartNode)
{
//_chartXmlHelper = new XmlHelper(drawings.NameSpaceManager, chartNode);
_chartXmlHelper = XmlHelperFactory.Create(drawings.NameSpaceManager, chartNode);
_chartXmlHelper.SchemaNodeOrder = new string[] { "title", "pivotFmt", "autoTitleDeleted", "view3D", "floor", "sideWall", "backWall", "plotArea", "wireframe", "barDir", "grouping", "scatterStyle", "radarStyle", "varyColors", "ser", "dLbls", "bubbleScale", "showNegBubbles", "dropLines", "upDownBars", "marker", "smooth", "shape", "legend", "plotVisOnly", "dispBlanksAs", "showDLblsOverMax", "overlap", "bandFmts", "axId", "spPr", "printSettings" };
WorkSheet = drawings.Worksheet;
}
示例14: InitChartLoad
private void InitChartLoad(ExcelDrawings drawings, XmlNode chartNode)
{
//SetChartType();
bool isPivot = false;
Init(drawings, chartNode);
_chartSeries = new ExcelChartSeries(this, drawings.NameSpaceManager, _chartNode, isPivot /*ChartXml.SelectSingleNode(_chartPath, drawings.NameSpaceManager)*/);
LoadAxis();
}
示例15: ExcelDoughnutChart
//internal ExcelDoughnutChart(ExcelDrawings drawings, XmlNode node) :
// base(drawings, node)
//{
// SetPaths();
//}
internal ExcelDoughnutChart(ExcelDrawings drawings, XmlNode node, eChartType type, bool isPivot) :
base(drawings, node, type, isPivot)
{
//SetPaths();
}