Improved Y axes readness in Bar Chart.

This commit is contained in:
Christian P. MOMON 2021-05-30 04:59:51 +02:00
parent ab85c5f1fd
commit 73fae00b63

View file

@ -113,7 +113,12 @@ public class BarChartView
lines.append(" {\n");
lines.append(" beginAtZero: true,\n");
lines.append(" suggestedMax: 10,\n");
lines.append(" precision: 0\n");
lines.append(" precision: 0,\n");
lines.append(" callback: function(value, index, values)");
lines.append(" {\n");
lines.append(
" if (value > 1000000000) return value/1000000000 + 'G'; else if (value > 1000000) return value/1000000 + 'M'; else if (value > 1000) return value/1000 + 'k';else return value;\n");
lines.append(" }\n");
lines.append(" },\n");
lines.append(" stacked: ").append(chart.isStacked()).appendln(",");
lines.append(" }]\n");