Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strike> I'm not 100% sure but here goes a shot.</p> <p>First you seems to use a deprecated method addTextLabel when current suggested is addXTextLabel.</p> <p>Secondly you set setXLabels(0); with seems odd as you are going to have more then 0 XLabels also unsure how this will work with the depreciated method used.</p> <p>Thirdly I think the X value in the addTextLabel are actually, a position not a bar index.</p> <p>I'm no expert in neither aChartEngine or have time to test your code just now. I will do some testing later tonight and edit this answer with the result. If no other answer helps you. </strike></p> <p>(edit)</p> <p>After testing your code I get this result:</p> <p><img src="https://i.stack.imgur.com/NvMVS.png" alt="labels after inserting"></p> <p>This is a problem that is solvable in 3 ways:</p> <ul> <li>Reduce the number of labels, e.g. only printing ever other.</li> <li>Use a smaller font size for the labels, I think this will be hard in this case, as I think the readability will suffer greatly.</li> <li>Try to make the axis longer by e.g. removing the labels on the other axis. I guess you want to show labels for the amount there so not useful here.</li> </ul> <p>I have made a very simple and naive implementation of skipping ever other as I think that is the most useful solution here.</p> <pre><code>for(int axis=1;axis&lt;=31;axis++) { if(axis%2 == 1){ String d; d=String.valueOf(axis); renderer.addTextLabel(axis,d); } } </code></pre> <p>The result looks like this:</p> <p><img src="https://i.stack.imgur.com/GFD6L.png" alt="enter image description here"></p> <p>Hope this helps!</p> <p>(edit again)</p> <p>New understanding of the question the above is still correct but here is the answer to the question as I under stand it now.</p> <p>To get pan to work you need to have pan enabled (already done in this question) and then set xAxisMax to something less then the length of the dataset. In this example it's easiest to just set it to e.g. 15f this is done like this:</p> <pre><code>renderer.setXAxisMax(15.0f); </code></pre> <p>Hope this is what you wanted.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload