Improved Y axes readness in Bar Chart.
This commit is contained in:
parent
ab85c5f1fd
commit
73fae00b63
1 changed files with 16 additions and 11 deletions
|
@ -113,7 +113,12 @@ public class BarChartView
|
||||||
lines.append(" {\n");
|
lines.append(" {\n");
|
||||||
lines.append(" beginAtZero: true,\n");
|
lines.append(" beginAtZero: true,\n");
|
||||||
lines.append(" suggestedMax: 10,\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(" },\n");
|
||||||
lines.append(" stacked: ").append(chart.isStacked()).appendln(",");
|
lines.append(" stacked: ").append(chart.isStacked()).appendln(",");
|
||||||
lines.append(" }]\n");
|
lines.append(" }]\n");
|
||||||
|
|
Loading…
Reference in a new issue