elastic / timelion

Timelion was absorbed into Kibana 5. Don't use this. Time series composer for Elasticsearch and beyond.
Other
347 stars 79 forks source link

overloading sources and functions #178

Closed ddavidebor closed 8 years ago

ddavidebor commented 8 years ago

can datasources and chainables (such as .divide()) be overloaded like in this silly example?

example:

The hypothetical chainable/datasource hybrid "addFromZero(x)" behave as follows:

.value(1).addFromZero(123) will add 123 to value, plotting 124
.addFromZero(123) will plot 123

can this be easily done or is it a mess?

Davide

ddavidebor commented 8 years ago

Now apparently if a datasource and a chainable have the same term one will overwrite the other.

Regarding #174 we have created a datasource called .maths() and a chainable called math() but it's not the cleanest implementation.

rashidkpc commented 8 years ago

No, you can not overload in this manner, and I'd prefer not, for simplicity's sake. You could always start a chain with .static(0)

ddavidebor commented 8 years ago

Thy will be done