2

I'm using the ios-charts library and I have a LineChart View that has x values that are dates from every weekday of this year. On the y-axis I have values between 0 and 25.

I would like to zoom in on different intervals on the LineChart View. For example only show Data for week X one time and later change to show data for three months, etc etc.

I did not find anything in the documentation on how to do this. I used the "zoom" function with out any success.

(Example : Zoom and show the last 20 days on the x axis or zoom and show the last three months)

Has someone does this before?

rmaddy
  • 314,917
  • 42
  • 532
  • 579
Peep
  • 430
  • 4
  • 13

1 Answers1

0

It's a tough question and very advanced control. I guess you need to read carefully about the code, focusing on moveViewToX, and the logic and functions in ChartTransformer. Combining some tricks and calculations, you may find a way to fine-grainedly controll what you want to display.

Also, there is a property:

/// the maximum number of entried to which values will be drawn
internal var _maxVisibleValueCount = 100

may also help you.

Wingzero
  • 9,644
  • 10
  • 39
  • 80