d3 APIs
- min
- max
- select
- scaleTime
- pie
- extent
- event
- scaleLinear
- line
- mean
- sum
- geoPath
- geoEquirectangular
- arc
- timeFormat
- geoNaturalEarth1
- HierarchyPointNode
- geoGraticule10
- color
- geoMercator
- easeElasticOut
- easeCubicOut
- timeout
- HierarchyPointLink
- GeoPermissibleObjects
- deviation
- transition
- hierarchy
- axisBottom
- axisLeft
- mouse
- scaleBand
- range
- csv
- csvParse
- json
- interval
- Timer
- bisectLeft
- easeLinear
- interpolate
- easeExpOut
- easePolyOut
- format
- geoOrthographic
- ScaleLinear
- group
- rollup
- area
- bisector
- curveMonotoneX
- GeoPath
- D3DragEvent
- GeoProjection
- interpolateInferno
Other Related APIs
d3#bisector TypeScript Examples
The following examples show how to use
d3#bisector.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: LineChart.ts From anichart.js with MIT License | 6 votes |
private findY(area: Path2D | string, x: number) {
const l = 0;
const r = this.shape.height;
// 使用中值优化,O(n^2) -> O(log(n))
const b = bisector((d: number) => {
return canvasHelper.isPointInPath(area, x, d);
}).left;
const yRange = range(l, r, 1);
const index = b(yRange, true);
return yRange[index];
}