Skip to content

Commit a770193

Browse files
committed
Merge branch 'axis_refactor_v12' into axis_refactor_v12b
# Conflicts: # docs/tutorial/align_range/02_b.js # docs/tutorial/align_range/03_b.js # src/chart/options/options.cpp # test/e2e/tests/fixes/143.mjs
2 parents a405f53 + 03938b8 commit a770193

File tree

16 files changed

+124
-62
lines changed

16 files changed

+124
-62
lines changed

.github/workflows/docker-vizzu-dev-desktop.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ jobs:
2424
- name: Build and Publish
2525
run: |
2626
IMAGE="vizzu-dev-desktop"
27-
IMAGE_NAME="vizzu/$IMAGE:0.15"
27+
IMAGE_NAME="vizzu/$IMAGE:0.16"
2828
docker build -t $IMAGE_NAME -f tools/ci/docker/$IMAGE .
2929
docker push $IMAGE_NAME

.github/workflows/docker-vizzu-dev-wasm.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ jobs:
2424
- name: Build and Publish
2525
run: |
2626
IMAGE="vizzu-dev-wasm"
27-
IMAGE_NAME="vizzu/$IMAGE:0.15"
27+
IMAGE_NAME="vizzu/$IMAGE:0.16"
2828
docker build -t $IMAGE_NAME -f tools/ci/docker/$IMAGE .
2929
docker push $IMAGE_NAME

CHANGELOG.md

+28-21
Original file line numberDiff line numberDiff line change
@@ -2,43 +2,50 @@
22

33
## [Unreleased]
44

5+
### Changed
6+
7+
- Separate Channel properties to AxisChannel properties at config.
8+
- Channels 'set' rewrite doesn't clear AxisChannel properties.
9+
10+
## [0.16.0] - 2024-11-28
11+
512
### Fixed
613

714
- Fix align on fake-split charts
15+
- Drilldown on split chart is fade.
16+
- Fix aggregate on split chart.
817
- Do not interpolate hiding/showing legend
9-
- Fix aggregator interface for 'set' channel parameter:
18+
- Remove rare fantom empty marker space on scrollable legend.
19+
- Same legend with different series are not interpolated.
20+
- Different legend with same series are interpolated.
21+
- Invisible axis labels are not draw.
22+
- Fix chaotic axis labels on sorted chart with multiple dimension.
23+
- Fix dimension axis guides on sorted chart.
24+
- Fix NaN handling on axes and size measures other aggregators than sum.
25+
- Do not draw dimension axis labels when the middle of the text is off the plot.
26+
27+
### Changed
28+
29+
- Mekko charts: The main axis handled as dimension.
30+
- Change aggregator interface for 'set' channel parameter:
1031
- From now not accepted the same dimension on the same channel.
1132
- From now, it is prohibited to set multiple measure on one channel.
1233
- From now, it is prohibited to set only aggregator without series name.
1334
- Fix series parsing when aggregator comes first.
14-
- Fix disappearing dimension when aggregated dimension was already set.
15-
- Fix legend with multiple dimension duplicated markers:
35+
- Fix disappearing dimension when aggregated dimension was already set.
36+
- Change legend with multiple dimension duplicated markers:
1637
- Markers of color are never merged.
1738
- Markers of size are always merged.
1839
- Markers of lightness are only merged when labelLevel == 0.
1940
- When merge happens, the marker shows the middle value of lightness.
20-
- Remove rare fantom empty marker space on scrollable legend.
21-
- Same legend with different series are not interpolated.
22-
- Different legend with same series are interpolated.
23-
- Invisible axis labels are not draw.
24-
- Fix chaotic axis labels on sorted chart with multiple dimension.
25-
- Fix Mekko charts: The main axis handled as dimension.
26-
- LabelLevel can be used to handle measure axis as dimension axis.
27-
- Enable dimension axis ticks and interlacing.
28-
- Enable measure axis guides.
29-
- Fix dimension axis guides on sorted chart.
30-
- Fix NaN handling on axes and size measures other aggregators than sum.
31-
- Add meaning to crossing interlacing.
32-
- Do not draw dimension axis labels when the middle of the text is off the plot.
3341

3442
### Added
3543

3644
- Add spacing property for plot axis style structure.
37-
38-
### Changed
39-
40-
- Separate Channel properties to AxisChannel properties at config.
41-
- Channels 'set' rewrite doesn't clear AxisChannel properties.
45+
- LabelLevel can be used to handle measure axis as dimension axis.
46+
- Enable dimension axis ticks and interlacing.
47+
- Enable measure axis guides.
48+
- Add meaning to crossing interlacing.
4249

4350
## [0.15.0] - 2024-10-28
4451

CONTRIBUTING.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ docker run -i -t -v .:/workspace vizzu/vizzu-dev-desktop bash
7070
or you can use a specific version of the prebuilt image:
7171

7272
```sh
73-
docker run -i -t -v .:/workspace vizzu/vizzu-dev-desktop:0.15 bash
73+
docker run -i -t -v .:/workspace vizzu/vizzu-dev-desktop:0.16 bash
7474
```
7575

7676
Run the following commands to build and run the `WASM` version's development
@@ -84,7 +84,7 @@ docker run -i -t -v .:/workspace vizzu/vizzu-dev-wasm bash
8484
or you can use a specific version of the prebuilt image:
8585

8686
```sh
87-
docker run -i -t -v .:/workspace vizzu/vizzu-dev-wasm:0.15 bash
87+
docker run -i -t -v .:/workspace vizzu/vizzu-dev-wasm:0.16 bash
8888
```
8989

9090
### Building the project

docs/tutorial/align_range/02_b.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
chart.animate({
22
config: {
33
y: {
4-
align: 'stretch'
4+
align: 'stretch',
5+
labels: true
56
}
67
}
78
})

docs/tutorial/align_range/03_b.js

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
chart.animate({
22
config: {
3-
channels: {
4-
y: {
5-
align: 'none',
6-
labels: true
7-
}
3+
y: {
4+
align: 'none'
85
}
96
}
107
})

src/chart/animator/animation.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ void Animation::addKeyframe(const Gen::PlotPtr &next,
128128
auto begin = std::ref(intermediate0 ? intermediate0 : target);
129129

130130
auto &&intermediate1Instant =
131-
intermediate1 && strategy == RegroupStrategy::aggregate
131+
intermediate1 && strategy != RegroupStrategy::fade
132132
&& begin.get()->getOptions()->looksTheSame(
133133
*intermediate1->getOptions());
134134
begin = intermediate1 ? std::ref(intermediate1) : begin;

src/chart/main/version.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
#include "base/app/version.h"
44

5-
const App::Version Vizzu::Main::version(0, 15, 0);
5+
const App::Version Vizzu::Main::version(0, 16, 0);
66

77
const char *const Vizzu::Main::siteUrl = "https://vizzu.io/";

src/chart/options/options.cpp

+8-3
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ Channels Options::shadowChannels() const
111111
&ch2 = shadow.at(ChannelId::noop);
112112
auto &&stacker : shadow.getDimensions({data(stackChannels),
113113
std::size_t{1} + secondary.has_value()})) {
114-
ch1.removeSeries(stacker);
114+
if (stackChannelType() != subAxisType() || !isSplit())
115+
ch1.removeSeries(stacker);
115116
ch2.removeSeries(stacker);
116117
}
117118

@@ -122,7 +123,7 @@ void Options::drilldownTo(const Options &other)
122123
{
123124
auto &stackChannel = this->stackChannel();
124125

125-
if (!isSplit())
126+
if (!isSplit() || !other.isSplit())
126127
getChannels().axisPropsAt(subAxisType()).split = {};
127128

128129
for (auto &&dim : other.getChannels().getDimensions())
@@ -135,12 +136,14 @@ void Options::intersection(const Options &other)
135136
for (auto &&dim : getChannels().getDimensions())
136137
if (!other.getChannels().isSeriesUsed(dim))
137138
getChannels().removeSeries(dim);
139+
140+
getChannels().axisPropsAt(subAxisType()).split = {};
138141
}
139142

140143
bool Options::looksTheSame(const Options &other) const
141144
{
142145
if (channels.anyAxisSet()
143-
&& channels.at(Gen::ChannelId::label).isEmpty()) {
146+
&& channels.at(ChannelId::label).isEmpty()) {
144147
auto thisCopy = *this;
145148
thisCopy.simplify();
146149

@@ -155,6 +158,8 @@ bool Options::looksTheSame(const Options &other) const
155158

156159
void Options::simplify()
157160
{
161+
if (isSplit()) return;
162+
158163
// remove all dimensions, only used at the end of stack
159164
auto &stackChannel = this->stackChannel();
160165

src/dataframe/old/datatable.cpp

+9
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,15 @@ void SeriesIndex::setAggr(const std::string &aggr)
8585
aggregator = Refl::get_enum<dataframe::aggregator_type>(aggr);
8686
}
8787

88+
std::string SeriesIndex::toJSON() const
89+
{
90+
std::string res;
91+
Conv::JSONObj obj{res};
92+
obj("name", name);
93+
if (aggregator) obj("aggregator", Conv::toString(*aggregator));
94+
return res;
95+
}
96+
8897
DataCube::iterator_t DataCube::begin() const
8998
{
9099
iterator_t res{this,

src/dataframe/old/types.h

+1-5
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,7 @@ class SeriesIndex
6969

7070
[[nodiscard]] bool isDimension() const { return !aggregator; }
7171

72-
[[nodiscard]] consteval static auto members()
73-
{
74-
return std::tuple{&SeriesIndex::name,
75-
&SeriesIndex::aggregator};
76-
}
72+
[[nodiscard]] std::string toJSON() const;
7773
};
7874

7975
using SeriesList = Type::UniqueList<SeriesIndex>;

test/e2e/test_cases/test_cases.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2453,7 +2453,7 @@
24532453
"refs": ["e5678fa"]
24542454
},
24552455
"ww_noFade/wNoFade_Tests/Marker_transition_problem/area_column_time_sum": {
2456-
"refs": ["67ef3d7"]
2456+
"refs": ["727c6d5"]
24572457
},
24582458
"ww_noFade/wNoFade_Tests/Marker_transition_problem/area_orientation": {
24592459
"refs": ["8c0d580"]

test/e2e/tests/docs.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"refs": ["83f7b33"]
66
},
77
"align_range": {
8-
"refs": ["b3188f8"]
8+
"refs": ["c4478ca"]
99
},
1010
"animation_control_keyframes": {
1111
"refs": ["ef161c7"]

test/e2e/tests/fixes.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"refs": ["1732a49"]
99
},
1010
"143": {
11-
"refs": ["fb8a740"]
11+
"refs": ["95b9c83"]
1212
},
1313
"144": {
1414
"refs": ["fde02e4"]

test/e2e/tests/fixes/143.mjs

+52-5
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ const testSteps = [
1212
type: 'dimension',
1313
values: ['a', 'a', 'a', 'b', 'b', 'b', 'c', 'c', 'c']
1414
},
15+
{
16+
name: 'Letters2',
17+
type: 'dimension',
18+
values: ['a', 'a', 'a', 'a', 'a', 'b', 'b', 'b', 'b']
19+
},
1520
{
1621
name: 'Val',
1722
type: 'measure',
@@ -23,19 +28,61 @@ const testSteps = [
2328
return chart.animate({
2429
data,
2530
config: {
26-
y: 'Colors',
27-
x: 'Val'
31+
y: {
32+
set: 'Colors',
33+
split: true
34+
},
35+
x: {
36+
set: 'Val',
37+
split: true
38+
}
2839
}
2940
})
3041
},
3142
(chart) =>
3243
chart.animate(
3344
{
34-
y: { set: 'Val', split: true },
35-
x: { set: 'Letters', split: true }
45+
y: ['Letters2', 'Val'],
46+
x: 'Letters'
3647
},
3748
{ regroupStrategy: 'drilldown' }
38-
)
49+
),
50+
(chart) =>
51+
chart.animate(
52+
{
53+
y: ['Letters2', 'Colors', 'Val']
54+
},
55+
{ regroupStrategy: 'drilldown' }
56+
),
57+
(chart) =>
58+
chart.animate({
59+
config: {
60+
y: 'Colors',
61+
x: 'Val'
62+
}
63+
}),
64+
(chart) =>
65+
chart.animate({
66+
config: {
67+
y: ['Letters2', 'Val'],
68+
x: 'Letters'
69+
}
70+
}),
71+
(chart) =>
72+
chart.animate({
73+
y: ['Letters2', 'Val']
74+
}),
75+
(chart) =>
76+
chart.animate({
77+
y: ['Letters2', 'Colors', 'Val']
78+
}),
79+
(chart) =>
80+
chart.animate({
81+
config: {
82+
y: ['Letters2', 'Colors'],
83+
x: 'Val'
84+
}
85+
})
3986
]
4087

4188
export default testSteps

0 commit comments

Comments
 (0)