Merge branch 'ticket/77' into develop
| | |
| | | // 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,"); |
| | |
| | | } |
| | | line(sb, MessageFormat.format("[{0}, {1}] ", value.name, Float.toString(value.value))); |
| | | } |
| | | line(sb, MessageFormat.format(" ], label : ''{0}'', lines : '{' show : true '}', color: ''#ff9900'' '}'", valueName)); |
| | | line(sb, MessageFormat.format(" ], label : \"{0}\", lines : '{' show : true '}', color: ''#ff9900'' '}'", valueName)); |
| | | |
| | | if(highlights.size() > 0){ |
| | | // get the highlights |
| | |
| | | } |
| | | line(sb, MessageFormat.format("[{0}, {1}] ", value.name, Float.toString(value.value))); |
| | | } |
| | | line(sb, MessageFormat.format(" ], label : ''{0}'', points : '{' show : true, fill: true, fillColor:''#002060'' '}', color: ''#ff9900'' '}'", valueName)); |
| | | line(sb, MessageFormat.format(" ], label : \"{0}\", points : '{' show : true, fill: true, fillColor:''#002060'' '}', 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, "mouse: {"); |
| | | line(sb, " track: true,"); |
| | |
| | | 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,"); |