datasetutilities.html

来自「JFreeChart的帮助文档」· HTML 代码 · 共 963 行 · 第 1/3 页

HTML
963
字号
 assuming that the series are stacked.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/jfree/data/DatasetUtilities.html#isEmptyOrNull(org.jfree.data.CategoryDataset)">isEmptyOrNull</A></B>(<A HREF="../../../org/jfree/data/CategoryDataset.html">CategoryDataset</A>&nbsp;data)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns <code>true</code> if the dataset is empty (or <code>null</code>), and <code>false</code> otherwise.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/jfree/data/DatasetUtilities.html#isEmptyOrNull(org.jfree.data.PieDataset)">isEmptyOrNull</A></B>(<A HREF="../../../org/jfree/data/PieDataset.html">PieDataset</A>&nbsp;dataset)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns <code>true</code> if the dataset is empty (or <code>null</code>), and <code>false</code> otherwise.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/jfree/data/DatasetUtilities.html#isEmptyOrNull(org.jfree.data.XYDataset)">isEmptyOrNull</A></B>(<A HREF="../../../org/jfree/data/XYDataset.html">XYDataset</A>&nbsp;data)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns <code>true</code> if the dataset is empty (or <code>null</code>), and <code>false</code> otherwise.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="../../../org/jfree/data/PieDataset.html">PieDataset</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/jfree/data/DatasetUtilities.html#limitPieDataset(org.jfree.data.PieDataset, double)">limitPieDataset</A></B>(<A HREF="../../../org/jfree/data/PieDataset.html">PieDataset</A>&nbsp;data,                double&nbsp;percentThreshold)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates an "Other" slice for percentages below the percent threshold.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="../../../org/jfree/data/PieDataset.html">PieDataset</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/jfree/data/DatasetUtilities.html#limitPieDataset(org.jfree.data.PieDataset, double, int)">limitPieDataset</A></B>(<A HREF="../../../org/jfree/data/PieDataset.html">PieDataset</A>&nbsp;data,                double&nbsp;percentThreshold,                int&nbsp;sliceThreshold)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create an "Other" slice for percentages below the percent threshold providing there are more slices below the percent threshold than specified in the slice threshold.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="../../../org/jfree/data/PieDataset.html">PieDataset</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/jfree/data/DatasetUtilities.html#limitPieDataset(org.jfree.data.PieDataset, double, int, java.lang.String)">limitPieDataset</A></B>(<A HREF="../../../org/jfree/data/PieDataset.html">PieDataset</A>&nbsp;data,                double&nbsp;percentThreshold,                int&nbsp;sliceThreshold,                java.lang.String&nbsp;label)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create an Other slice with a given label for percentages below the percent threshold providing there are more slices below the percent threshold than specified in the slice threshold.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="../../../org/jfree/data/XYDataset.html">XYDataset</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/jfree/data/DatasetUtilities.html#sampleFunction2D(org.jfree.data.Function2D, double, double, int, java.lang.String)">sampleFunction2D</A></B>(<A HREF="../../../org/jfree/data/Function2D.html">Function2D</A>&nbsp;f,                 double&nbsp;start,                 double&nbsp;end,                 int&nbsp;samples,                 java.lang.String&nbsp;seriesName)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates an <A HREF="../../../org/jfree/data/XYDataset.html"><CODE>XYDataset</CODE></A> by sampling the specified function over a fixed range.</TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.lang.Object</B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD></TR></TABLE>&nbsp;<P><!-- ============ FIELD DETAIL =========== --><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="DatasetUtilities()"><!-- --></A><H3>DatasetUtilities</H3><PRE>protected <B>DatasetUtilities</B>()</PRE><DL><DD>To prevent instantiation.<P></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="createNumberArray(double[])"><!-- --></A><H3>createNumberArray</H3><PRE>public static java.lang.Number[] <B>createNumberArray</B>(double[]&nbsp;data)</PRE><DL><DD>Constructs an array of <code>Number</code> objects from an array of <code>double</code> primitives.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>data</CODE> - the data.<DT><B>Returns:</B><DD>an array of <code>Double</code>.</DL></DD></DL><HR><A NAME="createNumberArray2D(double[][])"><!-- --></A><H3>createNumberArray2D</H3><PRE>public static java.lang.Number[][] <B>createNumberArray2D</B>(double[][]&nbsp;data)</PRE><DL><DD>Constructs an array of arrays of <code>Number</code> objects from a corresponding structure containing <code>double</code> primitives.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>data</CODE> - the data.<DT><B>Returns:</B><DD>an array of <code>Double</code>.</DL></DD></DL><HR><A NAME="getDomainExtent(org.jfree.data.Dataset)"><!-- --></A><H3>getDomainExtent</H3><PRE>public static <A HREF="../../../org/jfree/data/Range.html">Range</A> <B>getDomainExtent</B>(<A HREF="../../../org/jfree/data/Dataset.html">Dataset</A>&nbsp;data)</PRE><DL><DD>Returns the range of values in the domain for the dataset. <P> If the supplied dataset is <code>null</code>, the range returned is <code>null</code>.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>data</CODE> - the dataset (<code>null</code> permitted).<DT><B>Returns:</B><DD>The range of values (possibly <code>null</code>).</DL></DD></DL><HR><A NAME="getRangeExtent(org.jfree.data.Dataset)"><!-- --></A><H3>getRangeExtent</H3><PRE>public static <A HREF="../../../org/jfree/data/Range.html">Range</A> <B>getRangeExtent</B>(<A HREF="../../../org/jfree/data/Dataset.html">Dataset</A>&nbsp;data)</PRE><DL><DD>Returns the range of values in the range for the dataset.  This method is the partner for the getDomainExtent method.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>data</CODE> - the dataset.<DT><B>Returns:</B><DD>the range of values in the range for the dataset.</DL></DD></DL><HR><A NAME="getMinimumDomainValue(org.jfree.data.Dataset)"><!-- --></A><H3>getMinimumDomainValue</H3><PRE>public static java.lang.Number <B>getMinimumDomainValue</B>(<A HREF="../../../org/jfree/data/Dataset.html">Dataset</A>&nbsp;data)</PRE><DL><DD>Returns the minimum domain value for the specified dataset. <P> This is easy if the dataset implements the DomainInfo interface (a good idea if there is an efficient way to determine the minimum value). Otherwise, it involves iterating over the entire data-set. <p> Returns null if all the data values in the dataset are null.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>data</CODE> - the dataset.<DT><B>Returns:</B><DD>the minimum domain value in the dataset (or null).</DL></DD></DL><HR><A NAME="getMaximumDomainValue(org.jfree.data.Dataset)"><!-- --></A><H3>getMaximumDomainValue</H3><PRE>public static java.lang.Number <B>getMaximumDomainValue</B>(<A HREF="../../../org/jfree/data/Dataset.html">Dataset</A>&nbsp;data)</PRE><DL><DD>Returns the maximum domain value for the specified dataset. <P> This is easy if the dataset implements the DomainInfo interface (a good idea if there is an efficient way to determine the maximum value). Otherwise, it involves iterating over the entire data-set. <p> Returns null if all the data values in the dataset are null.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>data</CODE> - the dataset.<DT><B>Returns:</B><DD>the maximum domain value in the dataset (or null).</DL></DD></DL><HR><A NAME="getMinimumRangeValue(org.jfree.data.Dataset)"><!-- --></A><H3>getMinimumRangeValue</H3><PRE>public static java.lang.Number <B>getMinimumRangeValue</B>(<A HREF="../../../org/jfree/data/Dataset.html">Dataset</A>&nbsp;data)</PRE><DL><DD>Returns the minimum range value for the specified dataset. <P> This is easy if the dataset implements the RangeInfo interface (a good idea if there is an efficient way to determine the minimum value). Otherwise, it involves iterating over the entire data-set. <p> Returns null if all the data values in the dataset are null.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>data</CODE> - the dataset.<DT><B>Returns:</B><DD>the minimum range value in the dataset (or null).</DL></DD></DL><HR><A NAME="getMaximumRangeValue(org.jfree.data.Dataset)"><!-- --></A><H3>getMaximumRangeValue</H3><PRE>public static java.lang.Number <B>getMaximumRangeValue</B>(<A HREF="../../../org/jfree/data/Dataset.html">Dataset</A>&nbsp;data)</PRE><DL><DD>Returns the maximum range value for the specified dataset. <P> This is easy if the dataset implements the RangeInfo interface (a good idea if there is an efficient way to determine the maximum value). Otherwise, it involves iterating over the entire data-set. <p> Returns null if all the data values are null.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>data</CODE> - the dataset.<DT><B>Returns:</B><DD>the maximum range value in the dataset (or null).</DL></DD></DL><HR><A NAME="createPieDatasetForRow(org.jfree.data.CategoryDataset, java.lang.Comparable)"><!-- --></A><H3>createPieDatasetForRow</H3><PRE>public static <A HREF="../../../org/jfree/data/PieDataset.html">PieDataset</A> <B>createPieDatasetForRow</B>(<A HREF="../../../org/jfree/data/CategoryDataset.html">CategoryDataset</A>&nbsp;data,                                                java.lang.Comparable&nbsp;rowKey)</PRE><DL><DD>Creates a pie dataset from a table dataset by taking all the values for a single row.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>data</CODE> - the data.<DD><CODE>rowKey</CODE> - the row key.<DT><B>Returns:</B><DD>a pie dataset.</DL></DD></DL><HR><A NAME="createPieDatasetForRow(org.jfree.data.CategoryDataset, int)"><!-- --></A><H3>createPieDatasetForRow</H3><PRE>public static <A HREF="../../../org/jfree/data/PieDataset.html">PieDataset</A> <B>createPieDatasetForRow</B>(<A HREF="../../../org/jfree/data/CategoryDataset.html">CategoryDataset</A>&nbsp;data,                                                int&nbsp;row)</PRE><DL><DD>Creates a pie dataset from a table dataset by taking all the values for a single row.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>data</CODE> - the data.<DD><CODE>row</CODE> - the row (zero-based index).<DT><B>Returns:</B><DD>a pie dataset.</DL></DD></DL><HR><A NAME="createPieDatasetForColumn(org.jfree.data.CategoryDataset, java.lang.Comparable)"><!-- --></A><H3>createPieDatasetForColumn</H3><PRE>public static <A HREF="../../../org/jfree/data/PieDataset.html">PieDataset</A> <B>createPieDatasetForColumn</B>(<A HREF="../../../org/jfree/data/CategoryDataset.html">CategoryDataset</A>&nbsp;data,                                                   java.lang.Comparable&nbsp;columnKey)</PRE><DL><DD>Creates a pie dataset from a table dataset by taking all the values for a single column.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>data</CODE> - the data.<DD><CODE>columnKey</CODE> - the column key.<DT><B>Returns:</B><DD>a pie dataset.</DL></DD></DL><HR><A NAME="createPieDatasetForColumn(org.jfree.data.CategoryDataset, int)"><!-- --></A><H3>createPieDatasetForColumn</H3><PRE>public static <A HREF="../../../org/jfree/data/PieDataset.html">PieDataset</A> <B>createPieDatasetForColumn</B>(<A HREF="../../../org/jfree/data/CategoryDataset.html">CategoryDataset</A>&nbsp;data,                                                   int&nbsp;column)</PRE><DL><DD>Creates a pie dataset from a table dataset by taking all the values for a single column.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>data</CODE> - the data.<DD><CODE>column</CODE> - the column (zero-based index).<DT><B>Returns:</B><DD>a pie dataset.</DL></DD>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?