Skip to content

Commit 43e0f30

Browse files
committed
Merge branch 'main' into veghdev
2 parents dd8bc8f + 3481fea commit 43e0f30

File tree

60 files changed

+2957
-1419
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+2957
-1419
lines changed

.eslintrc.json

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
{
2+
"env": {
3+
"browser": true,
4+
"es2021": true
5+
},
6+
"extends": "eslint:recommended",
7+
"parserOptions": {
8+
"ecmaVersion": 12,
9+
"sourceType": "module"
10+
},
11+
"rules": {
12+
"no-tabs": 2,
13+
"no-cond-assign": 2,
14+
"no-console": 1,
15+
"no-constant-condition": 1,
16+
"no-control-regex": 1,
17+
"no-debugger": 1,
18+
"no-dupe-keys": 2,
19+
"no-empty": 2,
20+
"no-empty-character-class": 2,
21+
"no-ex-assign": 2,
22+
"no-extra-boolean-cast": 1,
23+
"no-extra-semi": 1,
24+
"no-func-assign": 2,
25+
"no-inner-declarations": 2,
26+
"no-invalid-regexp": 2,
27+
"no-irregular-whitespace": 2,
28+
"no-negated-in-lhs": 2,
29+
"no-obj-calls": 2,
30+
"no-regex-spaces": 1,
31+
"no-sparse-arrays": 2,
32+
"no-unreachable": 2,
33+
"use-isnan": 1,
34+
"valid-typeof": 2,
35+
36+
"consistent-return": 1,
37+
"curly": [1, "all"],
38+
"dot-notation": 1,
39+
"eqeqeq": [2, "smart"],
40+
"guard-for-in": 1,
41+
"no-alert": 1,
42+
"no-caller": 1,
43+
"no-div-regex": 1,
44+
"no-else-return": 1,
45+
"no-eq-null": 1,
46+
"no-eval": 2,
47+
"no-extend-native": 1,
48+
"no-extra-bind": 1,
49+
"no-fallthrough": 1,
50+
"no-floating-decimal": 0,
51+
"no-implied-eval": 2,
52+
"no-iterator": 1,
53+
"no-labels": 1,
54+
"no-lone-blocks": 2,
55+
"no-loop-func": 1,
56+
"no-multi-spaces": 1,
57+
"no-multi-str": 1,
58+
"no-native-reassign": 2,
59+
"no-new": 2,
60+
"no-new-func": 2,
61+
"no-new-wrappers": 2,
62+
"no-octal": 1,
63+
"no-octal-escape": 1,
64+
"no-proto": 1,
65+
"no-redeclare": 1,
66+
"no-return-assign": 1,
67+
"no-script-url": 1,
68+
"no-self-compare": 2,
69+
"no-sequences": 1,
70+
"no-unused-expressions": 0,
71+
"no-void": 1,
72+
"no-warning-comments": 0,
73+
"no-with": 2,
74+
"radix": 2,
75+
"vars-on-top": 0,
76+
"wrap-iife": [2, "any"],
77+
"yoda": 0,
78+
79+
"global-strict": 0,
80+
"strict": 1,
81+
82+
"no-catch-shadow": 1,
83+
"no-delete-var": 2,
84+
"no-label-var": 2,
85+
"no-shadow": 1,
86+
"no-shadow-restricted-names": 2,
87+
"no-undef": 2,
88+
"no-undefined": 1,
89+
"no-undef-init": 1,
90+
"no-unused-vars": 1,
91+
"no-use-before-define": 1,
92+
93+
"brace-style": 0,
94+
"camelcase": 0,
95+
"comma-spacing": 0,
96+
"comma-style": [1, "last"],
97+
"consistent-this": 0,
98+
"eol-last": 1,
99+
"func-names": 0,
100+
"func-style": 0,
101+
"key-spacing": 0,
102+
"max-nested-callbacks": 0,
103+
"new-parens": 2,
104+
"no-array-constructor": 2,
105+
"no-lonely-if": 1,
106+
"no-mixed-spaces-and-tabs": 1,
107+
"no-nested-ternary": 0,
108+
"no-new-object": 2,
109+
"semi-spacing": [1, { "before": false, "after": true }],
110+
"no-spaced-func": 1,
111+
"no-ternary": 0,
112+
"no-trailing-spaces": 1,
113+
"no-multiple-empty-lines": 0,
114+
"no-underscore-dangle": 0,
115+
"one-var": 0,
116+
"padded-blocks": 0,
117+
"quotes": 0,
118+
"quote-props": [1, "as-needed"],
119+
"semi": [2, "always"],
120+
"sort-vars": 0,
121+
"space-after-keywords": 0,
122+
"space-before-blocks": 0,
123+
"space-in-brackets": 0,
124+
"space-in-parens": 0,
125+
"space-infix-ops": 0,
126+
"space-unary-ops": 1,
127+
"spaced-line-comment": 0,
128+
"wrap-regex": 0
129+
}
130+
}

.prettierrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"printWidth": 80
3+
}

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22

33
## [Unreleased]
44

5+
### Added
6+
7+
- animate() method returns an animation control object,
8+
animation control methods are chainable.
9+
10+
### Fixed
11+
12+
- Marker label fade-in/fade-out fixed, values are interpolated only if measure
13+
is not changed on label channel.
14+
515
## [0.3.3] - 2021-10-17
616

717
### Fixed

ci/cloudbuild/vizzu-devenv-prebuild-docker.yaml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,44 @@
11
steps:
2-
- name: vizzu/vizzu-devenv:v0.3.x
2+
- name: vizzu/vizzu-devenv:v0.4.x
33
args:
44
- mkdir
55
- '-p'
66
- /workspace/build/cmake-desktop
77
id: desktop_mkdirBuildFolder
88
waitFor:
99
- '-'
10-
- name: vizzu/vizzu-devenv:v0.3.x
10+
- name: vizzu/vizzu-devenv:v0.4.x
1111
args:
1212
- cmake
1313
- ../../project/cmake/
1414
dir: /workspace/build/cmake-desktop
1515
id: desktop_cmake
1616
waitFor:
1717
- desktop_mkdirBuildFolder
18-
- name: vizzu/vizzu-devenv:v0.3.x
18+
- name: vizzu/vizzu-devenv:v0.4.x
1919
args:
2020
- make
2121
dir: /workspace/build/cmake-desktop
2222
id: desktop_make
2323
waitFor:
2424
- desktop_cmake
2525
timeout: 1800s
26-
- name: vizzu/vizzu-devenv:v0.3.x
26+
- name: vizzu/vizzu-devenv:v0.4.x
2727
args:
2828
- ./vizzutest
2929
dir: /workspace/build/cmake-desktop/test
3030
id: test_desktopUnit
3131
waitFor:
3232
- desktop_make
33-
- name: vizzu/vizzu-devenv:v0.3.x
33+
- name: vizzu/vizzu-devenv:v0.4.x
3434
args:
3535
- mkdir
3636
- '-p'
3737
- /workspace/build/cmake-wasm
3838
id: wasm_mkdirBuildFolder
3939
waitFor:
4040
- '-'
41-
- name: vizzu/vizzu-devenv:v0.3.x
41+
- name: vizzu/vizzu-devenv:v0.4.x
4242
args:
4343
- /root/emsdk/upstream/emscripten/emcmake
4444
- cmake
@@ -47,31 +47,31 @@ steps:
4747
id: wasm_cmake
4848
waitFor:
4949
- wasm_mkdirBuildFolder
50-
- name: vizzu/vizzu-devenv:v0.3.x
50+
- name: vizzu/vizzu-devenv:v0.4.x
5151
args:
5252
- make
5353
dir: /workspace/build/cmake-wasm
5454
id: wasm_make
5555
waitFor:
5656
- wasm_cmake
5757
timeout: 1800s
58-
- name: vizzu/vizzu-devenv:v0.3.x
58+
- name: vizzu/vizzu-devenv:v0.4.x
5959
args:
6060
- node
6161
- vizzutest.js
6262
dir: /workspace/build/cmake-wasm/test
6363
id: test_wasmUnit
6464
waitFor:
6565
- wasm_make
66-
- name: vizzu/vizzu-devenv:v0.3.x
66+
- name: vizzu/vizzu-devenv:v0.4.x
6767
args:
6868
- npm
6969
- install
7070
dir: /workspace/project/js
7171
id: wasm_js_npmInstall
7272
waitFor:
7373
- wasm_make
74-
- name: vizzu/vizzu-devenv:v0.3.x
74+
- name: vizzu/vizzu-devenv:v0.4.x
7575
args:
7676
- npm
7777
- run
@@ -84,7 +84,7 @@ steps:
8484
args:
8585
- build
8686
- '--build-arg'
87-
- 'TAG=v0.3.x'
87+
- 'TAG=v0.4.x'
8888
- '-t'
8989
- 'gcr.io/vizzu-ci/github.com/vizzuhq/vizzu-jsunittest-cloudbuild:$BRANCH_NAME'
9090
- '-f'
@@ -97,7 +97,7 @@ steps:
9797
args:
9898
- build
9999
- '--build-arg'
100-
- 'TAG=v0.3.x'
100+
- 'TAG=v0.4.x'
101101
- '-t'
102102
- 'gcr.io/vizzu-ci/github.com/vizzuhq/vizzu-test-cloudbuild:$BRANCH_NAME'
103103
- '-f'
@@ -108,7 +108,7 @@ steps:
108108
- test_jsUnit
109109
- test_desktopUnit
110110
- test_wasmUnit
111-
- name: vizzu/vizzu-devenv:v0.3.x
111+
- name: vizzu/vizzu-devenv:v0.4.x
112112
args:
113113
- '-c'
114114
- |-

ci/docker/vizzu-devenv-wasm-desktop

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ FROM vizzu/vizzu-devenv-wasm:$TAG
1010
RUN apt-get update; \
1111
apt-get -y install g++-10
1212
RUN wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -; \
13-
add-apt-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-12 main"; \
13+
add-apt-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-13 main"; \
1414
apt-get update; \
15-
apt-get -y install clang-12 clang-tools-12 lldb-12 lld-12 clang-tidy-12 clang-format-12; \
16-
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-12 120; \
17-
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-12 120; \
18-
update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-12 120
15+
apt-get -y install clang-13 clang-tools-13 lldb-13 lld-13 clang-tidy-13 clang-format-13; \
16+
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-13 120; \
17+
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-13 120; \
18+
update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-13 120

ci/docker/vizzu-test-cloudbuild

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key
1515
ADD . /workspace/
1616
WORKDIR /workspace/test/integration
1717
RUN npm install
18-
RUN node vizzutest.js -r DISABLED -u /example/lib/vizzu.min.js
18+
RUN node test.js --vizzu /example/lib/vizzu.min.js --images DISABLED --hashes DISABLED --nologs

docs/content/tutorial/15-animcontrol.md

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,24 @@ progress and seeks back to 25% of progress, then restarts the animation from
77
there.
88

99
```javascript { "title": "Jumping from 75% to 25% progress during the animation" }
10+
let animation = chart.animate({
11+
config: {
12+
channels: {
13+
x: { attach: ['Types'] },
14+
y: { detach: ['Types'] }
15+
}
16+
}
17+
});
18+
1019
function onUpdate(event) {
1120
if (event.data.progress > 0.75) {
12-
chart.animation.pause();
21+
animation.pause();
1322
chart.off('update', onUpdate);
1423
setTimeout(() => {
15-
chart.animation.seek('25%');
16-
chart.animation.play();
24+
animation.seek('25%').play();
1725
}, 1000);
1826
}
1927
};
2028

2129
chart.on('update', onUpdate);
22-
23-
chart.animate({
24-
config: {
25-
channels: {
26-
x: { attach: ['Types'] },
27-
y: { detach: ['Types'] }
28-
}
29-
}
30-
})
3130
```

docs/generator/index.in.html

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
<ul id='toc-tutorial' class='submenu'>
6868
<li id="submenuitem-1.0" class="submenuitem">Static Charts</li>
6969
<li id="submenuitem-1.1" class="submenuitem">Animated Charts</li>
70+
<li id="submenuitem-1.2" class="submenuitem">Stories</li>
7071
</ul>
7172
</li>
7273
<li class="menuitem" id="menuitem-2">
@@ -94,6 +95,40 @@
9495
</div>
9596
<div id="examples-1.0" class="examples"></div>
9697
<div id="examples-1.1" class="examples"></div>
98+
99+
<div id="examples-1.2" class="examples">
100+
<div class="example" id="example-1.2.0" tabindex="0">
101+
<video class="thumbnail" id="thumbnail-1.2.0" width="320" height="180" nocontrols="" autoplay="" muted="" loop="">
102+
<source src="content/examples/stories/friends.webm" type="video/webm">
103+
<source src="content/examples/stories/friends.mp4" type="video/mp4">
104+
Your browser does not support the video tag.
105+
</video>
106+
</div>
107+
108+
<div class="example" id="example-1.2.1" tabindex="0">
109+
<video class="thumbnail" id="thumbnail-1.2.1" width="320" height="180" nocontrols="" autoplay="" muted="" loop="">
110+
<source src="content/examples/stories/cocoa.webm" type="video/webm">
111+
<source src="content/examples/stories/cocoa.mp4" type="video/mp4">
112+
Your browser does not support the video tag.
113+
</video>
114+
</div>
115+
116+
<div class="example" id="example-1.2.2" tabindex="0">
117+
<video class="thumbnail" id="thumbnail-1.2.2" width="320" height="180" nocontrols="" autoplay="" muted="" loop="">
118+
<source src="content/examples/stories/musicformats.webm" type="video/webm">
119+
<source src="content/examples/stories/musicformats.mp4" type="video/mp4">
120+
Your browser does not support the video tag.
121+
</video>
122+
</div>
123+
124+
<div class="example" id="example-1.2.3" tabindex="0">
125+
<video class="thumbnail" id="thumbnail-1.2.3" width="320" height="180" nocontrols="" autoplay="" muted="" loop="">
126+
<source src="content/examples/stories/chernobyl.webm" type="video/webm">
127+
<source src="content/examples/stories/chernobyl.mp4" type="video/mp4">
128+
Your browser does not support the video tag.
129+
</video>
130+
</div>
131+
</div>
97132
</div>
98133

99134
<div id="page-2" class="page">

docs/script/examples/examples.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ export default class Examples
6060

6161
this.title.innerHTML =
6262
this.actSubpage == '1.0' ? 'Static Charts' :
63-
this.actSubpage == '1.1' ? 'Animated Charts': '';
63+
this.actSubpage == '1.1' ? 'Animated Charts':
64+
this.actSubpage == '1.2' ? 'Stories' : '';
6465

6566
this.backButton.style.display = 'none';
6667
this.exampleView.style.display = 'none';
@@ -124,8 +125,14 @@ export default class Examples
124125
}
125126
else
126127
{
127-
htmlFilename = thumbnail.getElementsByTagName("source")[0]
128-
.src.replace('webm','html');
128+
let section = (new DocId(id)).getSectionId();
129+
130+
if (section === '1.2')
131+
htmlFilename = thumbnail.getElementsByTagName("source")[0]
132+
.src.replace('.webm','/index.html');
133+
else
134+
htmlFilename = thumbnail.getElementsByTagName("source")[0]
135+
.src.replace('webm','html');
129136
}
130137

131138
this.page.scroll(0,0);

0 commit comments

Comments
 (0)