@plotdb/chart 3.4.0 → 3.6.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 +30 -0
- package/bundle.css +59 -0
- package/bundle.js +4545 -0
- package/bundle.min.css +1 -0
- package/bundle.min.js +1 -0
- package/index.js +32 -10
- package/index.min.js +1 -1
- package/package.json +1 -1
- package/utils/anim.js +428 -0
- package/utils/anim.min.js +1 -0
- package/utils/brush.js +304 -0
- package/utils/brush.min.js +1 -0
- package/utils/debounce.js +86 -0
- package/utils/debounce.min.js +1 -0
- package/utils/format.js +266 -5
- package/utils/format.min.js +1 -1
- package/utils/legend.js +71 -3
- package/utils/legend.min.js +1 -1
- package/utils/scale.js +228 -0
- package/utils/scale.min.js +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
# Change Logs
|
|
2
2
|
|
|
3
|
+
## v3.6.0
|
|
4
|
+
|
|
5
|
+
- core no longer depends on d3 or `ld$`: hover detection uses the internal `parent` helper.
|
|
6
|
+
- format: `chart.utils.format` works without d3. it still uses `d3.format` when d3 is present
|
|
7
|
+
( so host locale overrides keep working ), otherwise falls back to a port of d3-format 3.1.2
|
|
8
|
+
( en-US locale ), exposed as `format._d3f`. `format.d3(spec)` is available as the entry point.
|
|
9
|
+
- add `chart.utils.anim`: tween + controllable clock replacing d3-transition. `realtime` follows
|
|
10
|
+
requestAnimationFrame; `manual` only advances on `step(dt)` / `seek(t)` and applies tweens
|
|
11
|
+
synchronously, so frames can be captured one by one for recording. also `anim.join` for a
|
|
12
|
+
minimal keyed data join. each chart instance gets `@anim` when this util is loaded.
|
|
13
|
+
- add `chart.utils.scale` ( `linear` / `band` / `ticks`, ported from d3-scale ), `chart.utils.brush`
|
|
14
|
+
( 1D brush, same DOM as d3-brush ) and `chart.utils.debounce` ( compatible with
|
|
15
|
+
`@loadingio/debounce.js` ).
|
|
16
|
+
- `mod.tick` now receives `(t, dt)`. `dt` is the time since the previous tick, `0` on the first
|
|
17
|
+
tick and on `anim.seek`. while `anim` is manual, the animation loop follows its clock.
|
|
18
|
+
- add `dist/bundle.js` / `bundle.css` ( and minified ): core + all utils in one file with built-in
|
|
19
|
+
debounce, no d3 needed. works when loaded through `@plotdb/rescope`.
|
|
20
|
+
- web: add `/editor/`, a sample editor that plays a keyframe timeline and exports it as video.
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
## v3.5.0
|
|
24
|
+
|
|
25
|
+
- legend: "select all / select none" text is now translated instead of hard-coded Chinese.
|
|
26
|
+
it uses the `i18n` / `t` constructor options if given, otherwise `block.i18n.module` from
|
|
27
|
+
`@plotdb/block`, so existing blocks follow the page language without changes. built-in
|
|
28
|
+
resources ( `en`, `zh-TW`, `zh-CN`, `ja` ) are in `chart.utils.legend.i18n` and are added under
|
|
29
|
+
the `@plotdb/chart.legend` namespace. legend re-renders on `languageChanged`.
|
|
30
|
+
- legend: add `destroy()` to stop listening to language change.
|
|
31
|
+
|
|
32
|
+
|
|
3
33
|
## v3.4.0
|
|
4
34
|
|
|
5
35
|
- axis: `label.strategy: ends` no longer insists on perfectly equal gaps. keeping both ends
|
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
|
+
}
|