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
Add support for flotr2 as an alternative to Google Charts #166
Conversation
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. |
Which one of activity graphs aren't working? Which page? On 8/04/2014 2:34 PM, James Moger wrote:
|
Repo summary page. |
Can you send a screenshot? What repo are you looking at? On 8/04/2014 2:53 PM, James Moger wrote:
|
I have just pushed the changes to fix the summary page. On 8/04/2014 2:53 PM, James Moger wrote:
|
Also just fixed Metrics page On 8/04/2014 2:53 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. |
here do you have the answer: http://swizec.com/blog/flotr2-my-favorite-javascript-graph-library/swizec/4558 |
Cool. Thanks! op 08-04-14 15:46, Marco Sousa schreef:
Jeroen Baten | EMAIL : JBATEN@I2RS.NL |
@DooZel Here is what I'd like to do, if you are willing...
|
Only because I have used it before and I think it works well. On 8/04/2014 11:44 PM, James Moger wrote:
|
The x-axis labels were painful, that is why I excluded them. 1, 3 & 4 I On 9/04/2014 12:17 AM, James Moger wrote:
|
…justed colors and added click event to repository pie charts
I have made the changes below (1, 3, 4 & 5), I could add a click event On 9/04/2014 12:17 AM, James Moger wrote:
|
String displayFormat = "MMM dd"; | ||
if(metrics.size() > 0 && metrics.get(0).name.length() == 7){ | ||
df = new SimpleDateFormat("yyyy-MM"); | ||
displayFormat = "MMM"; |
There was a problem hiding this comment.
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";
This looks great! I have a few more tweaks I'd like before merging.
|
getString("gb.repository"), getString("gb.commits")); | ||
for (Metric metric : repositoryMetrics.values()) { | ||
chart.addValue(metric.name, metric.count); | ||
} | ||
chart.setShowLegend(false); | ||
chart.setClickUrl("../summary/"); |
There was a problem hiding this comment.
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);
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.