Skip to content

Commit

Permalink
Merge branch 'refs/heads/axis_refactor_v12b' into axis_refactor_v12c
Browse files Browse the repository at this point in the history
# Conflicts:
#	CHANGELOG.md
  • Loading branch information
schaumb committed Nov 28, 2024
2 parents edf5951 + a770193 commit 8d297fb
Show file tree
Hide file tree
Showing 16 changed files with 128 additions and 63 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker-vizzu-dev-desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ jobs:
- name: Build and Publish
run: |
IMAGE="vizzu-dev-desktop"
IMAGE_NAME="vizzu/$IMAGE:0.15"
IMAGE_NAME="vizzu/$IMAGE:0.16"
docker build -t $IMAGE_NAME -f tools/ci/docker/$IMAGE .
docker push $IMAGE_NAME
2 changes: 1 addition & 1 deletion .github/workflows/docker-vizzu-dev-wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ jobs:
- name: Build and Publish
run: |
IMAGE="vizzu-dev-wasm"
IMAGE_NAME="vizzu/$IMAGE:0.15"
IMAGE_NAME="vizzu/$IMAGE:0.16"
docker build -t $IMAGE_NAME -f tools/ci/docker/$IMAGE .
docker push $IMAGE_NAME
54 changes: 32 additions & 22 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,44 +2,54 @@

## [Unreleased]

### Changed

- Separate Channel properties to AxisChannel properties at config.
- Channels 'set' rewrite doesn't clear AxisChannel properties.

### Added

- Add new sorting strategy: 'byLabel'.

## [0.16.0] - 2024-11-28

### Fixed

- Fix align on fake-split charts
- Drilldown on split chart is fade.
- Fix aggregate on split chart.
- Do not interpolate hiding/showing legend
- Fix aggregator interface for 'set' channel parameter:
- Remove rare fantom empty marker space on scrollable legend.
- Same legend with different series are not interpolated.
- Different legend with same series are interpolated.
- Invisible axis labels are not draw.
- Fix chaotic axis labels on sorted chart with multiple dimension.
- Fix dimension axis guides on sorted chart.
- Fix NaN handling on axes and size measures other aggregators than sum.
- Do not draw dimension axis labels when the middle of the text is off the plot.

### Changed

- Mekko charts: The main axis handled as dimension.
- Change aggregator interface for 'set' channel parameter:
- From now not accepted the same dimension on the same channel.
- From now, it is prohibited to set multiple measure on one channel.
- From now, it is prohibited to set only aggregator without series name.
- Fix series parsing when aggregator comes first.
- Fix disappearing dimension when aggregated dimension was already set.
- Fix legend with multiple dimension duplicated markers:
- Fix disappearing dimension when aggregated dimension was already set.
- Change legend with multiple dimension duplicated markers:
- Markers of color are never merged.
- Markers of size are always merged.
- Markers of lightness are only merged when labelLevel == 0.
- When merge happens, the marker shows the middle value of lightness.
- Remove rare fantom empty marker space on scrollable legend.
- Same legend with different series are not interpolated.
- Different legend with same series are interpolated.
- Invisible axis labels are not draw.
- Fix chaotic axis labels on sorted chart with multiple dimension.
- Fix Mekko charts: The main axis handled as dimension.
- LabelLevel can be used to handle measure axis as dimension axis.
- Enable dimension axis ticks and interlacing.
- Enable measure axis guides.
- Fix dimension axis guides on sorted chart.
- Fix NaN handling on axes and size measures other aggregators than sum.
- Add meaning to crossing interlacing.
- Do not draw dimension axis labels when the middle of the text is off the plot.

### Added

- Add new sorting strategy: 'byLabel'.
- Add spacing property for plot axis style structure.

### Changed

- Separate Channel properties to AxisChannel properties at config.
- Channels 'set' rewrite doesn't clear AxisChannel properties.
- LabelLevel can be used to handle measure axis as dimension axis.
- Enable dimension axis ticks and interlacing.
- Enable measure axis guides.
- Add meaning to crossing interlacing.

## [0.15.0] - 2024-10-28

Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ docker run -i -t -v .:/workspace vizzu/vizzu-dev-desktop bash
or you can use a specific version of the prebuilt image:

```sh
docker run -i -t -v .:/workspace vizzu/vizzu-dev-desktop:0.15 bash
docker run -i -t -v .:/workspace vizzu/vizzu-dev-desktop:0.16 bash
```

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

```sh
docker run -i -t -v .:/workspace vizzu/vizzu-dev-wasm:0.15 bash
docker run -i -t -v .:/workspace vizzu/vizzu-dev-wasm:0.16 bash
```

### Building the project
Expand Down
3 changes: 2 additions & 1 deletion docs/tutorial/align_range/02_b.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
chart.animate({
config: {
y: {
align: 'stretch'
align: 'stretch',
labels: true
}
}
})
7 changes: 2 additions & 5 deletions docs/tutorial/align_range/03_b.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
chart.animate({
config: {
channels: {
y: {
align: 'none',
labels: true
}
y: {
align: 'none'
}
}
})
2 changes: 1 addition & 1 deletion src/chart/animator/animation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ void Animation::addKeyframe(const Gen::PlotPtr &next,
auto begin = std::ref(intermediate0 ? intermediate0 : target);

auto &&intermediate1Instant =
intermediate1 && strategy == RegroupStrategy::aggregate
intermediate1 && strategy != RegroupStrategy::fade
&& begin.get()->getOptions()->looksTheSame(
*intermediate1->getOptions());
begin = intermediate1 ? std::ref(intermediate1) : begin;
Expand Down
2 changes: 1 addition & 1 deletion src/chart/main/version.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

#include "base/app/version.h"

const App::Version Vizzu::Main::version(0, 15, 0);
const App::Version Vizzu::Main::version(0, 16, 0);

const char *const Vizzu::Main::siteUrl = "https://vizzu.io/";
11 changes: 8 additions & 3 deletions src/chart/options/options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ Channels Options::shadowChannels() const
&ch2 = shadow.at(ChannelId::noop);
auto &&stacker : shadow.getDimensions({data(stackChannels),
std::size_t{1} + secondary.has_value()})) {
ch1.removeSeries(stacker);
if (stackChannelType() != subAxisType() || !isSplit())
ch1.removeSeries(stacker);
ch2.removeSeries(stacker);
}

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

if (!isSplit())
if (!isSplit() || !other.isSplit())
getChannels().axisPropsAt(subAxisType()).split = {};

for (auto &&dim : other.getChannels().getDimensions())
Expand All @@ -135,12 +136,14 @@ void Options::intersection(const Options &other)
for (auto &&dim : getChannels().getDimensions())
if (!other.getChannels().isSeriesUsed(dim))
getChannels().removeSeries(dim);

getChannels().axisPropsAt(subAxisType()).split = {};
}

bool Options::looksTheSame(const Options &other) const
{
if (channels.anyAxisSet()
&& channels.at(Gen::ChannelId::label).isEmpty()) {
&& channels.at(ChannelId::label).isEmpty()) {
auto thisCopy = *this;
thisCopy.simplify();

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

void Options::simplify()
{
if (isSplit()) return;

// remove all dimensions, only used at the end of stack
auto &stackChannel = this->stackChannel();

Expand Down
9 changes: 9 additions & 0 deletions src/dataframe/old/datatable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,15 @@ void SeriesIndex::setAggr(const std::string &aggr)
aggregator = Refl::get_enum<dataframe::aggregator_type>(aggr);
}

std::string SeriesIndex::toJSON() const
{
std::string res;
Conv::JSONObj obj{res};
obj("name", name);
if (aggregator) obj("aggregator", Conv::toString(*aggregator));
return res;
}

DataCube::iterator_t DataCube::begin() const
{
iterator_t res{this,
Expand Down
6 changes: 1 addition & 5 deletions src/dataframe/old/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,7 @@ class SeriesIndex

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

[[nodiscard]] consteval static auto members()
{
return std::tuple{&SeriesIndex::name,
&SeriesIndex::aggregator};
}
[[nodiscard]] std::string toJSON() const;
};

using SeriesList = Type::UniqueList<SeriesIndex>;
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/test_cases/test_cases.json
Original file line number Diff line number Diff line change
Expand Up @@ -2453,7 +2453,7 @@
"refs": ["e5678fa"]
},
"ww_noFade/wNoFade_Tests/Marker_transition_problem/area_column_time_sum": {
"refs": ["67ef3d7"]
"refs": ["727c6d5"]
},
"ww_noFade/wNoFade_Tests/Marker_transition_problem/area_orientation": {
"refs": ["8c0d580"]
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/tests/docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"refs": ["83f7b33"]
},
"align_range": {
"refs": ["b3188f8"]
"refs": ["c4478ca"]
},
"animation_control_keyframes": {
"refs": ["ef161c7"]
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/tests/fixes.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"refs": ["1732a49"]
},
"143": {
"refs": ["fb8a740"]
"refs": ["95b9c83"]
},
"144": {
"refs": ["fde02e4"]
Expand Down
57 changes: 52 additions & 5 deletions test/e2e/tests/fixes/143.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ const testSteps = [
type: 'dimension',
values: ['a', 'a', 'a', 'b', 'b', 'b', 'c', 'c', 'c']
},
{
name: 'Letters2',
type: 'dimension',
values: ['a', 'a', 'a', 'a', 'a', 'b', 'b', 'b', 'b']
},
{
name: 'Val',
type: 'measure',
Expand All @@ -23,19 +28,61 @@ const testSteps = [
return chart.animate({
data,
config: {
y: 'Colors',
x: 'Val'
y: {
set: 'Colors',
split: true
},
x: {
set: 'Val',
split: true
}
}
})
},
(chart) =>
chart.animate(
{
y: { set: 'Val', split: true },
x: { set: 'Letters', split: true }
y: ['Letters2', 'Val'],
x: 'Letters'
},
{ regroupStrategy: 'drilldown' }
)
),
(chart) =>
chart.animate(
{
y: ['Letters2', 'Colors', 'Val']
},
{ regroupStrategy: 'drilldown' }
),
(chart) =>
chart.animate({
config: {
y: 'Colors',
x: 'Val'
}
}),
(chart) =>
chart.animate({
config: {
y: ['Letters2', 'Val'],
x: 'Letters'
}
}),
(chart) =>
chart.animate({
y: ['Letters2', 'Val']
}),
(chart) =>
chart.animate({
y: ['Letters2', 'Colors', 'Val']
}),
(chart) =>
chart.animate({
config: {
y: ['Letters2', 'Colors'],
x: 'Val'
}
})
]

export default testSteps
Loading

0 comments on commit 8d297fb

Please sign in to comment.