0

I'm actually using pchart to display bar charts containing integer values. But, the scale displays automatically :

70 | 58.33 | 46.67 | 35 | 23.33 | 11.67 | 0 |

I want it to be in integers only, do you know how I can get that? I want it to be set automatically but to be in integers. Thanks, and excuse me for my poor english, I'm french.

lour
  • 25
  • 1
  • 6

1 Answers1

0

how about convert the number as integer before put in chart?

or if you really want to format the value output which not exact match the bar value, you can apply the customized number formatting function as below.

$MyData->setAxisDisplay(1,AXIS_FORMAT_CUSTOM,"YAxisFormat");
function YAxisFormat($Value) { return(round($Value,0)); }

mememoremore
  • 282
  • 1
  • 4
  • 15