Re: Interactive Javascript + Canvas (jqPlot) powered graphs

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Interactive Javascript + Canvas (jqPlot) powered graphs

Andy Clayton
Hi all,

[I sent this once before, but that was during the mail server hiccup a
month or so ago. Perhaps as a result it got somewhat lost in the torrent
of mail. Either that or people aren't here just to appease me. Anyways,
I thought I would send it one last time in case anyone wants to try it
out and comment. I should have much more time next week to hopefully
clean things up further and get it closer to being ready.]

I finally had some time to sit down and clean this up a little. Given
that I am lazy I also switched from Flot to jqPlot because it supports
more of what Gnucash needs without changes or unsupported extensions.
There still is a decent amount of work to be done to reach parity with
the gog charts, but I wanted to post what I have so far if anyone would
like to try it out and comment. For now I left the old charts in for
comparison. Once things are in a bit better shape I'll make a bug and
post the latest patches.

Here is a list of at least some of the possible issues I am aware of:
* The default coloring could probably be better (plus support for when
specific colors are specified)
* The legend needs to get out of the way of the graph
* On bar graphs as more bars get packed in there seems to be too much
padding compared to bar width (really small bars with lots of whitespace)
* On any of the bar graphs over time the x-axis labels are (to me)
misleading. A bar labeled 01/01/2011, for example, actually represents
the value up to the next x position, say 01/02/2011. Perhaps labeling it
with the through date (the inclusive end date) would make more sense,
rather than the start? Then again, maybe that is just a matter of
preference. Or maybe I will avoid the issue entirely by simplifying the
labels to just year, or month and year, for the simple cases.

Anyways, feel free to give a try and let me know what could be different
or better.

Thanks,

Andy

_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel

add-jqplot.patch (963K) Download Attachment
jqplot-barchart.patch (9K) Download Attachment
jqplot-piechart.patch (2K) Download Attachment
jqplot-scatterplot.patch (3K) Download Attachment
jqplot-scm-utilities.patch (1K) Download Attachment
series (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Interactive Javascript + Canvas (jqPlot) powered graphs

Christian Stimming
Dear Andy,

I'm sorry for not replying earlier. I'm very excited about your  
patches, but haven't had the time to actually do some testing. I was  
planning to apply them to SVN trunk as soon as we have a 2.4-stable  
branch created, so that your patches here (javascript) and also the  
previous python module patches will be available in the experimental  
trunk branch, as soon as it is separated from the 2.4-stable branch.

By the way, how do I apply your patch series most easily? I'm using  
git-svn locally and I'm used to "git am" but not the way you've  
submitted the patches.

Regards,

Christian



Zitat von Andy Clayton <[hidden email]>:

> Hi all,
>
> [I sent this once before, but that was during the mail server hiccup  
> a month or so ago. Perhaps as a result it got somewhat lost in the  
> torrent of mail. Either that or people aren't here just to appease  
> me. Anyways, I thought I would send it one last time in case anyone  
> wants to try it out and comment. I should have much more time next  
> week to hopefully clean things up further and get it closer to being  
> ready.]
>
> I finally had some time to sit down and clean this up a little.  
> Given that I am lazy I also switched from Flot to jqPlot because it  
> supports more of what Gnucash needs without changes or unsupported  
> extensions. There still is a decent amount of work to be done to  
> reach parity with the gog charts, but I wanted to post what I have  
> so far if anyone would like to try it out and comment. For now I  
> left the old charts in for comparison. Once things are in a bit  
> better shape I'll make a bug and post the latest patches.
>
> Here is a list of at least some of the possible issues I am aware of:
> * The default coloring could probably be better (plus support for  
> when specific colors are specified)
> * The legend needs to get out of the way of the graph
> * On bar graphs as more bars get packed in there seems to be too  
> much padding compared to bar width (really small bars with lots of  
> whitespace)
> * On any of the bar graphs over time the x-axis labels are (to me)  
> misleading. A bar labeled 01/01/2011, for example, actually  
> represents the value up to the next x position, say 01/02/2011.  
> Perhaps labeling it with the through date (the inclusive end date)  
> would make more sense, rather than the start? Then again, maybe that  
> is just a matter of preference. Or maybe I will avoid the issue  
> entirely by simplifying the labels to just year, or month and year,  
> for the simple cases.
>
> Anyways, feel free to give a try and let me know what could be  
> different or better.
>
> Thanks,
>
> Andy
>



_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|

Re: Interactive Javascript + Canvas (jqPlot) powered graphs

Phil Longstaff
In reply to this post by Andy Clayton
Do you have some sample plots you can attach?

 Phil
---------
I used to be a hypochondriac AND a kleptomaniac. So I took something for it.




________________________________
From: Andy Clayton <[hidden email]>
To: [hidden email]
Sent: Fri, March 11, 2011 9:33:04 AM
Subject: Re: Interactive Javascript + Canvas (jqPlot) powered graphs

Hi all,

[I sent this once before, but that was during the mail server hiccup a month or
so ago. Perhaps as a result it got somewhat lost in the torrent of mail. Either
that or people aren't here just to appease me. Anyways, I thought I would send
it one last time in case anyone wants to try it out and comment. I should have
much more time next week to hopefully clean things up further and get it closer
to being ready.]

I finally had some time to sit down and clean this up a little. Given that I am
lazy I also switched from Flot to jqPlot because it supports more of what
Gnucash needs without changes or unsupported extensions. There still is a decent
amount of work to be done to reach parity with the gog charts, but I wanted to
post what I have so far if anyone would like to try it out and comment. For now
I left the old charts in for comparison. Once things are in a bit better shape
I'll make a bug and post the latest patches.

Here is a list of at least some of the possible issues I am aware of:
* The default coloring could probably be better (plus support for when specific
colors are specified)
* The legend needs to get out of the way of the graph
* On bar graphs as more bars get packed in there seems to be too much padding
compared to bar width (really small bars with lots of whitespace)
* On any of the bar graphs over time the x-axis labels are (to me) misleading. A
bar labeled 01/01/2011, for example, actually represents the value up to the
next x position, say 01/02/2011. Perhaps labeling it with the through date (the
inclusive end date) would make more sense, rather than the start? Then again,
maybe that is just a matter of preference. Or maybe I will avoid the issue
entirely by simplifying the labels to just year, or month and year, for the
simple cases.

Anyways, feel free to give a try and let me know what could be different or
better.

Thanks,

Andy
_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|

Re: Interactive Javascript + Canvas (jqPlot) powered graphs

Andy Clayton
In reply to this post by Christian Stimming
Christian and Phil,

On Fri, Mar 11, 2011 at 8:48 AM, Christian Stimming <[hidden email]>wrote:
>
> I'm sorry for not replying earlier. I'm very excited about your patches,
> but haven't had the time to actually do some testing.
>

Quite understandable. I'll try to clean up the remaining issues I am aware
of yet this week so the patches are ready when you do happen to have time.


> By the way, how do I apply your patch series most easily? I'm using git-svn
> locally and I'm used to "git am" but not the way you've submitted the
> patches.
>

Hmm. I've been using stgit, so if you have that then 'stg import' works, but
I think git apply should also work. That's a good point though: I don't
think they can easily be applied with git am like this. I've avoided sending
them like that since they could still use some work and I was thinking it
would clutter up the list, but perhaps that is silly since it makes them
more difficult to apply. Plus the patches could all be squashed together
until cleaned up anyways. So I can send them in that format if you would
prefer. Just let me know.

On Fri, Mar 11, 2011 at 12:21 PM, Phil Longstaff <[hidden email]>
 wrote:

> Do you have some sample plots you can attach?


I'm away from home so I won't get to it tonight, but I will put some
together and send them along.

Thanks,

Andy
_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|

Re: Interactive Javascript + Canvas (jqPlot) powered graphs

Andy Clayton
In reply to this post by Phil Longstaff
Phil,

Here are two samples:

http://q3aiml.net/gnucash-jqplot-examples/expense-bar.html
<http://q3aiml.net/gnucash-jqplot-examples/expense-bar.html>
http://q3aiml.net/gnucash-jqplot-examples/expense-pie.html

Also, do you happen to know if there is an example gnucash file anywhere
that I could use in the future to generate samples without using my own
data? I looked in the examples directory but all the ones I found were very
simple and didn't have many transactions, so I wound up importing one of the
qif files and massaging it to look somewhat decent.

Andy
_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|

Re: Interactive Javascript + Canvas (jqPlot) powered graphs

Christian Stimming
In reply to this post by Andy Clayton
Dear Andy,

I've now applied the first two patches from you into SVN. I've not yet applied
the others because they would immediately change the behaviour.

However, I've tried them myself and I'm very much impressed by the obvious
increase in quality! This holds for both the on-screen display and also when
printing to PDF. From what I see here, I'm inclined to add your patches
immediately and throw out goffice, because the jqplot graphs are just so much
nicer!

For anyone to check yourself: Get latest SVN, then apply the attached patch,
and open any of the piechart or barchart reports.

By the way, what happens on a double-click? I only see the graph turns blue,
but I gues there was some meaning behind this... :-)

Am Freitag, 11. März 2011 schrieb Andy Clayton:
> Here is a list of at least some of the possible issues I am aware of:
> * The default coloring could probably be better (plus support for when
> specific colors are specified)

Yes, but it's good enough to be better than the gog colors, so it's sufficient
to replace the old one.

> * The legend needs to get out of the way of the graph

Depends on the graph and the data. Maybe it is sufficient if it were movable.

> * On bar graphs as more bars get packed in there seems to be too much
> padding compared to bar width (really small bars with lots of whitespace)

Might be, indeed.

> * On any of the bar graphs over time the x-axis labels are (to me)
> misleading. A bar labeled 01/01/2011, for example, actually represents
> the value up to the next x position, say 01/02/2011. Perhaps labeling it
> with the through date (the inclusive end date) would make more sense,
> rather than the start? Then again, maybe that is just a matter of
> preference. Or maybe I will avoid the issue entirely by simplifying the
> labels to just year, or month and year, for the simple cases.

Yes, but that's a problem with the gog graphs as well. We can throw out gog
and later come up with a fix to the labels.

> Anyways, feel free to give a try and let me know what could be different
> or better.

It looks great! Thank you very much for this contribution!

Regards,

Christian


_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel

jqplots-all.patch (15K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Interactive Javascript + Canvas (jqPlot) powered graphs

Christian Stimming
Actually I think the javascript plots look so extraordinarily much better than
the gog graphs that we should simply use them as replacement of the old ones.

They offer the same features, with the minor regression that on barcharts, the
legend is drawn on top of the actual chart and might interfere with the bars.
But this issue is probably fixed quickly.

What do the other developers think?

Best Regards,

Christian

Am Donnerstag, 24. März 2011 schrieb Christian Stimming:

> Dear Andy,
>
> I've now applied the first two patches from you into SVN. I've not yet
> applied the others because they would immediately change the behaviour.
>
> However, I've tried them myself and I'm very much impressed by the obvious
> increase in quality! This holds for both the on-screen display and also
> when printing to PDF. From what I see here, I'm inclined to add your
> patches immediately and throw out goffice, because the jqplot graphs are
> just so much nicer!
>
> For anyone to check yourself: Get latest SVN, then apply the attached
> patch, and open any of the piechart or barchart reports.
_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|

Re: Interactive Javascript + Canvas (jqPlot) powered graphs

John Ralls-2

On Mar 25, 2011, at 1:36 PM, Christian Stimming wrote:

> Actually I think the javascript plots look so extraordinarily much better than
> the gog graphs that we should simply use them as replacement of the old ones.
>
> They offer the same features, with the minor regression that on barcharts, the
> legend is drawn on top of the actual chart and might interfere with the bars.
> But this issue is probably fixed quickly.
>
> What do the other developers think?

Indeed, those are very nice. They'll need a bit of massaging to look as good as the ones already in place, but that should be a CSS issue rather than code. Adopting these would mean that we'd no longer need goffice, right?

Regards,
John Ralls
_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|

Re: Interactive Javascript + Canvas (jqPlot) powered graphs

Christian Stimming
Am Freitag, 25. März 2011 schrieb John Ralls:

> On Mar 25, 2011, at 1:36 PM, Christian Stimming wrote:
> > Actually I think the javascript plots look so extraordinarily much better
> > than the gog graphs that we should simply use them as replacement of the
> > old ones.
> >
> > They offer the same features, with the minor regression that on
> > barcharts, the legend is drawn on top of the actual chart and might
> > interfere with the bars. But this issue is probably fixed quickly.
> >
> > What do the other developers think?
>
> Indeed, those are very nice. They'll need a bit of massaging to look as
> good as the ones already in place, but that should be a CSS issue rather
> than code. Adopting these would mean that we'd no longer need goffice,
> right?

Yes, and it also means we need to disable gtkhtml completely. Which is fine
for trunk, given we just branched off the 2.4-stable branch.

As a first step, I've disabled gtkhtml in configure and added an explanatory
error message.

Regards,

Christian
_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|

Re: Interactive Javascript + Canvas (jqPlot) powered graphs

Chris-329
In reply to this post by Christian Stimming
On Fri, 2011-03-25 at 21:36 +0100, Christian Stimming wrote:
> Actually I think the javascript plots look so extraordinarily much better than
> the gog graphs that we should simply use them as replacement of the old ones.
>
> They offer the same features, with the minor regression that on barcharts, the
> legend is drawn on top of the actual chart and might interfere with the bars.
> But this issue is probably fixed quickly.
>
I also agree that the new graphs look good. A couple of additional
issues that I have seen are
1) When there are a lot of bar the date labels run over each other where
as gog graphs does not show all dates.
2) In gog when the are negative values the get stacked negatively from 0

Regards,
     Chris

_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|

Re: Interactive Javascript + Canvas (jqPlot) powered graphs

Geert Janssens
In reply to this post by Christian Stimming
On donderdag 24 maart 2011, Christian Stimming wrote:

> Dear Andy,
>
> I've now applied the first two patches from you into SVN. I've not yet
> applied the others because they would immediately change the behaviour.
>
> However, I've tried them myself and I'm very much impressed by the obvious
> increase in quality! This holds for both the on-screen display and also
> when printing to PDF. From what I see here, I'm inclined to add your
> patches immediately and throw out goffice, because the jqplot graphs are
> just so much nicer!
>
> For anyone to check yourself: Get latest SVN, then apply the attached
> patch, and open any of the piechart or barchart reports.
>
> By the way, what happens on a double-click? I only see the graph turns
> blue, but I gues there was some meaning behind this... :-)
>
> Am Freitag, 11. März 2011 schrieb Andy Clayton:
> > Here is a list of at least some of the possible issues I am aware of:
> > * The default coloring could probably be better (plus support for when
> > specific colors are specified)
>
> Yes, but it's good enough to be better than the gog colors, so it's
> sufficient to replace the old one.
>
> > * The legend needs to get out of the way of the graph
>
> Depends on the graph and the data. Maybe it is sufficient if it were
> movable.
>
> > * On bar graphs as more bars get packed in there seems to be too much
> > padding compared to bar width (really small bars with lots of whitespace)
>
> Might be, indeed.
>
> > * On any of the bar graphs over time the x-axis labels are (to me)
> > misleading. A bar labeled 01/01/2011, for example, actually represents
> > the value up to the next x position, say 01/02/2011. Perhaps labeling it
> > with the through date (the inclusive end date) would make more sense,
> > rather than the start? Then again, maybe that is just a matter of
> > preference. Or maybe I will avoid the issue entirely by simplifying the
> > labels to just year, or month and year, for the simple cases.
>
> Yes, but that's a problem with the gog graphs as well. We can throw out gog
> and later come up with a fix to the labels.
>
> > Anyways, feel free to give a try and let me know what could be different
> > or better.
>
> It looks great! Thank you very much for this contribution!
>
> Regards,
>
> Christian

Agreed, the new plots look much nicer. I like them very much. With a little
bit of polishing like suggested by John and Chris, they can go into trunk as
far as I'm concerned.

Geert
_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|

Re: Interactive Javascript + Canvas (jqPlot) powered graphs

Phil Longstaff
On Sat, 2011-03-26 at 16:37 +0100, Geert Janssens wrote:

> On donderdag 24 maart 2011, Christian Stimming wrote:
> > Dear Andy,
> >
> > I've now applied the first two patches from you into SVN. I've not yet
> > applied the others because they would immediately change the behaviour.
> >
> > However, I've tried them myself and I'm very much impressed by the obvious
> > increase in quality! This holds for both the on-screen display and also
> > when printing to PDF. From what I see here, I'm inclined to add your
> > patches immediately and throw out goffice, because the jqplot graphs are
> > just so much nicer!
> >
> > For anyone to check yourself: Get latest SVN, then apply the attached
> > patch, and open any of the piechart or barchart reports.
> >
> > By the way, what happens on a double-click? I only see the graph turns
> > blue, but I gues there was some meaning behind this... :-)
> >
> > Am Freitag, 11. März 2011 schrieb Andy Clayton:
> > > Here is a list of at least some of the possible issues I am aware of:
> > > * The default coloring could probably be better (plus support for when
> > > specific colors are specified)
> >
> > Yes, but it's good enough to be better than the gog colors, so it's
> > sufficient to replace the old one.
> >
> > > * The legend needs to get out of the way of the graph
> >
> > Depends on the graph and the data. Maybe it is sufficient if it were
> > movable.
> >
> > > * On bar graphs as more bars get packed in there seems to be too much
> > > padding compared to bar width (really small bars with lots of whitespace)
> >
> > Might be, indeed.
> >
> > > * On any of the bar graphs over time the x-axis labels are (to me)
> > > misleading. A bar labeled 01/01/2011, for example, actually represents
> > > the value up to the next x position, say 01/02/2011. Perhaps labeling it
> > > with the through date (the inclusive end date) would make more sense,
> > > rather than the start? Then again, maybe that is just a matter of
> > > preference. Or maybe I will avoid the issue entirely by simplifying the
> > > labels to just year, or month and year, for the simple cases.
> >
> > Yes, but that's a problem with the gog graphs as well. We can throw out gog
> > and later come up with a fix to the labels.
> >
> > > Anyways, feel free to give a try and let me know what could be different
> > > or better.
> >
> > It looks great! Thank you very much for this contribution!
> >
> > Regards,
> >
> > Christian
>
> Agreed, the new plots look much nicer. I like them very much. With a little
> bit of polishing like suggested by John and Chris, they can go into trunk as
> far as I'm concerned.

Agreed.  I have noticed that sometimes the chart legend covers over
bars.

Phil

_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|

Re: Interactive Javascript + Canvas (jqPlot) powered graphs

Manfred Usselmann
In reply to this post by Christian Stimming

On Fri, 25 Mar 2011 21:36:22 +0100
Christian Stimming <[hidden email]> wrote:

> Actually I think the javascript plots look so extraordinarily much
> better than the gog graphs that we should simply use them as
> replacement of the old ones.
>
> They offer the same features, with the minor regression that on
> barcharts, the legend is drawn on top of the actual chart and might
> interfere with the bars. But this issue is probably fixed quickly.
>
> What do the other developers think?

I like the jqplot charts as well.

Yes, the legend of the bar charts influences the y axis and covers part
of the bars. The bars are sometimes a bit too wide and sometimes too
narrow. See attached examples.

The pie charts are much nicer than the old ones. I noticed that they
start at the right side (3 o'clock) instead of the top. Don't know if
this is important.

The font size is a little bit small, but it was too large with the gog
charts, so it's better now.


Regards,
Manfred


_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel

barchart.png (80K) Download Attachment
barchart2.png (23K) Download Attachment
barchart3.png (46K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Interactive Javascript + Canvas (jqPlot) powered graphs

Andy Clayton
In reply to this post by Geert Janssens
Hi all,

Apologies for the silence. I moved and have since taken my time getting
settled and setting things up. That's mostly done now though, so I'll
look into the issues mentioned and get revised patches out as soon as
time allows.

Andy

On 03/26/2011 10:37 AM, Geert Janssens wrote:
> Agreed, the new plots look much nicer. I like them very much. With a little
> bit of polishing like suggested by John and Chris, they can go into trunk as
> far as I'm concerned.
>
> Geert
> _______________________________________________
> gnucash-devel mailing list
> [hidden email]
> https://lists.gnucash.org/mailman/listinfo/gnucash-devel

_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|

Re: Interactive Javascript + Canvas (jqPlot) powered graphs

Christian Stimming-4
Am Mittwoch, 11. Mai 2011 schrieb Andy Clayton:
> Hi all,
>
> Apologies for the silence. I moved and have since taken my time getting
> settled and setting things up. That's mostly done now though, so I'll
> look into the issues mentioned and get revised patches out as soon as
> time allows.

No problem. After all, this is a volunteer project, including the fact that
people may join or leave all the time. Take your time and we're looking
forward to any jqPlot improvements :-)

Regards,

Christian
_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel