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
|
@ -101,7 +101,7 @@ public class BarChartView
|
|||
lines.append(" {\n");
|
||||
lines.append(" xAxes:\n");
|
||||
lines.append(" [{\n");
|
||||
lines.append(" ticks: \n");
|
||||
lines.append(" ticks:\n");
|
||||
lines.append(" {\n");
|
||||
lines.append(" beginAtZero: true\n");
|
||||
lines.append(" },\n");
|
||||
|
@ -109,11 +109,16 @@ public class BarChartView
|
|||
lines.append(" }],\n");
|
||||
lines.append(" yAxes:\n");
|
||||
lines.append(" [{\n");
|
||||
lines.append(" ticks: \n");
|
||||
lines.append(" ticks:\n");
|
||||
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");
|
||||
|
|
Loading…
Reference in a new issue