11import './polyfills.js'
22
3- import { IntervalWorkerPool } from './samplers/interval_worker_pool.js'
43import { FunctionPlotOptions } from './types.js'
5- import { Chart , ChartMeta , ChartMetaMargin } from './chart.js'
4+ import { Chart , ChartMeta , ChartMetaMargin , withWebWorkers } from './chart.js'
65
76import globals from './globals.mjs'
87import { interval , polyline , scatter , text } from './graph-types/index.js'
9- import { Mark } from './graph-types/mark.js'
10- import { interval as intervalEval , builtIn as builtInEval , registerSampler } from './samplers/eval.mjs'
8+ import { interval as intervalSampler , builtIn as builtInSampler } from './samplers/eval.mjs'
119
12- function withWebWorkers ( nWorkers = 8 , WorkerConstructor = window . Worker , publicPath = window . location . href ) {
13- // @ts -ignore
14- window . __webpack_public_path__ = publicPath
15- globals . workerPool = new IntervalWorkerPool ( nWorkers , WorkerConstructor )
16- }
10+ declare const __COMMIT_HASH__ : string
11+ functionPlot . version = __COMMIT_HASH__
1712
1813/**
1914 * functionPlot is a function plotter of 2d functions.
2015 *
2116 * functionPlot creates an instance of {@link Chart} with the param options
22- * and immediately calls {@link Chart#build } on it.
17+ * and immediately calls {@link Chart#plot } on it.
2318 *
2419 * `options` is augmented with additional internal computed data,
2520 * therefore, if you want to rerender graphs it's important to reuse
@@ -36,30 +31,30 @@ export default function functionPlot(options: FunctionPlotOptions) {
3631 return instance . plot ( )
3732}
3833
39- declare const __COMMIT_HASH__ : string
40- functionPlot . version = __COMMIT_HASH__
4134functionPlot . globals = globals
42- functionPlot . $eval = {
43- builtIn : builtInEval ,
44- interval : intervalEval
45- }
4635functionPlot . withWebWorkers = withWebWorkers
4736
48- functionPlot . text = text
37+ functionPlot . builtInSampler = builtInSampler
38+ functionPlot . intervalSampler = intervalSampler
39+
4940functionPlot . interval = interval
5041functionPlot . polyline = polyline
5142functionPlot . scatter = scatter
43+ functionPlot . text = text
5244
5345export * from './types.js'
54- export { Chart , ChartMeta , ChartMetaMargin }
5546export { withWebWorkers }
56- export { registerSampler }
57- export { Mark }
58- export { builtIn as EvalBuiltIn , interval as EvalInterval } from './samplers/eval.mjs'
47+ export { Chart , ChartMeta , ChartMetaMargin }
5948export {
60- interval as GraphTypeInterval ,
61- polyline as GraphTypePolyline ,
62- scatter as GraphTypeScatter ,
63- text as GraphTypeText
49+ interval as IntervalGraph ,
50+ Interval ,
51+ polyline as PolylineGraph ,
52+ Polyline ,
53+ scatter as ScatterGraph ,
54+ Scatter ,
55+ text as TextGraph ,
56+ Text ,
57+ Mark ,
58+ Attr
6459} from './graph-types/index.js'
65- export { GraphTypePlotter , GraphTypeBuilder } from './graph-types/types.js '
60+ export { builtIn as BuiltInSampler , interval as IntervalSampler , registerSampler } from './samplers/eval.mjs '
0 commit comments