Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Axis refactor v13c - After multiple origo - bugfixes #631

Open
wants to merge 44 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
1eb6d02
Implement separation
schaumb Nov 17, 2024
3514412
Reset means reset + set doesn't reset
schaumb Nov 18, 2024
13d675b
Fix test
schaumb Nov 18, 2024
23d4acf
Merge remote-tracking branch 'origin/main' into axis_refactor_v12
schaumb Nov 25, 2024
ac76d52
fix review
schaumb Nov 25, 2024
c4173b0
fix axis title
schaumb Nov 25, 2024
5c5e72b
Merge branch 'axis_refactor_v11c2' into axis_refactor_v12b
schaumb Nov 26, 2024
ed974b8
Move split align sort and reverse to AxisChannelProperties
schaumb Nov 27, 2024
d3ce44d
Merge remote-tracking branch 'refs/remotes/origin/main' into axis_ref…
schaumb Nov 27, 2024
0263d8b
Merge branch 'axis_refactor_v12' into axis_refactor_v12b
schaumb Nov 27, 2024
a405f53
fix docs tests format
schaumb Nov 27, 2024
03938b8
Merge remote-tracking branch 'origin/main' into axis_refactor_v12
schaumb Nov 28, 2024
a770193
Merge branch 'axis_refactor_v12' into axis_refactor_v12b
schaumb Nov 28, 2024
d163d57
Enable split and align on main axis
schaumb Nov 29, 2024
9523302
Refresh config
schaumb Nov 29, 2024
72ef2bf
fix test hash
schaumb Nov 29, 2024
3145013
Merge branch 'main' into axis_refactor_v12
schaumb Dec 6, 2024
3fa1330
Merge branch 'axis_refactor_v12' into axis_refactor_v12b
schaumb Dec 6, 2024
8a54384
Merge branch 'axis_refactor_v12b' into axis_refactor_v12d
schaumb Dec 6, 2024
6085cd7
add union-foreach
schaumb Dec 3, 2024
23928ac
started to implement multiaxis
schaumb Dec 4, 2024
3a3ba96
Fix split chart when same dimension on main and sub axis
schaumb Dec 4, 2024
dfa7581
getMarkerBounds + merge fixes
schaumb Dec 6, 2024
95073d6
move negative split to upper
schaumb Dec 6, 2024
145694b
separate marker setSizeBy
schaumb Dec 6, 2024
cc3bd4e
Remove marker toRectangle
schaumb Dec 6, 2024
50b3b1a
clang-tidy
schaumb Dec 6, 2024
fbf039a
fix tests
schaumb Dec 6, 2024
b52a9c3
some clang-tidy + first try to purge horizontalAxis/verticalAxis
schaumb Dec 6, 2024
4694ee8
Fix testcases
schaumb Dec 6, 2024
3b99f21
add filter + BucketSeparationInfo
schaumb Dec 7, 2024
d7f8c4b
Fix align to min
schaumb Dec 8, 2024
159c07c
Normalize split chart inside addSeparation
schaumb Dec 9, 2024
735f33d
fix center align + axis + override
schaumb Dec 9, 2024
ed0b8d5
Add axis range on split chart
schaumb Dec 9, 2024
76ddb8c
Update testcases
schaumb Dec 9, 2024
6a5d92c
fix clang-format
schaumb Dec 9, 2024
53dce2b
fix tcs hash
schaumb Dec 9, 2024
cd36ede
add changelog
schaumb Dec 9, 2024
adb17ec
refactor union_foreach
schaumb Dec 11, 2024
d08012a
fix "empty" channel split, clang-tidy, fix tests
schaumb Dec 11, 2024
cfb881f
tryp-to-fix clang-format
schaumb Dec 11, 2024
dec4e97
fix clang-16 compiler
schaumb Dec 12, 2024
c71aaf3
only max+min measure ; tests
schaumb Dec 14, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
17 changes: 16 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,22 @@

- Fix invalid read/write when animation is contiguous (onFinish callback calls setKeyframe).
- Waterfall chart preset not aligned.
- Split chart count negative values too.
- Split chart count negative values too.
- Split chart handled when same dimension on main and sub axis.

### Changed

- Separate Channel properties to AxisChannel properties at config.
- Channels 'set' rewrite doesn't clear AxisChannel properties.
- Split charts
- axis line multiplication.
- axis labels multiplication.
- axis range interpretation differently for all split part.
- align center / stretch fix.

### Added

- Enable split and align on mainAxis.

## [0.16.0] - 2024-11-28

Expand Down
2 changes: 1 addition & 1 deletion docs/tutorial/align_range/01.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
chart.animate({
config: {
align: 'center',
channels: {
y: {
align: 'center',
labels: false
}
}
Expand Down
8 changes: 3 additions & 5 deletions docs/tutorial/align_range/02_b.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
chart.animate({
config: {
align: 'stretch',
channels: {
y: {
labels: true
}
y: {
align: 'stretch',
labels: true
}
}
})
4 changes: 3 additions & 1 deletion docs/tutorial/align_range/03_b.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
chart.animate({
config: {
align: 'none'
y: {
align: 'none'
}
}
})
2 changes: 1 addition & 1 deletion docs/tutorial/orientation_split_polar/02_b.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
chart.animate({
config: {
split: true
x: { split: true }
}
})
2 changes: 1 addition & 1 deletion docs/tutorial/orientation_split_polar/03_b.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
chart.animate({
config: {
split: false
x: { split: false }
}
})
4 changes: 3 additions & 1 deletion docs/tutorial/shorthands_store/01.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
chart.animate({
// config: {
align: 'stretch'
y: {
align: 'stretch'
}
// }
})
6 changes: 3 additions & 3 deletions docs/tutorial/shorthands_store/03_b.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ chart
},
// y: { detach: [ 'Kinds' ] },
y: {
detach: 'Kinds'
detach: 'Kinds',
align: 'none'
}
},
align: 'none'
}
})
.activated.then((control) => {
animation = control.store()
Expand Down
7 changes: 5 additions & 2 deletions docs/tutorial/shorthands_store/08.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@ chart.animate(
style: null,
config: {
title: 'Store function',
align: 'stretch',

channels: {
y: ['Popularity', 'Kinds'],
y: {
set: ['Popularity', 'Kinds'],
align: 'stretch'
},
x: ['Genres'],
label: ['Popularity']
},
Expand Down
6 changes: 4 additions & 2 deletions docs/tutorial/shorthands_store/09.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ chart.animate({
style: null,
config: {
title: 'Store function',
align: 'stretch',
channels: {
y: ['Popularity', 'Kinds'],
y: {
set: ['Popularity', 'Kinds'],
align: 'stretch'
},
x: ['Genres'],
label: ['Popularity']
},
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorial/sorting/01.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
chart.animate({
config: {
sort: 'byValue'
x: { sort: 'byValue' }
}
})
2 changes: 1 addition & 1 deletion docs/tutorial/sorting/02_b.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
chart.animate({
config: {
reverse: true
x: { reverse: true }
}
})
6 changes: 4 additions & 2 deletions docs/tutorial/sorting/03_b.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
chart.animate({
config: {
sort: 'none',
reverse: false
x: {
sort: 'none',
reverse: false
}
}
})
58 changes: 22 additions & 36 deletions src/apps/weblib/ts-api/plugins/presetconfigs.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,18 @@ export const presetConfigs = {
splittedColumn: {
channels: {
x: { set: [{ name: 'x' }] },
y: { set: [{ name: 'y' }, { name: 'splittedBy' }] },
y: { set: [{ name: 'y' }, { name: 'splittedBy' }], split: true },
color: { set: [{ name: 'splittedBy' }] },
label: { set: [{ name: 'y' }] }
},
split: true
}
},
percentageColumn: {
channels: {
x: { set: [{ name: 'x' }] },
y: { set: [{ name: 'y' }, { name: 'stackedBy' }] },
y: { set: [{ name: 'y' }, { name: 'stackedBy' }], align: 'stretch' },
color: { set: [{ name: 'stackedBy' }] },
label: { set: [{ name: 'y' }] }
},
align: 'stretch'
}
},
waterfall: {
channels: {
Expand All @@ -59,11 +57,10 @@ export const presetConfigs = {
marimekko: {
channels: {
x: { set: [{ name: 'x' }, { name: 'groupedBy' }] },
y: { set: [{ name: 'y' }, { name: 'stackedBy' }] },
y: { set: [{ name: 'y' }, { name: 'stackedBy' }], align: 'stretch' },
color: { set: [{ name: 'stackedBy' }] },
label: { set: [{ name: 'x' }] }
},
align: 'stretch'
}
},
bar: {
channels: {
Expand All @@ -90,21 +87,19 @@ export const presetConfigs = {
},
splittedBar: {
channels: {
x: { set: [{ name: 'x' }, { name: 'splittedBy' }] },
x: { set: [{ name: 'x' }, { name: 'splittedBy' }], split: true },
y: { set: [{ name: 'y' }] },
color: { set: [{ name: 'splittedBy' }] },
label: { set: [{ name: 'x' }] }
},
split: true
}
},
percentageBar: {
channels: {
x: { set: [{ name: 'x' }, { name: 'stackedBy' }] },
x: { set: [{ name: 'x' }, { name: 'stackedBy' }], align: 'stretch' },
y: { set: [{ name: 'y' }] },
color: { set: [{ name: 'stackedBy' }] },
label: { set: [{ name: 'x' }] }
},
align: 'stretch'
}
},
lollipop: {
channels: {
Expand Down Expand Up @@ -151,58 +146,50 @@ export const presetConfigs = {
percentageArea: {
channels: {
x: { set: [{ name: 'x' }] },
y: { set: [{ name: 'y' }, { name: 'stackedBy' }] },
y: { set: [{ name: 'y' }, { name: 'stackedBy' }], align: 'stretch' },
color: { set: [{ name: 'stackedBy' }] }
},
align: 'stretch',
geometry: 'area'
},
splittedArea: {
channels: {
x: { set: [{ name: 'x' }] },
y: { set: [{ name: 'y' }, { name: 'splittedBy' }] },
y: { set: [{ name: 'y' }, { name: 'splittedBy' }], split: true },
color: { set: [{ name: 'splittedBy' }] }
},
split: true,
geometry: 'area'
},
stream: {
channels: {
x: { set: [{ name: 'x' }] },
y: { set: [{ name: 'y' }, { name: 'stackedBy' }] },
y: { set: [{ name: 'y' }, { name: 'stackedBy' }], align: 'center' },
color: { set: [{ name: 'stackedBy' }] }
},
geometry: 'area',
align: 'center'
geometry: 'area'
},
verticalStream: {
channels: {
x: { set: [{ name: 'x' }, { name: 'stackedBy' }] },
x: { set: [{ name: 'x' }, { name: 'stackedBy' }], align: 'center' },
y: { set: [{ name: 'y' }] },
color: { set: [{ name: 'stackedBy' }] }
},
geometry: 'area',
align: 'center'
geometry: 'area'
},
violin: {
channels: {
x: { set: [{ name: 'x' }] },
y: { set: [{ name: 'y' }, { name: 'splittedBy' }] },
y: { set: [{ name: 'y' }, { name: 'splittedBy' }], align: 'center', split: true },
color: { set: [{ name: 'splittedBy' }] }
},
geometry: 'area',
align: 'center',
split: true
geometry: 'area'
},
verticalViolin: {
channels: {
x: { set: [{ name: 'x' }, { name: 'splittedBy' }] },
x: { set: [{ name: 'x' }, { name: 'splittedBy' }], align: 'center', split: true },
y: { set: [{ name: 'y' }] },
color: { set: [{ name: 'splittedBy' }] }
},
geometry: 'area',
align: 'center',
split: true
geometry: 'area'
},
line: {
channels: {
Expand Down Expand Up @@ -280,13 +267,12 @@ export const presetConfigs = {
},
nestedDonut: {
channels: {
x: { set: [{ name: 'angle' }, { name: 'stackedBy' }] },
x: { set: [{ name: 'angle' }, { name: 'stackedBy' }], align: 'stretch' },
y: { set: [{ name: 'radius' }], range: { min: '-50%' } },
color: { set: [{ name: 'stackedBy' }] },
label: { set: [{ name: 'angle' }] }
},
coordSystem: 'polar',
align: 'stretch'
coordSystem: 'polar'
},
polarScatter: {
channels: {
Expand Down
Loading