-
-
Notifications
You must be signed in to change notification settings - Fork 322
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
hledger-web pie chart #538
Comments
I've tried something here: https://github.com/NorfairKing/hledger/tree/pie-chart, but I'm rather terrible at JS and not familiar where the appropriate data is in hledger. |
Nice! Can you show a demo or screenshot ? |
@simonmichael, sure but there's nothing to see really. I haven't hooked up the data and I'm terrible at making things look good. I used the jquery plotting library that you're already using. |
I had an idea for 2 pie charts:
I think the second idea isn't always feasible because you can't always compare comoddities. |
Also: I'm really happy with what you've made here. It integrates nicely with my own systems :D 👍 |
Thanks, that's good to know! Do feel free to blog/tweet about your setup (and if the latter, don't forget #hledger #plaintextaccounting tags so it gets seen). I installed your branch on the demo1.hledger.org test instance to see how it works and follow the WIP, eg: http://demo1.hledger.org/register?q=inacct%3AExpenses . You'll get more efficient feedback if you run your own public instance, otherwise I'll update this one when I notice changes. |
As with hledger-chart, there's an unresolved question about pie charts which you're probably already aware of: how will you handle the case when some amounts have different sign ? |
Cool! |
No idea! |
Sure, what do you need ? Feel free to join #hledger also. |
Thanks for the help on #hledger! The current version shows a pie chart with actual data, but it doesn't make sense as soon as negative and positive amounts coincide in an account. It also duplicates labels when the mixedamounts have multiple commodities. NorfairKing@38f2609 |
I have been using highcharts this week in implementing an hledger web front-end, it's free for non-commercial use and has a lot of types of charts, so that may be something to consider. A thought I had about how to handle accounts with positive and negative values in: could the pie chart be used to show the relative magnitude of all the amounts? That's still possibly an interesting thing to know, and a legend (or hovering over pie chart segments, or something) can give you the actual values. |
I avoided highcharts to keep open the possibility of making something sellable some day. But it's clearly the best available.. My usual imagined solution for signed pie charts is to have two of them, one for the positives (eg assets & liabilities with a contra-balance) and one for the negatives. |
I like the idea of having two charts, as @simonmichael said. We could still use google charts instead of highcharts. |
http://www.chartjs.org/samples/latest/charts/pie.html is open source and can do something similar if you press 'add dataset'. |
Alternatively, there's this: https://bl.ocks.org/mbostock/4063423 |
I think this already seems quite nice ;). Makes sense to keep using flot since it's also already used for the line charts.
Makes sense to me. |
I took the liberty of rebasing the previous work by @NorfairKing as #1467. Needs some more work but a nice start I think. |
This is a request:
It would be nice to see a breakdown per category in the form of a pie chart in the web UI.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: