| | |
| | | // Sort the values first |
| | | Collections.sort(values, new Comparator<ChartValue>() { |
| | | |
| | | @Override |
| | | public int compare(ChartValue o1, ChartValue o2) { |
| | | long long1 = Long.parseLong(o1.name); |
| | | long long2 = Long.parseLong(o2.name); |
| | |
| | | } |
| | | |
| | | } |
| | | line(sb, MessageFormat.format(" ], label : ''{0}'', color: ''#FF9900'' '}'", valueName)); |
| | | line(sb, MessageFormat.format(" ], label : \"{0}\", color: ''#FF9900'' '}'", valueName)); |
| | | line(sb, "]"); |
| | | |
| | | // Add the options |
| | | line(sb, ", {"); |
| | | if(title != null && title.isEmpty() == false){ |
| | | line(sb, MessageFormat.format("title : ''{0}'',", title)); |
| | | line(sb, MessageFormat.format("title : \"{0}\",", title)); |
| | | } |
| | | line(sb, "bars : {"); |
| | | line(sb, " show : true,"); |