SetPanLimits () with dates in the Achartengine axis

I have a graph where the information on the x axis is dates. I want to limit the pan, but I don't know how to do this with dates!

I found this question, but there is no answer yet!

AChartEngine Marked Tags

Thanks!

Solution: I did it very ugly, so if anyone comes out with a better idea, I will be happy to hear. What I've done:

double[] limits = new double[] {xMin-(81300000 *3),xMax+(81300000 *3),yMin,yMax}; 

Thus, I limit it to three days before and after my first and last date.

+4
source share
1 answer

This is the decision that I made too. Just set the static end double at the top of the action graph.

 private static final double THREEDAYS = 86400000 *3; 

then

 double[] limits = new double[] {xMin-THREEDAYS ,xMax+THREEDAYS ,yMin,yMax}; 
+3
source

Source: https://habr.com/ru/post/1395444/


All Articles