timeseries.html

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

HTML
1,370 行
字号
<HR><A NAME="setRangeDescription(java.lang.String)"><!-- --></A><H3>setRangeDescription</H3><PRE>public void <B>setRangeDescription</B>(java.lang.String&nbsp;description)</PRE><DL><DD>Sets the range description. <P> Registered listeners are notified of the change.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>description</CODE> - the new description.</DL></DD></DL><HR><A NAME="getItemCount()"><!-- --></A><H3>getItemCount</H3><PRE>public int <B>getItemCount</B>()</PRE><DL><DD>Returns the number of items in the series.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the item count.</DL></DD></DL><HR><A NAME="getItems()"><!-- --></A><H3>getItems</H3><PRE>public java.util.List <B>getItems</B>()</PRE><DL><DD>Returns the list of data items for the series (the list contains <A HREF="../../../../org/jfree/data/time/TimeSeriesDataItem.html"><CODE>TimeSeriesDataItem</CODE></A> objects and is unmodifiable).<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>The list of data items.</DL></DD></DL><HR><A NAME="getMaximumItemCount()"><!-- --></A><H3>getMaximumItemCount</H3><PRE>public int <B>getMaximumItemCount</B>()</PRE><DL><DD>Returns the maximum number of items that will be retained in the series. <P> The default value is <code>Integer.MAX_VALUE</code>).<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the maximum item count.</DL></DD></DL><HR><A NAME="setMaximumItemCount(int)"><!-- --></A><H3>setMaximumItemCount</H3><PRE>public void <B>setMaximumItemCount</B>(int&nbsp;maximum)</PRE><DL><DD>Sets the maximum number of items that will be retained in the series. <P> If you add a new item to the series such that the number of items will exceed the maximum item count, then the FIRST element in the series is automatically removed, ensuring that the maximum item count is not exceeded.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>maximum</CODE> - the maximum.</DL></DD></DL><HR><A NAME="getHistoryCount()"><!-- --></A><H3>getHistoryCount</H3><PRE>public int <B>getHistoryCount</B>()</PRE><DL><DD>Returns the history count for the series.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the history count.</DL></DD></DL><HR><A NAME="setHistoryCount(int)"><!-- --></A><H3>setHistoryCount</H3><PRE>public void <B>setHistoryCount</B>(int&nbsp;periods)</PRE><DL><DD>Sets the number of time units in the 'history' for the series. <P> This provides one mechanism for automatically dropping old data from the time series. For example, if a series contains daily data, you might set the history count to 30. Then, when you add a new data item, all data items more than 30 days older than the latest value are automatically dropped from the series.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>periods</CODE> - the number of time periods.</DL></DD></DL><HR><A NAME="getTimePeriodClass()"><!-- --></A><H3>getTimePeriodClass</H3><PRE>public java.lang.Class <B>getTimePeriodClass</B>()</PRE><DL><DD>Returns the time period class for this series. <p> Only one time period class can be used within a single series (enforced). If you add a data item with a Year for the time period, then all subsequent data items must also have a Year for the time period.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the time period class for this series (null if the series is empty).</DL></DD></DL><HR><A NAME="getDataPair(int)"><!-- --></A><H3>getDataPair</H3><PRE>public <A HREF="../../../../org/jfree/data/time/TimeSeriesDataItem.html">TimeSeriesDataItem</A> <B>getDataPair</B>(int&nbsp;index)</PRE><DL><DD><B>Deprecated.</B>&nbsp;<I>Use getDataItem(int).</I><P><DD>Returns one data pair for the series.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>index</CODE> - the item index (zero-based).<DT><B>Returns:</B><DD>one data pair for the series.</DL></DD></DL><HR><A NAME="getDataItem(int)"><!-- --></A><H3>getDataItem</H3><PRE>public <A HREF="../../../../org/jfree/data/time/TimeSeriesDataItem.html">TimeSeriesDataItem</A> <B>getDataItem</B>(int&nbsp;index)</PRE><DL><DD>Returns one data item for the series.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>index</CODE> - the item index (zero-based).<DT><B>Returns:</B><DD>One data item for the series.</DL></DD></DL><HR><A NAME="getDataPair(org.jfree.data.time.RegularTimePeriod)"><!-- --></A><H3>getDataPair</H3><PRE>public <A HREF="../../../../org/jfree/data/time/TimeSeriesDataItem.html">TimeSeriesDataItem</A> <B>getDataPair</B>(<A HREF="../../../../org/jfree/data/time/RegularTimePeriod.html">RegularTimePeriod</A>&nbsp;period)</PRE><DL><DD><B>Deprecated.</B>&nbsp;<I>Use getDataItem(RegularTimePeriod).</I><P><DD>Returns the data pair for a specific period.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>period</CODE> - the period of interest.<DT><B>Returns:</B><DD>the data pair matching the specified period (or null if there is no match).</DL></DD></DL><HR><A NAME="getDataItem(org.jfree.data.time.RegularTimePeriod)"><!-- --></A><H3>getDataItem</H3><PRE>public <A HREF="../../../../org/jfree/data/time/TimeSeriesDataItem.html">TimeSeriesDataItem</A> <B>getDataItem</B>(<A HREF="../../../../org/jfree/data/time/RegularTimePeriod.html">RegularTimePeriod</A>&nbsp;period)</PRE><DL><DD>Returns the data item for a specific period.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>period</CODE> - the period of interest (<code>null</code> not allowed).<DT><B>Returns:</B><DD>The data item matching the specified period (or <code>null</code> if there is         no match).</DL></DD></DL><HR><A NAME="getTimePeriod(int)"><!-- --></A><H3>getTimePeriod</H3><PRE>public <A HREF="../../../../org/jfree/data/time/RegularTimePeriod.html">RegularTimePeriod</A> <B>getTimePeriod</B>(int&nbsp;index)</PRE><DL><DD>Returns the time period at the specified index.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>index</CODE> - the index of the data pair.<DT><B>Returns:</B><DD>the time period at the specified index.</DL></DD></DL><HR><A NAME="getNextTimePeriod()"><!-- --></A><H3>getNextTimePeriod</H3><PRE>public <A HREF="../../../../org/jfree/data/time/RegularTimePeriod.html">RegularTimePeriod</A> <B>getNextTimePeriod</B>()</PRE><DL><DD>Returns a time period that would be the next in sequence on the end of the time series.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the next time period.</DL></DD></DL><HR><A NAME="getTimePeriods()"><!-- --></A><H3>getTimePeriods</H3><PRE>public java.util.Collection <B>getTimePeriods</B>()</PRE><DL><DD>Returns a collection of all the time periods in the time series.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>a collection of all the time periods.</DL></DD></DL><HR><A NAME="getTimePeriodsUniqueToOtherSeries(org.jfree.data.time.TimeSeries)"><!-- --></A><H3>getTimePeriodsUniqueToOtherSeries</H3><PRE>public java.util.Collection <B>getTimePeriodsUniqueToOtherSeries</B>(<A HREF="../../../../org/jfree/data/time/TimeSeries.html">TimeSeries</A>&nbsp;series)</PRE><DL><DD>Returns a collection of time periods in the specified series, but not in this series, and therefore unique to the specified series.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>series</CODE> - the series to check against this one.<DT><B>Returns:</B><DD>the series minus 'this'.</DL></DD></DL><HR><A NAME="getIndex(org.jfree.data.time.RegularTimePeriod)"><!-- --></A><H3>getIndex</H3><PRE>public int <B>getIndex</B>(<A HREF="../../../../org/jfree/data/time/RegularTimePeriod.html">RegularTimePeriod</A>&nbsp;period)</PRE><DL><DD>Returns the index for the item (if any) that corresponds to a time period.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>period</CODE> - the time period (<code>null</code> not permitted).<DT><B>Returns:</B><DD>The index.</DL></DD></DL><HR><A NAME="getValue(int)"><!-- --></A><H3>getValue</H3><PRE>public java.lang.Number <B>getValue</B>(int&nbsp;index)</PRE><DL><DD>Returns the value at the specified index.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>index</CODE> - index of a value.<DT><B>Returns:</B><DD>the value at the specified index.</DL></DD></DL><HR><A NAME="getValue(org.jfree.data.time.RegularTimePeriod)"><!-- --></A><H3>getValue</H3><PRE>public java.lang.Number <B>getValue</B>(<A HREF="../../../../org/jfree/data/time/RegularTimePeriod.html">RegularTimePeriod</A>&nbsp;period)</PRE><DL><DD>Returns the value for a time period.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>period</CODE> - time period to lookup.<DT><B>Returns:</B><DD>the value or <code>null</code> if the time period is not in the series.</DL>

⌨️ 快捷键说明

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