]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Fixes #886 - Close span tags properly in legend generation template. 1122/head
authorVanessa Ung <vanessau@cse.unsw.edu.au>
Sat, 16 May 2015 05:31:56 +0000 (15:31 +1000)
committerVanessa Ung <vanessau@cse.unsw.edu.au>
Sat, 16 May 2015 05:31:56 +0000 (15:31 +1000)
src/Chart.Bar.js
src/Chart.Doughnut.js
src/Chart.Line.js
src/Chart.PolarArea.js
src/Chart.Radar.js

index a3496841fc5825a1a5f3688212196e522ec81caf..81532b4fd261bcaf96f848f1977d98bf97dd311f 100644 (file)
@@ -38,7 +38,7 @@
                barDatasetSpacing : 1,
 
                //String - A legend template
-               legendTemplate : "<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<datasets.length; i++){%><li><span style=\"background-color:<%=datasets[i].fillColor%>\"></span><%if(datasets[i].label){%><%=datasets[i].label%><%}%></li><%}%></ul>"
+               legendTemplate : "<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<datasets.length; i++){%><li><span style=\"background-color:<%=datasets[i].fillColor%>\"><%if(datasets[i].label){%><%=datasets[i].label%><%}%></span></li><%}%></ul>"
 
        };
 
index 364b5e51de8af609299bf7cc48d22d18017c8249..12e9f225551c8f3eb3c63d4f8d4bf38d0921a63f 100644 (file)
@@ -32,7 +32,7 @@
                animateScale : false,
 
                //String - A legend template
-               legendTemplate : "<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<segments.length; i++){%><li><span style=\"background-color:<%=segments[i].fillColor%>\"></span><%if(segments[i].label){%><%=segments[i].label%><%}%></li><%}%></ul>"
+               legendTemplate : "<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<segments.length; i++){%><li><span style=\"background-color:<%=segments[i].fillColor%>\"><%if(segments[i].label){%><%=segments[i].label%><%}%></span></li><%}%></ul>"
 
        };
 
index dbc974cbb73dfd0c6be2016b03008327798d6428..d0a85d88d249e8ccc30604eb494f06ed18ec5b8b 100644 (file)
@@ -50,7 +50,7 @@
                datasetFill : true,
 
                //String - A legend template
-               legendTemplate : "<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<datasets.length; i++){%><li><span style=\"background-color:<%=datasets[i].strokeColor%>\"></span><%if(datasets[i].label){%><%=datasets[i].label%><%}%></li><%}%></ul>",
+               legendTemplate : "<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<datasets.length; i++){%><li><span style=\"background-color:<%=datasets[i].strokeColor%>\"><%if(datasets[i].label){%><%=datasets[i].label%><%}%></span></li><%}%></ul>",
 
                //Boolean - Whether to horizontally center the label and point dot inside the grid
                offsetGridLines : false
index 63b7a1a954ffbc7fc2668bc83ae4f9142ad1bf47..d1802f5d61754f3ead44d64ba8b053314cc39979 100644 (file)
@@ -47,7 +47,7 @@
                animateScale : false,
 
                //String - A legend template
-               legendTemplate : "<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<segments.length; i++){%><li><span style=\"background-color:<%=segments[i].fillColor%>\"></span><%if(segments[i].label){%><%=segments[i].label%><%}%></li><%}%></ul>"
+               legendTemplate : "<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<segments.length; i++){%><li><span style=\"background-color:<%=segments[i].fillColor%>\"><%if(segments[i].label){%><%=segments[i].label%><%}%></span></li><%}%></ul>"
        };
 
 
index 0c63761abd0f82943caee9876fdd55c16cd40550..00da8f6631ea2183d707a018bc5131cf1bc176db 100644 (file)
@@ -62,7 +62,7 @@
                        datasetFill : true,
 
                        //String - A legend template
-                       legendTemplate : "<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<datasets.length; i++){%><li><span style=\"background-color:<%=datasets[i].strokeColor%>\"></span><%if(datasets[i].label){%><%=datasets[i].label%><%}%></li><%}%></ul>"
+                       legendTemplate : "<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<datasets.length; i++){%><li><span style=\"background-color:<%=datasets[i].strokeColor%>\"><%if(datasets[i].label){%><%=datasets[i].label%><%}%></span></li><%}%></ul>"
 
                },