|
Chart FX 7 for Java Server | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.softwarefx.chartfx.server.dataproviders.ListProvider
public class ListProvider
Provides access to the ListProvider object.
In many situations, the data is contained in a List, Collections or Arrays. Although you can use the Chart FX API to loop through array elements, read and populate the chart, you can do so in an easier way.
The ListProvider allows you to populate the chart from List and Arrays:
int[] valArray = {12, 15, 10, 7, 5};
ListProvider lstProvider = new ListProvider(valArray);
chart1.getDataSourceSettings().setDataSource(lstProvider);
You also load data from more than one array:
int[] series1 = {12, 15, 10};
int[] series2 = {20, 25, 7};
string[] labels = {"Yes", "No", "Don't know"};
ListProvider lstProvider = new ListProvider();
lstProvider.add(series1);
lstProvider.add(series2);
lstProvider.add(labels);
chart1.getDataSourceSettings().setDataSource(lstProvider);
Constructor Summary | |
---|---|
ListProvider()
|
|
ListProvider(List<Object> list)
|
|
ListProvider(Object array)
|
Method Summary | |
---|---|
void |
add(List<Object> list)
Appends the specified element to the ListProvider collection. |
void |
add(Object array)
Appends the specified element to the ListProvider collection. |
void |
add(String colName,
List<Object> list)
Appends the specified element to the ListProvider collection. |
void |
add(String colName,
Object array)
Appends the specified element to the ListProvider collection. |
List<Object> |
getList()
Gets the List. |
void |
setList(List<Object> list)
Sets an IList object providing access to CollectionBase members used to modify the ListProvider list. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ListProvider()
public ListProvider(Object array)
public ListProvider(List<Object> list)
Method Detail |
---|
public void add(Object array)
Appends the specified element to the ListProvider collection.
array
- The array to add to the ListProvider collection.public void add(List<Object> list)
Appends the specified element to the ListProvider collection.
list
- The list to add to the ListProvider collection.public void add(String colName, Object array)
Appends the specified element to the ListProvider collection.
colName
- The colName to add to the ListProvider collection.array
- The array to add to the ListProvider collection.public void add(String colName, List<Object> list)
Appends the specified element to the ListProvider collection.
colName
- The colName to add to the ListProvider collection.list
- The list to add to the ListProvider collection.public List<Object> getList()
Gets the List. For more detail see setList(java.util.List
.
public void setList(List<Object> list)
Sets an IList object providing access to CollectionBase members used to modify the ListProvider list.
Using this property, you will have access to add and remove items from the ListProvider. You will also have access to count, insert and copy items as well as other supported properties and methods.
This property is used to modify ListProvider objects. Once a ListProvider has been created, this property may be used to access methods used to populate and administer the data object.
Once the ListProvider object has been configured with the desired data, you may assign the object to the chart using the DataSourceSettings.setDataSource(com.softwarefx.chartfx.server.dataproviders.IDataSource)
property.
DataSourceSettings.setDataSource(com.softwarefx.chartfx.server.dataproviders.IDataSource)
,
DataSourceSettings
|
http://www.softwarefx.com | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |