How to specify n-th ticker for bokeh plot from python side, where n is the number of tickers

ぐ巨炮叔叔 提交于 2019-12-02 05:27:53

Unless I am mistaken, you only need to access nth as an instance variable, by putting this. in front of it.

Edit: You also need to use the "fat arrow" => in your filter, so that this is properly bound (otherwise this is undefined in that context).

ticks.major = ticks.major.filter((element, index) => index % this.nth == 0)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!