class GXyModel<X extends Comparable,S extends Comparable> extends Object implements XyModel<X,S>
This is open source software released under the Apache 2.0 License
| Modifier and Type | Field and Description |
|---|---|
private Map<Integer,GXyDataset<X,S>> |
datasetMap |
private GXyPlot<X> |
plot |
private Map<Integer,Integer> |
rangeAxisMap |
private GXyDataset<X,S> |
unified |
| Modifier and Type | Method and Description |
|---|---|
int |
add(com.zavtech.morpheus.frame.DataFrame<?,S> frame,
S domainKey)
Adds a data frame using a specific column in the frame to define the domain axis
|
int |
add(com.zavtech.morpheus.frame.DataFrame<X,S> frame)
Adds a data frame using the row keys to define the domain
|
XyDataset<X,S> |
at(int index)
Returns the chart model holding chart data at the specified index
|
private GXyDataset<X,S> |
combine(Collection<GXyDataset<X,S>> datasets)
Combines multiple chart datasets into a single dataset
|
Class<X> |
domainType()
Returns the domain type for this model
|
(package private) int |
getDatasetIndex(S seriesKey)
Returns the first dataset index that contains the series
|
(package private) int |
getRangeAxisIndex(S seriesKey)
Returns the range axis index for the series key
|
(package private) GXyDataset<X,S> |
getUnifiedDataset()
Returns a unified XyDataset based on all the datasets in this model
|
void |
remove(int index)
Removes the data at the specified index
|
void |
removeAll()
Clears all data from the plot
|
private void |
reset()
Resets the unified to force a rebuild next time requested
|
void |
setRangeAxis(int dataset,
int axis)
Sets the range axis to use for the dataset specified
|
XyDataset<X,S> |
update(int index,
com.zavtech.morpheus.frame.DataFrame<?,S> frame,
S domainKey)
Applies an updated DataFrame to the model at the specified index
|
XyDataset<X,S> |
update(int index,
com.zavtech.morpheus.frame.DataFrame<X,S> frame)
Applies an updated DataFrame to the model at the specified index
|
private GXyPlot<X extends Comparable> plot
private GXyDataset<X extends Comparable,S extends Comparable> unified
private Map<Integer,GXyDataset<X extends Comparable,S extends Comparable>> datasetMap
private void reset()
int getDatasetIndex(S seriesKey)
seriesKey - the series keyint getRangeAxisIndex(S seriesKey)
seriesKey - the series keyGXyDataset<X,S> getUnifiedDataset()
private GXyDataset<X,S> combine(Collection<GXyDataset<X,S>> datasets)
datasets - the datasets to combinepublic void setRangeAxis(int dataset,
int axis)
XyModelsetRangeAxis in interface XyModel<X extends Comparable,S extends Comparable>dataset - the dataset indexaxis - tne range axis index, 0 for primary, 1 for secondary etc...public Class<X> domainType()
XyModeldomainType in interface XyModel<X extends Comparable,S extends Comparable>public XyDataset<X,S> at(int index)
XyModelat in interface XyModel<X extends Comparable,S extends Comparable>index - the index for requested datapublic int add(com.zavtech.morpheus.frame.DataFrame<X,S> frame)
XyModeladd in interface XyModel<X extends Comparable,S extends Comparable>frame - the data frame containing chart data where columns represent seriespublic int add(com.zavtech.morpheus.frame.DataFrame<?,S> frame, S domainKey)
XyModeladd in interface XyModel<X extends Comparable,S extends Comparable>frame - the data frame containing chart data where column represent series, except for column with domainKeydomainKey - the column key that should be used to define the domainpublic XyDataset<X,S> update(int index, com.zavtech.morpheus.frame.DataFrame<X,S> frame)
XyModelupdate in interface XyModel<X extends Comparable,S extends Comparable>index - the index of the data model to update with the specified frameframe - the data frame containing chart data where columns represent seriespublic XyDataset<X,S> update(int index, com.zavtech.morpheus.frame.DataFrame<?,S> frame, S domainKey)
XyModelupdate in interface XyModel<X extends Comparable,S extends Comparable>index - the index of the data model to update with the specified frameframe - the data frame containing chart data where column represent series, except for column with domainKeydomainKey - the column key that should be used to define the domainpublic void removeAll()
XyModelremoveAll in interface XyModel<X extends Comparable,S extends Comparable>public void remove(int index)
XyModelremove in interface XyModel<X extends Comparable,S extends Comparable>index - the index of the dataset to removeCopyright 2014-2017, Xavier Witdouck