@plotdb/chart 3.5.0 → 3.7.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,41 @@
1
1
  # Change Logs
2
2
 
3
+ ## v3.7.0
4
+
5
+ - add `chart.utils.shape`: `arc` ( padAngle / cornerRadius / padRadius / centroid ), `line`, `area`
6
+ and `curve.linear` / `curve.catmullRom`, ported from d3-shape with the same output ( incl. `digits` ).
7
+ - add `chart.utils.color`: `turbo`, `discrete`, `quantize` ( from d3-scale-chromatic / d3-interpolate ).
8
+ - scale: add `pow` / `sqrt` / `symlog` / `point`. continuous scales now support piecewise domain /
9
+ range, `clamp`, and color ranges ( interpolated via `anim.interpolate` ).
10
+ - anim: a function attr value is called per frame with `t` ( like `attrTween` ); `style:<name>` keys
11
+ tween inline styles, skipped when the computed style already equals the target.
12
+ color interpolation clamps alpha and outputs `rgb()` when opaque.
13
+ - anim.join: entering nodes are inserted before the next existing node in data order ( as d3's
14
+ `enter.append` ) instead of always appended, so stacking order matches d3.
15
+ - brush: only set touch related styles when the device is touchable, matching d3-brush DOM.
16
+ - add `tools/verify` and `npm run verify`: compare shape / scale / color against d3 output.
17
+
18
+
19
+ ## v3.6.0
20
+
21
+ - core no longer depends on d3 or `ld$`: hover detection uses the internal `parent` helper.
22
+ - format: `chart.utils.format` works without d3. it still uses `d3.format` when d3 is present
23
+ ( so host locale overrides keep working ), otherwise falls back to a port of d3-format 3.1.2
24
+ ( en-US locale ), exposed as `format._d3f`. `format.d3(spec)` is available as the entry point.
25
+ - add `chart.utils.anim`: tween + controllable clock replacing d3-transition. `realtime` follows
26
+ requestAnimationFrame; `manual` only advances on `step(dt)` / `seek(t)` and applies tweens
27
+ synchronously, so frames can be captured one by one for recording. also `anim.join` for a
28
+ minimal keyed data join. each chart instance gets `@anim` when this util is loaded.
29
+ - add `chart.utils.scale` ( `linear` / `band` / `ticks`, ported from d3-scale ), `chart.utils.brush`
30
+ ( 1D brush, same DOM as d3-brush ) and `chart.utils.debounce` ( compatible with
31
+ `@loadingio/debounce.js` ).
32
+ - `mod.tick` now receives `(t, dt)`. `dt` is the time since the previous tick, `0` on the first
33
+ tick and on `anim.seek`. while `anim` is manual, the animation loop follows its clock.
34
+ - add `dist/bundle.js` / `bundle.css` ( and minified ): core + all utils in one file with built-in
35
+ debounce, no d3 needed. works when loaded through `@plotdb/rescope`.
36
+ - web: add `/editor/`, a sample editor that plays a keyframe timeline and exports it as video.
37
+
38
+
3
39
  ## v3.5.0
4
40
 
5
41
  - legend: "select all / select none" text is now translated instead of hard-coded Chinese.
package/bundle.css ADDED
@@ -0,0 +1,59 @@
1
+ div[plug=layout] {
2
+ width: 100%;
3
+ height: 100%;
4
+ }
5
+ div[plug=layout] .pdl-layout {
6
+ width: 100%;
7
+ height: 100%;
8
+ }
9
+ .pdlg {
10
+ height: 100%;
11
+ width: 100%;
12
+ display: flex;
13
+ align-items: start;
14
+ justify-content: center;
15
+ flex-wrap: wrap;
16
+ }
17
+ .pdlg > div {
18
+ display: flex;
19
+ align-items: center;
20
+ line-height: 1em;
21
+ }
22
+ .pdlg > div [ld=shape] {
23
+ display: inline-block;
24
+ width: 1em;
25
+ height: 1em;
26
+ margin-right: 0.5em;
27
+ background: #999;
28
+ flex: 0 0 auto;
29
+ line-height: 1em;
30
+ }
31
+ .pdlg > div [ld=text] {
32
+ color: #999;
33
+ padding-right: 0.25em;
34
+ line-height: 1.2em;
35
+ white-space: pre;
36
+ }
37
+ .pdlg.vertical {
38
+ flex-direction: column;
39
+ align-items: start;
40
+ }
41
+ .pdlg.vertical > div {
42
+ margin-bottom: 0.5em;
43
+ }
44
+ .pdlg.vertical {
45
+ flex-direction: row;
46
+ writing-mode: vertical-lr;
47
+ text-orientation: upright;
48
+ height: 100%;
49
+ }
50
+ .pdlg.vertical > div {
51
+ writing-mode: horizontal-tb;
52
+ }
53
+ .pdlg.horizontal > div {
54
+ margin-right: 0.5em;
55
+ }
56
+ g.pdlg-g {
57
+ cursor: pointer;
58
+ transition: opacity 0.15s ease-in-out;
59
+ }