本文整理汇总了C#中eChartType类的典型用法代码示例。如果您正苦于以下问题:C# eChartType类的具体用法?C# eChartType怎么用?C# eChartType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
eChartType类属于命名空间,在下文中一共展示了eChartType类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: 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);
}
开发者ID:princeoffoods,项目名称:EPPlus,代码行数:18,代码来源:ExcelBarChart.cs
示例2: ExcelBarChart
internal ExcelBarChart(ExcelDrawings drawings, XmlNode node, eChartType type)
: base(drawings, node, type)
{
SetChartNodeText();
SetTypeProperties(drawings, type);
}
开发者ID:huoxudong125,项目名称:EPPlus,代码行数:7,代码来源:ExcelBarChart.cs
示例3: 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();
}
开发者ID:kidaa,项目名称:DissDlcToolkit,代码行数:8,代码来源:ExcelBubbleChart.cs
示例4: AddRadarType
private string AddRadarType(eChartType type)
{
if (type == eChartType.Radar ||
type == eChartType.RadarFilled||
type == eChartType.RadarMarkers)
{
return "<c:radarStyle val=\"\" />";
}
else
{
return "";
}
}
开发者ID:kidaa,项目名称:DissDlcToolkit,代码行数:13,代码来源:ExcelChart.cs
示例5: AddScatterType
private string AddScatterType(eChartType type)
{
if (type == eChartType.XYScatter ||
type == eChartType.XYScatterLines ||
type == eChartType.XYScatterLinesNoMarkers ||
type == eChartType.XYScatterSmooth ||
type == eChartType.XYScatterSmoothNoMarkers)
{
return "<c:scatterStyle val=\"\" />";
}
else
{
return "";
}
}
开发者ID:kidaa,项目名称:DissDlcToolkit,代码行数:15,代码来源:ExcelChart.cs
示例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;
}
}
开发者ID:huoxudong125,项目名称:EPPlus,代码行数:96,代码来源:ExcelBarChart.cs
示例7: 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();
}
开发者ID:missxiaohuang,项目名称:Weekly,代码行数:10,代码来源:ExcelDoughnutChart.cs
示例8: GetChartSerieStartXml
private string GetChartSerieStartXml(eChartType type, int axID, int xAxID, int serAxID)
{
StringBuilder xml = new StringBuilder();
xml.Append(AddScatterType(type));
xml.Append(AddRadarType(type));
xml.Append(AddBarDir(type));
xml.Append(AddGrouping());
xml.Append(AddVaryColors());
xml.Append(AddHasMarker(type));
xml.Append(AddShape(type));
xml.Append(AddFirstSliceAng(type));
xml.Append(AddHoleSize(type));
if (ChartType == eChartType.BarStacked100 ||
ChartType == eChartType.BarStacked ||
ChartType == eChartType.ColumnStacked ||
ChartType == eChartType.ColumnStacked100)
{
xml.Append("<c:overlap val=\"100\"/>");
}
if (IsTypeSurface())
{
xml.Append("<c:bandFmts/>");
}
xml.Append(AddAxisId(axID, xAxID, serAxID));
return xml.ToString();
}
开发者ID:kidaa,项目名称:DissDlcToolkit,代码行数:28,代码来源:ExcelChart.cs
示例9: ExcelChart
internal ExcelChart(ExcelDrawings drawings, XmlNode node, eChartType type, ExcelChart topChart, ExcelPivotTable PivotTableSource)
: base(drawings, node, "xdr:graphicFrame/xdr:nvGraphicFramePr/xdr:cNvPr/@name")
{
ChartType = type;
CreateNewChart(drawings, type, topChart);
Init(drawings, _chartNode);
_chartSeries = new ExcelChartSeries(this, drawings.NameSpaceManager, _chartNode, PivotTableSource!=null);
if (PivotTableSource != null) SetPivotSource(PivotTableSource);
SetTypeProperties();
if (topChart == null)
LoadAxis();
else
{
_axis = topChart.Axis;
if (_axis.Length > 0)
{
XAxis = _axis[0];
YAxis = _axis[1];
}
}
}
开发者ID:kidaa,项目名称:DissDlcToolkit,代码行数:24,代码来源:ExcelChart.cs
示例10: IsType3D
internal static bool IsType3D(eChartType chartType)
{
return chartType == eChartType.Area3D ||
chartType == eChartType.AreaStacked3D ||
chartType == eChartType.AreaStacked1003D ||
chartType == eChartType.BarClustered3D ||
chartType == eChartType.BarStacked3D ||
chartType == eChartType.BarStacked1003D ||
chartType == eChartType.Column3D ||
chartType == eChartType.ColumnClustered3D ||
chartType == eChartType.ColumnStacked3D ||
chartType == eChartType.ColumnStacked1003D ||
chartType == eChartType.Line3D ||
chartType == eChartType.Pie3D ||
chartType == eChartType.PieExploded3D ||
chartType == eChartType.ConeBarClustered ||
chartType == eChartType.ConeBarStacked ||
chartType == eChartType.ConeBarStacked100 ||
chartType == eChartType.ConeCol ||
chartType == eChartType.ConeColClustered ||
chartType == eChartType.ConeColStacked ||
chartType == eChartType.ConeColStacked100 ||
chartType == eChartType.CylinderBarClustered ||
chartType == eChartType.CylinderBarStacked ||
chartType == eChartType.CylinderBarStacked100 ||
chartType == eChartType.CylinderCol ||
chartType == eChartType.CylinderColClustered ||
chartType == eChartType.CylinderColStacked ||
chartType == eChartType.CylinderColStacked100 ||
chartType == eChartType.PyramidBarClustered ||
chartType == eChartType.PyramidBarStacked ||
chartType == eChartType.PyramidBarStacked100 ||
chartType == eChartType.PyramidCol ||
chartType == eChartType.PyramidColClustered ||
chartType == eChartType.PyramidColStacked ||
chartType == eChartType.PyramidColStacked100 ||
chartType == eChartType.Surface ||
chartType == eChartType.SurfaceTopView ||
chartType == eChartType.SurfaceTopViewWireframe ||
chartType == eChartType.SurfaceWireframe;
}
开发者ID:kidaa,项目名称:DissDlcToolkit,代码行数:41,代码来源:ExcelChart.cs
示例11: ChartStartXml
private string ChartStartXml(eChartType type)
{
StringBuilder xml=new StringBuilder();
int axID=1;
int xAxID=2;
int serAxID = IsTypeSurface() ? 3 : -1;
xml.Append("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>");
xml.AppendFormat("<c:chartSpace xmlns:c=\"{0}\" xmlns:a=\"{1}\" xmlns:r=\"{2}\">", ExcelPackage.schemaChart, ExcelPackage.schemaDrawings, ExcelPackage.schemaRelationships);
xml.Append("<c:chart>");
xml.AppendFormat("{0}{1}<c:plotArea><c:layout/>",AddPerspectiveXml(type), AddSurfaceXml(type));
string chartNodeText = GetChartNodeText();
xml.AppendFormat("<{0}>", chartNodeText);
xml.Append(GetChartSerieStartXml(type, axID, xAxID, serAxID));
xml.AppendFormat("</{0}>", chartNodeText);
//Axis
if (!IsTypePieDoughnut())
{
if (IsTypeScatterBubble())
{
xml.AppendFormat("<c:valAx><c:axId val=\"{0}\"/><c:scaling><c:orientation val=\"minMax\"/></c:scaling><c:delete val=\"0\"/><c:axPos val=\"b\"/><c:tickLblPos val=\"nextTo\"/><c:crossAx val=\"{1}\"/><c:crosses val=\"autoZero\"/></c:valAx>", axID, xAxID);
}
else
{
xml.AppendFormat("<c:catAx><c:axId val=\"{0}\"/><c:scaling><c:orientation val=\"minMax\"/></c:scaling><c:delete val=\"0\"/><c:axPos val=\"b\"/><c:tickLblPos val=\"nextTo\"/><c:crossAx val=\"{1}\"/><c:crosses val=\"autoZero\"/><c:auto val=\"1\"/><c:lblAlgn val=\"ctr\"/><c:lblOffset val=\"100\"/></c:catAx>", axID, xAxID);
}
xml.AppendFormat("<c:valAx><c:axId val=\"{1}\"/><c:scaling><c:orientation val=\"minMax\"/></c:scaling><c:delete val=\"0\"/><c:axPos val=\"l\"/><c:majorGridlines/><c:tickLblPos val=\"nextTo\"/><c:crossAx val=\"{0}\"/><c:crosses val=\"autoZero\"/><c:crossBetween val=\"between\"/></c:valAx>", axID, xAxID);
if (serAxID==3) //Sureface Chart
{
xml.AppendFormat("<c:serAx><c:axId val=\"{0}\"/><c:scaling><c:orientation val=\"minMax\"/></c:scaling><c:delete val=\"0\"/><c:axPos val=\"b\"/><c:tickLblPos val=\"nextTo\"/><c:crossAx val=\"{1}\"/><c:crosses val=\"autoZero\"/></c:serAx>", serAxID, xAxID);
}
}
xml.AppendFormat("</c:plotArea><c:legend><c:legendPos val=\"r\"/><c:layout/><c:overlay val=\"0\" /></c:legend><c:plotVisOnly val=\"1\"/></c:chart>", axID, xAxID);
xml.Append("<c:printSettings><c:headerFooter/><c:pageMargins b=\"0.75\" l=\"0.7\" r=\"0.7\" t=\"0.75\" header=\"0.3\" footer=\"0.3\"/><c:pageSetup/></c:printSettings></c:chartSpace>");
return xml.ToString();
}
开发者ID:kidaa,项目名称:DissDlcToolkit,代码行数:40,代码来源:ExcelChart.cs
示例12: AddChart
/// <summary>
/// Add a new chart to the worksheet.
/// Do not support Bubble-, Radar-, Stock- or Surface charts.
/// </summary>
/// <param name="Name"></param>
/// <param name="ChartType">Type of chart</param>
/// <returns></returns>
public ExcelChart AddChart(string Name, eChartType ChartType)
{
if(_drawingNames.ContainsKey(Name.ToLower()))
{
throw new Exception("Name already exist in the drawings collection");
}
if (ChartType == eChartType.Bubble ||
ChartType == eChartType.Bubble3DEffect ||
ChartType == eChartType.Radar ||
ChartType == eChartType.RadarFilled ||
ChartType == eChartType.RadarMarkers ||
ChartType == eChartType.StockHLC ||
ChartType == eChartType.StockOHLC ||
ChartType == eChartType.StockVOHLC ||
ChartType == eChartType.Surface ||
ChartType == eChartType.SurfaceTopView ||
ChartType == eChartType.SurfaceTopViewWireframe ||
ChartType == eChartType.SurfaceWireframe)
{
throw(new NotImplementedException("Chart type not supported in this version"));
}
XmlElement drawNode = CreateDrawingXml();
ExcelChart chart = GetNewChart(drawNode, ChartType);
chart.Name = Name;
_drawings.Add(chart);
_drawingNames.Add(Name.ToLower(), _drawings.Count - 1);
return chart;
}
开发者ID:huoxudong125,项目名称:EPPlus,代码行数:38,代码来源:ExcelDrawings.cs
示例13: GetNewChart
private ExcelChart GetNewChart(XmlNode drawNode, eChartType chartType)
{
switch(chartType)
{
case eChartType.Pie:
case eChartType.PieExploded:
case eChartType.Pie3D:
case eChartType.PieExploded3D:
return new ExcelPieChart(this, drawNode, chartType);
case eChartType.BarOfPie:
case eChartType.PieOfPie:
return new ExcelOfPieChart(this, drawNode, chartType);
case eChartType.Doughnut:
case eChartType.DoughnutExploded:
return new ExcelDoughnutChart(this, drawNode, chartType);
case eChartType.BarClustered:
case eChartType.BarStacked:
case eChartType.BarStacked100:
case eChartType.BarClustered3D:
case eChartType.BarStacked3D:
case eChartType.BarStacked1003D:
case eChartType.ConeBarClustered:
case eChartType.ConeBarStacked:
case eChartType.ConeBarStacked100:
case eChartType.CylinderBarClustered:
case eChartType.CylinderBarStacked:
case eChartType.CylinderBarStacked100:
case eChartType.PyramidBarClustered:
case eChartType.PyramidBarStacked:
case eChartType.PyramidBarStacked100:
case eChartType.ColumnClustered:
case eChartType.ColumnStacked:
case eChartType.ColumnStacked100:
case eChartType.Column3D:
case eChartType.ColumnClustered3D:
case eChartType.ColumnStacked3D:
case eChartType.ColumnStacked1003D:
case eChartType.ConeCol:
case eChartType.ConeColClustered:
case eChartType.ConeColStacked:
case eChartType.ConeColStacked100:
case eChartType.CylinderCol:
case eChartType.CylinderColClustered:
case eChartType.CylinderColStacked:
case eChartType.CylinderColStacked100:
case eChartType.PyramidCol:
case eChartType.PyramidColClustered:
case eChartType.PyramidColStacked:
case eChartType.PyramidColStacked100:
return new ExcelBarChart(this, drawNode, chartType);
case eChartType.XYScatter:
case eChartType.XYScatterLines:
case eChartType.XYScatterLinesNoMarkers:
case eChartType.XYScatterSmooth:
case eChartType.XYScatterSmoothNoMarkers:
return new ExcelScatterChart(this, drawNode, chartType);
default:
return new ExcelChart(this, drawNode, chartType);
}
}
开发者ID:huoxudong125,项目名称:EPPlus,代码行数:60,代码来源:ExcelDrawings.cs
示例14: ExcelPieChart
internal ExcelPieChart(ExcelDrawings drawings, XmlNode node, eChartType type)
: base(drawings, node, type)
{
//_varyColorsPath = string.Format(_varyColorsPath, GetChartNodeText());
}
开发者ID:huoxudong125,项目名称:EPPlus,代码行数:5,代码来源:ExcelPieChart.cs
示例15: ExcelDoughnutChart
internal ExcelDoughnutChart(ExcelDrawings drawings, XmlNode node, eChartType type, ExcelChart topChart)
: base(drawings, node, type, topChart)
{
//SetPaths();
}
开发者ID:huoxudong125,项目名称:EPPlus,代码行数:5,代码来源:ExcelDoughnutChart.cs
示例16: AddShape
private string AddShape(eChartType type)
{
if (IsTypeShape())
{
return "<c:shape val=\"box\" />";
}
else
{
return "";
}
}
开发者ID:kidaa,项目名称:DissDlcToolkit,代码行数:11,代码来源:ExcelChart.cs
示例17: AddBarDir
private string AddBarDir(eChartType type)
{
if (IsTypeShape())
{
return "<c:barDir val=\"col\" />";
}
else
{
return "";
}
}
开发者ID:kidaa,项目名称:DissDlcToolkit,代码行数:11,代码来源:ExcelChart.cs
示例18: AddSurfaceXml
private string AddSurfaceXml(eChartType type)
{
if (IsTypeSurface())
{
return AddSurfacePart("floor") + AddSurfacePart("sideWall") + AddSurfacePart("backWall");
}
else
{
return "";
}
}
开发者ID:kidaa,项目名称:DissDlcToolkit,代码行数:11,代码来源:ExcelChart.cs
示例19: AddFirstSliceAng
private string AddFirstSliceAng(eChartType type)
{
if (type == eChartType.Doughnut ||
type == eChartType.DoughnutExploded)
{
return "<c:firstSliceAng val=\"0\" />";
}
else
{
return "";
}
}
开发者ID:kidaa,项目名称:DissDlcToolkit,代码行数:12,代码来源:ExcelChart.cs
示例20: CreateNewChart
private void CreateNewChart(ExcelDrawings drawings, eChartType type, ExcelChart topChart)
{
if (topChart == null)
{
XmlElement graphFrame = TopNode.OwnerDocument.CreateElement("graphicFrame", ExcelPackage.schemaSheetDrawings);
graphFrame.SetAttribute("macro", "");
TopNode.AppendChild(graphFrame);
graphFrame.InnerXml = string.Format("<xdr:nvGraphicFramePr><xdr:cNvPr id=\"{0}\" name=\"Chart 1\" /><xdr:cNvGraphicFramePr /></xdr:nvGraphicFramePr><xdr:xfrm><a:off x=\"0\" y=\"0\" /> <a:ext cx=\"0\" cy=\"0\" /></xdr:xfrm><a:graphic><a:graphicData uri=\"http://schemas.openxmlformats.org/drawingml/2006/chart\"><c:chart xmlns:c=\"http://schemas.openxmlformats.org/drawingml/2006/chart\" xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\" r:id=\"rId1\" /> </a:graphicData> </a:graphic>",_id);
TopNode.AppendChild(TopNode.OwnerDocument.CreateElement("clientData", ExcelPackage.schemaSheetDrawings));
var package = drawings.Worksheet._package.Package;
UriChart = GetNewUri(package, "/xl/charts/chart{0}.xml");
ChartXml = new XmlDocument();
ChartXml.PreserveWhitespace = ExcelPackage.preserveWhitespace;
LoadXmlSafe(ChartXml, ChartStartXml(type), Encoding.UTF8);
// save it to the package
Part = package.CreatePart(UriChart, "application/vnd.openxmlformats-officedocument.drawingml.chart+xml", _drawings._package.Compression);
StreamWriter streamChart = new StreamWriter(Part.GetStream(FileMode.Create, FileAccess.Write));
ChartXml.Save(streamChart);
streamChart.Close();
package.Flush();
var chartRelation = drawings.Part.CreateRelationship(UriHelper.GetRelativeUri(drawings.UriDrawing, UriChart), Packaging.TargetMode.Internal, ExcelPackage.schemaRelationships + "/chart");
graphFrame.SelectSingleNode("a:graphic/a:graphicData/c:chart", NameSpaceManager).Attributes["r:id"].Value = chartRelation.Id;
package.Flush();
_chartNode = ChartXml.SelectSingleNode(string.Format("c:chartSpace/c:chart/c:plotArea/{0}", GetChartNodeText()), NameSpaceManager);
}
else
{
ChartXml = topChart.ChartXml;
Part = topChart.Part;
_plotArea = topChart.PlotArea;
UriChart = topChart.UriChart;
_axis = topChart._axis;
XmlNode preNode = _plotArea.ChartTypes[_plotArea.ChartTypes.Count - 1].ChartNode;
_chartNode = ((XmlDocument)ChartXml).CreateElement(GetChartNodeText(), ExcelPackage.schemaChart);
preNode.ParentNode.InsertAfter(_chartNode, preNode);
if (topChart.Axis.Length == 0)
{
AddAxis();
}
string serieXML = GetChartSerieStartXml(type, int.Parse(topChart.Axis[0].Id), int.Parse(topChart.Axis[1].Id), topChart.Axis.Length>2?int.Parse(topChart.Axis[2].Id) : -1);
_chartNode.InnerXml = serieXML;
}
}
开发者ID:kidaa,项目名称:DissDlcToolkit,代码行数:49,代码来源:ExcelChart.cs
注:本文中的eChartType类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论