Skip to content

Accumulator mods#104

Open
AndrewClarke wants to merge 2 commits intotopfunky:masterfrom
AndrewClarke:accumulator-mods
Open

Accumulator mods#104
AndrewClarke wants to merge 2 commits intotopfunky:masterfrom
AndrewClarke:accumulator-mods

Conversation

@AndrewClarke
Copy link

I've also made two changes to Accumulator bar

1/ the ability to set the label string for the accululator

This one is a no-brainer - it just required a defaulted attribute and an attr_accessor.

2/ the ability to set a non-zero starting point for the accumulator series.

The way I've organised it, it is possible to either quietly start with a non-zero accumulator, or draw attention to it with it's own label and colour.

Firstly, the carry_forward= accessor allows the carry-forward value to be set. This value is used as a seed for for running summation across the data series.

Secondly, IF the carry_forward_label= accessor is used to provide a string, then a distinct data set is added to the graph. Most of the values of this data set are set to zero except the first item which has the carry_forward value. The carry-forward value is also subtracted from the first entry of the accumulator series. Then the carry-forward series is pushed into the graph - it will pick it's own colour and show the label in the legend.

@donv donv modified the milestone: 0.6.0 May 30, 2015
@donv
Copy link
Collaborator

donv commented May 30, 2015

Hi @AndrewClarke !

Thanks for the pull request. Could you add a test that uses the new feature?

@donv donv added the feature label May 30, 2015
@donv donv modified the milestone: 0.6.0 May 30, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants