當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript range1d.Range1d類代碼示例

本文整理匯總了TypeScript中@bokehjs/models/ranges/range1d.Range1d的典型用法代碼示例。如果您正苦於以下問題:TypeScript Range1d類的具體用法?TypeScript Range1d怎麽用?TypeScript Range1d使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了Range1d類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: it

 it("should execute update callback once", () => {
   const cb = new CustomJS()
   const r = new Range1d({callback: cb})
   const spy = sinon.spy(cb, "execute")
   r.reset()
   expect(spy.calledOnce).to.be.true
 })
開發者ID:digitalsatori,項目名稱:Bokeh,代碼行數:7,代碼來源:range1d.ts

示例2: it

 it("should have values as function args", () => {
   const rng = new Range1d()
   const r = new CustomJSHover({args: {foo: rng.ref()}, code: "return 10"})
   const f = new Function("foo", "value", "format", "special_vars", "require", "exports", "'use strict';\nreturn 10")
   const formatter = r._make_code("value", "format", "special_vars", r.code)
   expect(formatter.toString()).to.be.equal(f.toString())
 })
開發者ID:digitalsatori,項目名稱:Bokeh,代碼行數:7,代碼來源:customjs_hover.ts

示例3: it

 it("should have values as function args", () => {
   const rng = new Range1d()
   const filter = new CustomJSFilter({args: {foo: rng.ref()}, code: "return 10", use_strict: true})
   const f = new Function("foo", "source", "require", "exports", "'use strict';\nreturn 10")
   expect(filter.func.toString()).to.be.equal(f.toString())
 })
開發者ID:digitalsatori,項目名稱:Bokeh,代碼行數:6,代碼來源:customjs_filter.ts

示例4: it

 it("should have values as function args", () => {
   const rng = new Range1d()
   formatter.args = {foo: rng.ref()}
   const func = new Function("tick", "index", "ticks", "foo", "require", "exports", "'use strict';\nreturn 10")
   expect(formatter._make_func().toString()).to.be.equal(func.toString())
 })
開發者ID:digitalsatori,項目名稱:Bokeh,代碼行數:6,代碼來源:func_tick_formatter.ts


注:本文中的@bokehjs/models/ranges/range1d.Range1d類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。