PhilJay / MPAndroidChart

A powerful 🚀 Android chart view / graph view library, supporting line- bar- pie- radar- bubble- and candlestick charts as well as scaling, panning and animations.
Other
37.53k stars 9.01k forks source link

label duplicate when chart zoom in #2216

Open levianye opened 8 years ago

levianye commented 8 years ago

I meet such an issue that I want to display label in X axis under each bar,when I zoom in the barchart ,those label display duplicate!how can I fixed it? how do I rewrite AxisValueFormatter to make it work? here is the comparison result s60901-155131 1 s60901-155147 1 besides I want display labels in the middle of the chart, now it just display in the left edge of each bar

shohiebsense commented 8 years ago

same here.. +1

AbdulSalamAli0018 commented 7 years ago

same here . did you get any work around ?

iad24 commented 7 years ago

same here. it also happens when u setScaleMinima. Any updates on this?

ChaMinGyu commented 6 years ago

/**

  • Set a minimum interval for the axis when zooming in. The axis is not allowed to go below
  • that limit. This can be used to avoid label duplicating when zooming in.
  • @param granularity */ public void setGranularity(float granularity) { mGranularity = granularity; // set this to true if it was disabled, as it makes no sense to call this method with granularity disabled mGranularityEnabled = true; }

Please check this section. "This can be used to avoid label duplicating when zooming in." You can use it. xaxis.setGranularity(1f);

kamilj commented 6 years ago

Any solution for 2.2.x?

poojalivin commented 3 years ago

Same issue here.. any solution?