facioquo/stock-charts

chart: use window size to determine number of candles to show

DaveSkender opened this issue · 0 comments

  • fetch multiple timeframe data (size of bars, daily, hourly, etc)
  • allow users to pick timeframe
  • calculate optimal bars per screen width + maintain aspect ratio
  • update API to recalc with value on resize, after delay to avoid race condition collisions or consider an in memory simple serialized message queue
  • add custom axis date labels for each timeframe
  • ~5px per bar is optimal (verify, for barsShown = self.innerWidth/5;)

Refs:
https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth
https://stackoverflow.com/questions/45350716/detecting-real-time-window-size-changes-in-angular-4
https://copyprogramming.com/howto/how-to-get-height-and-width-of-device-display-in-angular2-using-typescript