From a502d96a860456ec5e8c96761db70f7cabb74751 Mon Sep 17 00:00:00 2001 From: Paul Martin <paul@paulsputer.com> Date: Sat, 30 Apr 2016 04:19:14 -0400 Subject: [PATCH] Merge pull request #1073 from gitblit/1062-DocEditorUpdates --- src/main/java/com/gitblit/wicket/charting/Flotr2PieChart.java | 22 +++++++++++----------- 1 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/main/java/com/gitblit/wicket/charting/Flotr2PieChart.java b/src/main/java/com/gitblit/wicket/charting/Flotr2PieChart.java index ea04db9..f537e26 100644 --- a/src/main/java/com/gitblit/wicket/charting/Flotr2PieChart.java +++ b/src/main/java/com/gitblit/wicket/charting/Flotr2PieChart.java @@ -35,11 +35,11 @@ @Override protected void appendChart(StringBuilder sb) { - + String dName = "data_" + dataName; line(sb, "var selected_" + dataName + " = null;"); line(sb, MessageFormat.format("var {0} = Flotr.draw(document.getElementById(''{1}''),", dName, tagId)); - + // Add the data line(sb, "["); for (int i = 0; i < values.size(); i++) { @@ -47,13 +47,13 @@ if(i > 0){ sb.append(","); } - line(sb, MessageFormat.format("'{'data : [ [0, {0}] ], label : ''{1}'', color: ''{2}'' '}'", Float.toString(value.value), value.name, StringUtils.getColor(value.name))); + line(sb, MessageFormat.format("'{'data : [ [0, {0}] ], label : \"{1}\", color: ''{2}'' '}'", Float.toString(value.value), value.name, StringUtils.getColor(value.name))); } line(sb, "]"); - + // Add the options line(sb, ", {"); - line(sb, MessageFormat.format("title : ''{0}'',", title)); + line(sb, MessageFormat.format("title : \"{0}\",", title)); line(sb, "fontSize : 2,"); line(sb, "pie : {"); line(sb, " show : true,"); @@ -90,7 +90,7 @@ line(sb, " outlineWidth: 0"); line(sb, "}"); line(sb, ", legend: {"); - if(showLegend){ + if(showLegend){ line(sb, " show: true"); } else { @@ -98,15 +98,15 @@ } line(sb, "}"); line(sb, "});"); - + if(clickUrl != null && clickUrl.isEmpty() == false){ line(sb, MessageFormat.format("Flotr.EventAdapter.observe(document.getElementById(''{0}''), ''flotr:click'', function (mouse, a, b, c) '{'", tagId)); line(sb, " window.location.href = \"" + clickUrl + "\" + selected_" + dataName + ";"); - line(sb, "});"); + line(sb, "});"); } - - - + + + } } -- Gitblit v1.9.1