本文整理汇总了C#中eChartType类的典型用法代码示例。如果您正苦于以下问题:C# eChartType类的具体用法?C# eChartType怎么用?C# eChartType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
eChartType类属于命名空间,在下文中一共展示了eChartType类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
示例2: ExcelBarChart
internal ExcelBarChart(ExcelDrawings drawings, XmlNode node, eChartType type)
: base(drawings, node, type)
{
SetChartNodeText();
SetTypeProperties(drawings, type);
}
示例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();
}
示例4: AddRadarType
private string AddRadarType(eChartType type)
{
if (type == eChartType.Radar ||
type == eChartType.RadarFilled||
type == eChartType.RadarMarkers)
{
return "<c:radarStyle val=\"\" />";
}
else
{
return "";
}
}
示例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 "";
}
}
示例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: 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();
}
示例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();
}
示例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];
}
}
}
示例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;
}
示例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();
}
示例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;
}
示例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);
}
}
示例14: ExcelPieChart
internal ExcelPieChart(ExcelDrawings drawings, XmlNode node, eChartType type)
: base(drawings, node, type)
{
//_varyColorsPath = string.Format(_varyColorsPath, GetChartNodeText());
}
示例15: ExcelDoughnutChart
internal ExcelDoughnutChart(ExcelDrawings drawings, XmlNode node, eChartType type, ExcelChart topChart)
: base(drawings, node, type, topChart)
{
//SetPaths();
}