Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accumulator mods #104

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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?

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