Closed masonlouchart closed 8 years ago
Sorry for the delay. This case you related is more appropriate as a composite element, i.e., a new element wrapping the dygraph-line and exposing these features. I have many of those with some buttons triggering specific functionalities. I suggest you do like so.
Using composition why not. But I'm still thinking it should be an element of this group. It could own the functions to zoom and unzoom on a specific range. I added this feature (using composition) to my element and it was pretty boring to do it.
Sorry! You meant to expose the http://dygraphs.com/options.html#rollPeriod option. Definitely it's in the scope of the element. I'll do that for you.
I would like to be able to activate declaratively some buttons/links to play with the
rollPeriod
option. I think it's frequent to have buttons like in the link-interaction example (hour, day, week, month, full).I'm not sure about the way to do this. I'm thinking to a
dygraph-roll-periods
element which will display links by default or use the given template (paper-button, paper-icon-button, etc...) if there is one.It could be resulted in something like that:
Note: only one dygraph-roll-period at a time and its "periods" attribute will be a valid JS array.
Maybe I'm gone too far and have the option
roll-period
exposed could be enough ❓