PMSI-AlignAlytics / dimple

An object-oriented API for business analytics
Other
2.73k stars 556 forks source link

How to show only integer axis ticks? #220

Open brylie opened 8 years ago

brylie commented 8 years ago

I have a data set that consists of a variable with integer values. When there are fewer than 10 values, the variable axis displays decimal values, which somewhat clutters the chart.

How do I configure the chart axis to use only integers for the tickmarks?

Svjard commented 8 years ago

You can set the tickFormat of the axis. var x = myChart.addMeasureAxis("x", "Unit Sales"); x.tickFormat = 'd';

brylie commented 8 years ago

Thanks @Svjard :-)