Reputation: 3854
This question will most probably get downvoted, but I'll ask anyways since I can't find an answer elsewhere. I'm working on a data processing application which processes a large amount of data and writes them to an excel file using EPPlus
. I now have to create some graphs with the data in the excel programmatically through EPPlus
. Since I'm not really an expert on EPPlus, I'm looking for some online resource or documentation that could help me with charts. I've searched online but I couldn't find a single place, where they list all possible chart types that could be made with EPPLus
and how. If anyone knows of some online resource where they all list everything related to charts via EPPlus
, it would really help me. Any help is appreciated!
Upvotes: 2
Views: 1708
Reputation: 14250
Seems like a perfectly reasonable question. I agree, documentation is fairly light - but hey its free so I am happy with whatever they can give us :).
By far, the most helpful thing I have done with Epplus is downloading the source code and reverse engineering it. When I try to figure out a particular chart type I look at this:
http://epplus.codeplex.com/SourceControl/latest#EPPlus/Drawing/Chart/ExcelChart.cs
Particularly, look at the enum eChartType
:
public enum eChartType
{
Area3D=-4098,
AreaStacked3D=78,
AreaStacked1003D=79,
BarClustered3D= 60,
BarStacked3D=61,
BarStacked1003D=62,
Column3D=-4100,
ColumnClustered3D=54,
ColumnStacked3D=55,
ColumnStacked1003D=56,
Line3D=-4101,
Pie3D=-4102,
PieExploded3D=70,
Area=1,
AreaStacked=76,
AreaStacked100=77,
BarClustered=57,
BarOfPie=71,
BarStacked=58,
BarStacked100=59,
Bubble=15,
Bubble3DEffect=87,
ColumnClustered=51,
ColumnStacked=52,
ColumnStacked100=53,
ConeBarClustered=102,
ConeBarStacked=103,
ConeBarStacked100=104,
ConeCol=105,
ConeColClustered=99,
ConeColStacked=100,
ConeColStacked100=101,
CylinderBarClustered=95,
CylinderBarStacked=96,
CylinderBarStacked100=97,
CylinderCol=98,
CylinderColClustered=92,
CylinderColStacked=93,
CylinderColStacked100=94,
Doughnut=-4120,
DoughnutExploded=80,
Line=4,
LineMarkers=65,
LineMarkersStacked=66,
LineMarkersStacked100=67,
LineStacked=63,
LineStacked100=64,
Pie=5,
PieExploded=69,
PieOfPie=68,
PyramidBarClustered=109,
PyramidBarStacked=110,
PyramidBarStacked100=111,
PyramidCol=112,
PyramidColClustered=106,
PyramidColStacked=107,
PyramidColStacked100=108,
Radar=-4151,
RadarFilled=82,
RadarMarkers=81,
StockHLC=88,
StockOHLC=89,
StockVHLC=90,
StockVOHLC=91,
Surface=83,
SurfaceTopView=85,
SurfaceTopViewWireframe=86,
SurfaceWireframe=84,
XYScatter=-4169,
XYScatterLines=74,
XYScatterLinesNoMarkers=75,
XYScatterSmooth=72,
XYScatterSmoothNoMarkers=73
}
As for "how", this the tougher part. But fortunately they all follow a consistent pattern so usually if can figure it out fairly quickly with a little trial and error. Usually starts with something like:
var chart1 = wsContent.Drawings.AddChart("Chart1", eChartType.XYScatterLines);
Upvotes: 4
Reputation: 10899
The documentation is indeed not really complete at that point. I would suggest look at the small list at: http://epplus.codeplex.com/releases/view/118053 ("Chart Types). Also, the demo buids may help and lastly, their sourcecode is online. Start searching for a known chartttype and take a look at what other values are allowed.
Upvotes: 0