| ||
Introducing SharpPlot Your First Chart Recent Updates Sample Charts Tutorials General Tutorials Chart Tutorials SharpPlot Class Properties Methods Structures Enumerations Style examples Glossaries Active Charts VectorMath Class Get SharpPlot Download SharpPlot Buying SharpPlot SharpPlot Support Upgrading from GraPL Release notes |
Reference > DBUtil Class > GetStrings Method GetStrings MethodGet one or more String columns from a Selection, with optional missing value filler. By default, the empty string is used to replace any DBNull values in the chosen column. Examplesp.Reset(240,160); sp.SetMargins(24,18,24,4); filler = (int)sp.MissingValue; mytable = new DataTable(); // Get some real data here!; myselection = mytable.Select("symb='BP'"); string[] xlabs = DbUtil.GetStrings(myselection,"Year"); sp.SetXLabels(xlabs); sp.DrawBarChart(BPAnnualEarnings); Overloads
DescriptionRetrieves data from a data table selection in a form suitable for creating axis labels (single or multiple lines). The array of arrays of strings is ideal for use with spanned X-labels, for example: string[][] labs = DbUtil.GetStrings(myselection,"Months","Quarters","Years"); If only one column is requested, the data is returned as a simple array of labels. It a numeric column is requested, it is returned as strings by running its default ToString method. See also ...Spanned labels in tables headers and X-labels | Working with Databases |