Skip to content

Add support for flotr2 as an alternative to Google Charts - #166

Closed
d00z3l wants to merge 9 commits into
gitblit-org:masterfrom
d00z3l:master
Closed

d00z3l wants to merge 9 commits into
gitblit-org:masterfrom
d00z3l:master

Conversation

@d00z3l

@d00z3l d00z3l commented Apr 7, 2014

Copy link
Copy Markdown
Contributor

I have made changes adding the JavaScript charting library Flotr2 as an alternative to Google Charts. I think it is a much better alternative when you are using it in a corporate environment with no need for external calls. Toggle between Google Charts and Flotr2 in the gitblit.properties file: web.chartType = flotr2 or web.chartType = google. The default is google.

@gitblit

gitblit commented Apr 8, 2014

Copy link
Copy Markdown
Collaborator

This is a somewhat frequent request so thanks for tackling it. It looks like the activity graphs are not working properly. If we can get those working properly, then I'll be more interested in merging.

@d00z3l

d00z3l commented Apr 8, 2014

Copy link
Copy Markdown
Contributor Author

Which one of activity graphs aren't working? Which page?

On 8/04/2014 2:34 PM, James Moger wrote:

This is a somewhat frequent request so thanks for tackling it. It
looks like the activity graphs are not working properly. If we can get
those working properly, then I'll be more interested in merging.

—
Reply to this email directly or view it on GitHub
#166 (comment).

@gitblit

gitblit commented Apr 8, 2014

Copy link
Copy Markdown
Collaborator

Repo summary page.

@d00z3l

d00z3l commented Apr 8, 2014

Copy link
Copy Markdown
Contributor Author

Can you send a screenshot? What repo are you looking at?

On 8/04/2014 2:53 PM, James Moger wrote:

Repo summary page.

—
Reply to this email directly or view it on GitHub
#166 (comment).

@d00z3l

d00z3l commented Apr 8, 2014

Copy link
Copy Markdown
Contributor Author

I have just pushed the changes to fix the summary page.

On 8/04/2014 2:53 PM, James Moger wrote:

Repo summary page.

—
Reply to this email directly or view it on GitHub
#166 (comment).

@d00z3l

d00z3l commented Apr 8, 2014

Copy link
Copy Markdown
Contributor Author

Also just fixed Metrics page

On 8/04/2014 2:53 PM, James Moger wrote:

Repo summary page.

—
Reply to this email directly or view it on GitHub
#166 (comment).

@gitblit

gitblit commented Apr 8, 2014

Copy link
Copy Markdown
Collaborator

That looks much better. With all the graphing lib choices, why flotr2? I have nothing against it, just never heard of it.

@marcomsousa

Copy link
Copy Markdown

@kwoot

kwoot commented Apr 8, 2014

Copy link
Copy Markdown

Cool. Thanks!

op 08-04-14 15:46, Marco Sousa schreef:

here do you have the answer:
http://swizec.com/blog/flotr2-my-favorite-javascript-graph-library/swizec/4558

—
Reply to this email directly or view it on GitHub
#166 (comment).

Jeroen Baten | EMAIL : JBATEN@I2RS.NL
____ _ __ | web : www.i2rs.nl
| )|)( | tel : +31 (0)345 - 75 26 28
|/_| __) | Molenwindsingel 46, 4105 HK, Culemborg, the Netherlands

@gitblit

gitblit commented Apr 8, 2014

Copy link
Copy Markdown
Collaborator

@DooZel Here is what I'd like to do, if you are willing...

  1. tweak the activity graphs to use the colors of the original graphs - those are the Gitblit colors - the dark navy blue & the orange.
  2. I'd like to see x-axis labels so I don't have to mouse-hover over points - although I do like that feature. If this becomes a layout or size problem, we'll skip it.
  3. Add % to the pie chart labels, as an engineer unit-less numbers make me cringe. :)
  4. Dump all the GoogleChart code, including your new setting. I don't see a reason to continue offering GoogleCharts with a working, self-hosted charting solution that is faster and substantially equivalent.
  5. Is there a way to specify an onclick handler for the pie charts? I've long had this idea to jump to the repo summary page from a pie chart click. We'll skip it if can't be done or if it requires ugly hacks.

@d00z3l

d00z3l commented Apr 8, 2014

Copy link
Copy Markdown
Contributor Author

Only because I have used it before and I think it works well.

On 8/04/2014 11:44 PM, James Moger wrote:

That looks much better. With all the graphing lib choices, why flotr2?
I have nothing against it, just never heard of it.

—
Reply to this email directly or view it on GitHub
#166 (comment).

@d00z3l

d00z3l commented Apr 9, 2014

Copy link
Copy Markdown
Contributor Author

The x-axis labels were painful, that is why I excluded them. 1, 3 & 4 I
can do, I will also look at how to do the click event.

On 9/04/2014 12:17 AM, James Moger wrote:

@DooZel https://github.com/doozel Here is what I'd like to do, if
you are willing...

  1. tweak the activity graphs to use the colors of the original graphs
    • those are the Gitblit colors - the dark navy blue & the orange.
  2. I'd like to see x-axis labels so I don't have to mouse-hover over
    points - although I do like that feature. If this becomes a layout
    or size problem, we'll skip it.
  3. Add /%/ to the pie chart labels, as an engineer unit-less numbers
    make me cringe. :)
  4. Dump all the GoogleChart code, including your new setting. I don't
    see a reason to continue offering GoogleCharts with a working,
    self-hosted charting solution that is faster and substantially
    equivalent.
  5. Is there a way to specify an onclick handler for the pie charts?
    I've long had this idea to jump to the repo summary page from a
    pie chart click. We'll skip it if can't be done or if it requires
    ugly hacks.

—
Reply to this email directly or view it on GitHub
#166 (comment).

…justed colors and added click event to repository pie charts
@d00z3l

d00z3l commented Apr 9, 2014

Copy link
Copy Markdown
Contributor Author

I have made the changes below (1, 3, 4 & 5), I could add a click event
to the repository pie charts. I couldn't do it for the author as you
need to also specify a repository name for the search to work.

On 9/04/2014 12:17 AM, James Moger wrote:

@DooZel https://github.com/doozel Here is what I'd like to do, if
you are willing...

  1. tweak the activity graphs to use the colors of the original graphs
    • those are the Gitblit colors - the dark navy blue & the orange.
  2. I'd like to see x-axis labels so I don't have to mouse-hover over
    points - although I do like that feature. If this becomes a layout
    or size problem, we'll skip it.
  3. Add /%/ to the pie chart labels, as an engineer unit-less numbers
    make me cringe. :)
  4. Dump all the GoogleChart code, including your new setting. I don't
    see a reason to continue offering GoogleCharts with a working,
    self-hosted charting solution that is faster and substantially
    equivalent.
  5. Is there a way to specify an onclick handler for the pie charts?
    I've long had this idea to jump to the repo summary page from a
    pie chart click. We'll skip it if can't be done or if it requires
    ugly hacks.

—
Reply to this email directly or view it on GitHub
#166 (comment).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's change this to displayFormat = "yyyy MMM";

@gitblit

gitblit commented Apr 9, 2014

Copy link
Copy Markdown
Collaborator

This looks great! I have a few more tweaks I'd like before merging.

  1. Move the new resources into a flotr or flotr2 dir
  2. The old graph didn't show a blue circle for every data point. Those blue circles actually represent tags so there should two series, I suppose. The normal points (orange line) and the tag points (discrete blue dots). The tag points are determined by metric.tag > 0. I don't have the tag labels, just a count. When we restore tag indicators, then we're ready to merge.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

String url = urlFor(SummaryPage.class, null).toString() + "?r=";
chart.setClickUrl(url);

@gitblit

gitblit commented Apr 10, 2014

Copy link
Copy Markdown
Collaborator

I pushed your commits to ticket-43 for preservation, squashed them, and merged to master. Thanks for working on this, you've just closed issue-283.

@gitblit gitblit closed this Apr 10, 2014
gitblit added a commit that referenced this pull request Sep 5, 2014
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

Successfully merging this pull request may close these issues.

4 participants