Skip to content

Instantly share code, notes, and snippets.

@prabakarviji
Created May 2, 2020 09:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prabakarviji/e1b00c95f50624d9e809a48c7b2c836b to your computer and use it in GitHub Desktop.
Save prabakarviji/e1b00c95f50624d9e809a48c7b2c836b to your computer and use it in GitHub Desktop.
let oldRange = CPTPlotRange(locationDecimal: CPTDecimalFromDouble(Double(range)), lengthDecimal: CPTDecimalFromDouble(Double(maxDataPoints-2)))
let newRange = CPTPlotRange(locationDecimal: CPTDecimalFromDouble(Double(location)), lengthDecimal: CPTDecimalFromDouble(Double(maxDataPoints-2)))
CPTAnimation.animate(plotSpace, property: "xRange", from: oldRange, to: newRange, duration:0.3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment