org.jfree.data.xy.YisSymbolic Java Examples
The following examples show how to use
org.jfree.data.xy.YisSymbolic.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SymbolicXYItemLabelGenerator.java From astor with GNU General Public License v2.0 | 6 votes |
/** * Generates a tool tip text item for a particular item within a series. * * @param data the dataset. * @param series the series number (zero-based index). * @param item the item number (zero-based index). * * @return The tool tip text (possibly <code>null</code>). */ public String generateToolTip(XYDataset data, int series, int item) { String xStr, yStr; if (data instanceof YisSymbolic) { yStr = ((YisSymbolic) data).getYSymbolicValue(series, item); } else { double y = data.getYValue(series, item); yStr = Double.toString(round(y, 2)); } if (data instanceof XisSymbolic) { xStr = ((XisSymbolic) data).getXSymbolicValue(series, item); } else if (data instanceof TimeSeriesCollection) { RegularTimePeriod p = ((TimeSeriesCollection) data).getSeries(series) .getTimePeriod(item); xStr = p.toString(); } else { double x = data.getXValue(series, item); xStr = Double.toString(round(x, 2)); } return "X: " + xStr + ", Y: " + yStr; }
Example #2
Source File: SymbolicXYItemLabelGenerator.java From astor with GNU General Public License v2.0 | 6 votes |
/** * Generates a tool tip text item for a particular item within a series. * * @param data the dataset. * @param series the series number (zero-based index). * @param item the item number (zero-based index). * * @return The tool tip text (possibly <code>null</code>). */ public String generateToolTip(XYDataset data, int series, int item) { String xStr, yStr; if (data instanceof YisSymbolic) { yStr = ((YisSymbolic) data).getYSymbolicValue(series, item); } else { double y = data.getYValue(series, item); yStr = Double.toString(round(y, 2)); } if (data instanceof XisSymbolic) { xStr = ((XisSymbolic) data).getXSymbolicValue(series, item); } else if (data instanceof TimeSeriesCollection) { RegularTimePeriod p = ((TimeSeriesCollection) data).getSeries(series) .getTimePeriod(item); xStr = p.toString(); } else { double x = data.getXValue(series, item); xStr = Double.toString(round(x, 2)); } return "X: " + xStr + ", Y: " + yStr; }
Example #3
Source File: SymbolicXYItemLabelGenerator.java From opensim-gui with Apache License 2.0 | 6 votes |
/** * Generates a tool tip text item for a particular item within a series. * * @param data the dataset. * @param series the series number (zero-based index). * @param item the item number (zero-based index). * * @return The tool tip text (possibly <code>null</code>). */ public String generateToolTip(XYDataset data, int series, int item) { String xStr, yStr; if (data instanceof YisSymbolic) { yStr = ((YisSymbolic) data).getYSymbolicValue(series, item); } else { double y = data.getYValue(series, item); yStr = Double.toString(round(y, 2)); } if (data instanceof XisSymbolic) { xStr = ((XisSymbolic) data).getXSymbolicValue(series, item); } else if (data instanceof TimeSeriesCollection) { RegularTimePeriod p = ((TimeSeriesCollection) data).getSeries(series) .getTimePeriod(item); xStr = p.toString(); } else { double x = data.getXValue(series, item); xStr = Double.toString(round(x, 2)); } return "X: " + xStr + ", Y: " + yStr; }
Example #4
Source File: SymbolicXYItemLabelGenerator.java From openstock with GNU General Public License v3.0 | 5 votes |
/** * Generates a tool tip text item for a particular item within a series. * * @param data the dataset. * @param series the series number (zero-based index). * @param item the item number (zero-based index). * * @return The tool tip text (possibly <code>null</code>). */ @Override public String generateToolTip(XYDataset data, int series, int item) { String xStr, yStr; if (data instanceof YisSymbolic) { yStr = ((YisSymbolic) data).getYSymbolicValue(series, item); } else { double y = data.getYValue(series, item); yStr = Double.toString(round(y, 2)); } if (data instanceof XisSymbolic) { xStr = ((XisSymbolic) data).getXSymbolicValue(series, item); } else if (data instanceof TimeSeriesCollection) { RegularTimePeriod p = ((TimeSeriesCollection) data).getSeries(series) .getTimePeriod(item); xStr = p.toString(); } else { double x = data.getXValue(series, item); xStr = Double.toString(round(x, 2)); } return "X: " + xStr + ", Y: " + yStr; }
Example #5
Source File: SymbolicXYItemLabelGenerator.java From ccu-historian with GNU General Public License v3.0 | 5 votes |
/** * Generates a tool tip text item for a particular item within a series. * * @param data the dataset. * @param series the series number (zero-based index). * @param item the item number (zero-based index). * * @return The tool tip text (possibly <code>null</code>). */ @Override public String generateToolTip(XYDataset data, int series, int item) { String xStr, yStr; if (data instanceof YisSymbolic) { yStr = ((YisSymbolic) data).getYSymbolicValue(series, item); } else { double y = data.getYValue(series, item); yStr = Double.toString(round(y, 2)); } if (data instanceof XisSymbolic) { xStr = ((XisSymbolic) data).getXSymbolicValue(series, item); } else if (data instanceof TimeSeriesCollection) { RegularTimePeriod p = ((TimeSeriesCollection) data).getSeries(series) .getTimePeriod(item); xStr = p.toString(); } else { double x = data.getXValue(series, item); xStr = Double.toString(round(x, 2)); } return "X: " + xStr + ", Y: " + yStr; }
Example #6
Source File: SymbolicXYItemLabelGenerator.java From SIMVA-SoS with Apache License 2.0 | 5 votes |
/** * Generates a tool tip text item for a particular item within a series. * * @param data the dataset. * @param series the series number (zero-based index). * @param item the item number (zero-based index). * * @return The tool tip text (possibly <code>null</code>). */ @Override public String generateToolTip(XYDataset data, int series, int item) { String xStr, yStr; if (data instanceof YisSymbolic) { yStr = ((YisSymbolic) data).getYSymbolicValue(series, item); } else { double y = data.getYValue(series, item); yStr = Double.toString(round(y, 2)); } if (data instanceof XisSymbolic) { xStr = ((XisSymbolic) data).getXSymbolicValue(series, item); } else if (data instanceof TimeSeriesCollection) { RegularTimePeriod p = ((TimeSeriesCollection) data).getSeries(series) .getTimePeriod(item); xStr = p.toString(); } else { double x = data.getXValue(series, item); xStr = Double.toString(round(x, 2)); } return "X: " + xStr + ", Y: " + yStr; }
Example #7
Source File: SymbolicXYItemLabelGenerator.java From ECG-Viewer with GNU General Public License v2.0 | 5 votes |
/** * Generates a tool tip text item for a particular item within a series. * * @param data the dataset. * @param series the series number (zero-based index). * @param item the item number (zero-based index). * * @return The tool tip text (possibly <code>null</code>). */ @Override public String generateToolTip(XYDataset data, int series, int item) { String xStr, yStr; if (data instanceof YisSymbolic) { yStr = ((YisSymbolic) data).getYSymbolicValue(series, item); } else { double y = data.getYValue(series, item); yStr = Double.toString(round(y, 2)); } if (data instanceof XisSymbolic) { xStr = ((XisSymbolic) data).getXSymbolicValue(series, item); } else if (data instanceof TimeSeriesCollection) { RegularTimePeriod p = ((TimeSeriesCollection) data).getSeries(series) .getTimePeriod(item); xStr = p.toString(); } else { double x = data.getXValue(series, item); xStr = Double.toString(round(x, 2)); } return "X: " + xStr + ", Y: " + yStr; }
Example #8
Source File: SymbolicXYItemLabelGenerator.java From buffer_bci with GNU General Public License v3.0 | 5 votes |
/** * Generates a tool tip text item for a particular item within a series. * * @param data the dataset. * @param series the series number (zero-based index). * @param item the item number (zero-based index). * * @return The tool tip text (possibly <code>null</code>). */ @Override public String generateToolTip(XYDataset data, int series, int item) { String xStr, yStr; if (data instanceof YisSymbolic) { yStr = ((YisSymbolic) data).getYSymbolicValue(series, item); } else { double y = data.getYValue(series, item); yStr = Double.toString(round(y, 2)); } if (data instanceof XisSymbolic) { xStr = ((XisSymbolic) data).getXSymbolicValue(series, item); } else if (data instanceof TimeSeriesCollection) { RegularTimePeriod p = ((TimeSeriesCollection) data).getSeries(series) .getTimePeriod(item); xStr = p.toString(); } else { double x = data.getXValue(series, item); xStr = Double.toString(round(x, 2)); } return "X: " + xStr + ", Y: " + yStr; }
Example #9
Source File: SymbolicXYItemLabelGenerator.java From buffer_bci with GNU General Public License v3.0 | 5 votes |
/** * Generates a tool tip text item for a particular item within a series. * * @param data the dataset. * @param series the series number (zero-based index). * @param item the item number (zero-based index). * * @return The tool tip text (possibly <code>null</code>). */ @Override public String generateToolTip(XYDataset data, int series, int item) { String xStr, yStr; if (data instanceof YisSymbolic) { yStr = ((YisSymbolic) data).getYSymbolicValue(series, item); } else { double y = data.getYValue(series, item); yStr = Double.toString(round(y, 2)); } if (data instanceof XisSymbolic) { xStr = ((XisSymbolic) data).getXSymbolicValue(series, item); } else if (data instanceof TimeSeriesCollection) { RegularTimePeriod p = ((TimeSeriesCollection) data).getSeries(series) .getTimePeriod(item); xStr = p.toString(); } else { double x = data.getXValue(series, item); xStr = Double.toString(round(x, 2)); } return "X: " + xStr + ", Y: " + yStr; }