[#1013] Fix stack graph labels with ' in them

This commit is contained in:
Rsl1122 2019-04-29 20:50:58 +03:00
parent 27a8ce0052
commit 1a3ca6a445

View File

@ -39,7 +39,7 @@ public class StackGraph implements HighChart {
int length = this.labels.length; int length = this.labels.length;
int i = 0; int i = 0;
for (String label : this.labels) { for (String label : this.labels) {
labelBuilder.append("'").append(label).append("'"); labelBuilder.append('"').append(label).append('"');
if (i < length - 1) { if (i < length - 1) {
labelBuilder.append(","); labelBuilder.append(",");
@ -51,9 +51,9 @@ public class StackGraph implements HighChart {
} }
private String toSeries(StackDataSet dataSet) { private String toSeries(StackDataSet dataSet) {
StringBuilder dataSetBuilder = new StringBuilder("{name: \""); StringBuilder dataSetBuilder = new StringBuilder("{name: '");
dataSetBuilder.append(dataSet.getName()).append("\",") dataSetBuilder.append(dataSet.getName()).append("',")
.append("color:").append(dataSet.getColor()) .append("color:").append(dataSet.getColor())
.append(",data: ["); .append(",data: [");