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

Calculate cumulative sum #38

Open
nithishnaidu opened this issue Jul 13, 2021 · 1 comment
Open

Calculate cumulative sum #38

nithishnaidu opened this issue Jul 13, 2021 · 1 comment

Comments

@nithishnaidu
Copy link

Hey,

I'm using django-slick-reporting to render graphs, particularly the ReportGenerator class so that I can send the graph data as a json and then render a graph on the frontend.

I'm trying to render a graph that shows the cumulative value for a particular field. (The red line graph from the below image)

cumulative_graph

How can we calculate the cumulative value using django-slick-reporting?

Thanks

@RamezIssac
Copy link
Owner

Hello @nithishnaidu
For the cumulative sum you'd need to do this part of the calculation yourself by looping over the dataset.
Sorry, so far did not find a better way yet :)

You can do it via custom calculation fields but that would be much less efficient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants