| ||
SharpPlot Tutorials General Tutorials Chart Samples Style Examples SharpLeaf Tutorials Document Layout Tutorials Text Flow Tutorials Table Tutorials Visual Glossaries SharpPlot Class SharpPlot Properties SharpPlot Structures SharpPlot Enumerations PageMap Class SharpLeaf Reference SharpLeaf Class SharpLeaf Properties SharpLeaf Methods Table Class Table Properties Table Methods SharpLeaf Structures FontType Structure ParagraphStyle Structure BoxStyle Structure SharpLeaf Enumerations DocumentLayout Classes DocumentLayout Class PageLayout Class PageElement Abstract Class Frame : PageElement Class TextBlock : PageElement Class ImageBlock : PageElement Class Box : PageElement Class Rule : PageElement Class Common Reference Document Class VectorMath Class DbUtil Class Download Release Notes Licensing |
SharpPlot Reference > SharpPlot Methods > DrawTable Method SharpPlot.DrawTable MethodConstruct table from a set of columns (or rows) of data. Examplesp = new SharpPlot(180,120); sp.SetMargins(0,0,0,0); sp.DrawFrame(); tabledata = new int[][]{new int[]{18,27,31,1},new int[]{12,9,7,3}}; // Two Columns sp.SetYLabels(new string[]{"North","South","East","West"}); sp.SetXLabels(new string[]{"Pots","Pans"}); sp.YCaption = "Summary"; sp.TableStyle = TableStyles.Boxed|TableStyles.GridLines|TableStyles.FitWidth; sp.SetValueFont("ARB",10); sp.SetLabelFont("ARB",11); sp.SetCaptionFont("ARB",11); sp.DrawTable(tabledata); The short tutorial shows a few of the possibilities and some sample code. Overloads
DescriptionTables are often used very effectively in combination with other charts to add summarized information. For example a plot of a stock price might include a small table of the low and high values for the past year, and maybe a comparison with the industry sector. Tables in SharpPlot are often used in conjunction with Grouping and Splitting to create hierarchical summaries from raw database information. Spanned row-headers are often used to make the effect of the categorisation clear to the reader. By default, arrays of arrays are taken as columns of items, but if it is more convenient this can be changed around by setting the DataStyle to Rows. If the data is already summarised and formatted, you can pass arrays of strings rather than numeric values here. Note that the cell font is controlled by SharpPlot.SetValueFont. Stand-alone TablesIf you call See also ...Tabulating data | SharpPlot Members | SharpPlot.DataStyle Property | SharpPlot.TableStyle Property | SharpPlot.SetTablePosition Method |