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

后端 未结 1 754
别那么骄傲
别那么骄傲 2021-01-25 07:28

Note from maintainers: Support for Coffeescript is deprecated and will be removed in Bokeh 2.0.



The other day, I asked about how to

相关标签:
1条回答
  • 2021-01-25 08:08

    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)
    

    0 讨论(0)
提交回复
热议问题