hilbert-chart-3d 0.2.1 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -54,11 +54,12 @@ new HilbertChart3D(<domElement>, { configOptions })
54
54
  | <b>data</b>([<i>array</i>]) | Getter/setter for the list of ranges to render. Each range object should follow the minimum syntax of `{start: <number or bigint>, length: <number or bigint>}`. | `[]` |
55
55
  | <b>color</b>([<i>string</i> or <i>fn</i>]) | Getter/setter for the range object color accessor function (`fn(range)`) or attribute. | (cycle through d3.schemeCategory20 for unique labels) |
56
56
  | <b>label</b>([<i>string</i> or <i>fn</i>]) | Getter/setter for the range object label accessor function (`fn(range)`) or attribute. | `name` |
57
- | <b>labelColor</b>([<i>string</i> or <i>fn</i>]) | Getter/setter for the range object label color accessor function (`fn(range)`) or attribute. | `() => 'white'` |
57
+ | <b>labelColor</b>([<i>string</i> or <i>fn</i>]) | Getter/setter for the range object label color accessor function (`fn(range)`) or attribute. A falsy value disables the label. | `() => 'white'` |
58
58
  | <b>padding</b>([<i>number</i>, <i>string</i> or <i>fn</i>]) | Getter/setter for the range object padding ratio accessor function (`fn(range)`), attribute or a constant number for all ranges. The padding ratio should be a number between `0` and `1` representing the proportional size of the padding space compared to the width of the path. | 0 |
59
+ | <b>paddingAbsolute</b>([<i>number</i>, <i>string</i> or <i>fn</i>]) | Getter/setter for the range object absolute padding accessor function (`fn(range)`), attribute or a constant number for all ranges. The value represents the absolute padding size as a fraction of the full Hilbert width. | 0 |
59
60
  | <b>valFormatter</b>([<i>fn</i>]) | Getter/setter for the value formatting function (`fn(value)`), in default tooltips. Values may be Numbers or BigInts; should return a string. | `d => d` |
60
61
  | <b>simplifyCurves</b>([<i>boolean</i>]) | Getter/setter for whether to simplify the resolution of the curve to the most canonical 2-bit boundary that fits the range integral. For example, in a 2nd order curve (64 values), a range from 8 to 23 can be simplified from 16 vertices to 2 (each filling a cube with 8 values). This simplification greatly reduces the number of vertices in the curve and improves the calculation and rendering performance, specially for high-order ranges which tend to fall on bit boundaries. | `true` |
61
- | <b>useInstancedMeshes</b>([<i>boolean</i>]) | Getter/setter for whether to render compatible segments with [THREE.InstancedMesh](https://threejs.org/docs/#InstancedMesh) to reduce draw calls. Segments that cannot be instanced use regular meshes. | `false` |
62
+ | <b>useInstancedMeshes</b>([<i>boolean</i>]) | Getter/setter for whether to render compatible segments with [THREE.InstancedMesh](https://threejs.org/docs/#InstancedMesh) to reduce draw calls. It's recommended to enable this for very large datasets. Segments that cannot be instanced use regular meshes. | `false` |
62
63
  | <b>focusOn</b>(<i>pos</i>, <i>length</i>, [<i>ms</i>]) | Zoom-in on a particular area of the chart, defined by [`pos`, `pos+length-1`]. `pos` and `length` may be Numbers or BigInts. An optional 3rd argument defines the duration of the transition (in ms) to animate the zooming motion. A value of 0 (default) jumps immediately to the final position. ||
63
64
  | <b>zoomToFit</b>([<i>ms</i>], [<i>px</i>], [<i>nodeFilterFn</i>]) | Automatically moves the camera so that all of the hilbert segments become visible within its field of view. It accepts two optional arguments: the first defines the duration of the transition (in ms) to animate the camera motion (default: 0ms). The second argument is the amount of padding (in px) between the edge of the canvas and the outermost node location (default: 10px). | `(0, 10)` |
64
65
  | <b>tooltipContent</b>([<i>string</i> or <i>fn</i>]) | Getter/setter for the range object tooltip content accessor function or attribute. Supports plain text or HTML content. | `<label>: <start> - <end>` |
@@ -79,4 +80,3 @@ If you find this module useful and would like to support its development, you ca
79
80
  [build-size-url]: https://bundlephobia.com/result?p=hilbert-chart-3d
80
81
  [npm-downloads-img]: https://img.shields.io/npm/dt/hilbert-chart-3d
81
82
  [npm-downloads-url]: https://www.npmtrends.com/hilbert-chart-3d
82
-
@@ -32,6 +32,8 @@ declare class HilbertChart<R extends RangeBounds = Range> {
32
32
  labelColor(colorAccessor: RangeAccessor<R, string>): HilbertChart<R>;
33
33
  padding(): RangeAccessor<R, number>;
34
34
  padding(paddingAccessor: RangeAccessor<R, number>): HilbertChart<R>;
35
+ paddingAbsolute(): RangeAccessor<R, number>;
36
+ paddingAbsolute(paddingAbsoluteAccessor: RangeAccessor<R, number>): HilbertChart<R>;
35
37
  valFormatter(): NumFormatter;
36
38
  valFormatter(formatter: NumFormatter): HilbertChart<R>;
37
39
  simplifyCurves(): boolean;