1

I've been working with Androidplot library for generating line plots and be able to do zoom and pan, so I'm using a modified version of XYPlotZoomPan class.

My current chart is showing some values per day, in a range of dates, so if I'm showing 7 days the domain axis is readable but if I'm trying to show 30 days it turns into a mess.

My goal is to show 7 days and have the option of scrolling through the rest of the chart that is not shown.

The only function that handles boundaries is setDomainBoundaries, currently I've tried this:

  setDomainBoundaries(min, max, BoundaryMode.FIXED);

But it lets me show values inside this range and I'm loosing the ability for panning through the rest of the days.

Does someone have an a idea how I can do that? Thanks.

StuartLC
  • 104,537
  • 17
  • 209
  • 285

1 Answers1

0

You can create your own domain value format with myplot.setDomainValueFormat(Format f). From here you can create your own formatter.

Another option you can look at is setDomainStep, a good example of that can be found here

Community
  • 1
  • 1
buczek
  • 2,011
  • 7
  • 29
  • 40
  • @emanzanomarcos I have the same problem as you. How did this suggestion help? It doesn't seem to have anything to do with panning. – Ethan Holshouser Jul 16 '14 at 18:45
  • I needed to reduce the number of points on domain axis so with setDomainStep you can do it, but I can't remember how I could scroll horizontally through the chart. Sorry but I've lost the code of that project. I think I disabled vertical zoom and set a fixed horizontal zoom value programatically. – emanzanomarcos Jul 17 '14 at 10:36