2
DataSeries are the most fundamental encapsulation of numerical data in Chaco.
3
They implement the DataSource interface and have a name and a dimension.
5
The best way to adapt external domain objects for Chaco is to make them
6
subclass AbstractDataSeries. (An alternate approach is to make them produce
7
instances of a DataSeries subclass of the appropriate dimension.)
10
from enthought.traits.api import Enum, Event, Instance
12
from datasource import DataSource
14
class AbstractDataSeries(DataSource):
16
Base class for all DataSeries. Fleshes out some of the basic common
17
functionality of DataSources when applied to numerical arrays.
19
# Re-declare the "parent" trait (inherited from DataSource) to indicate
20
# that DataSeries are the start of the data pipeline.
23
# Add some additional metadata that all DataSeries should have.
24
metadata = Instance(dict, {"selections":[], "annotations":[]})
27
# If the upwards-propagating get_view() call has reached us, then there
28
# were no ViewFilters downstream of us. This method should do the right
29
# thing for all standard, numerical DataSeries subclasses.