Skip to content

Commit 45f1d44

Browse files
committed
Merge remote-tracking branch 'origin/16_patch'
2 parents 5798871 + 1fdaee1 commit 45f1d44

File tree

26 files changed

+5346
-143
lines changed

26 files changed

+5346
-143
lines changed

CHANGELOG.md

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,16 @@
44

55
### Fixed
66

7-
- Fix invalid read/write when animation is contiguous (onFinish callback calls setKeyframe).
8-
- Waterfall chart preset not aligned.
9-
- Split chart count negative values too.
107
- Split chart handled when same dimension on main and sub axis.
11-
- Add record didn't handle when a measure got an empty string.
12-
- Fix no fontparent set bug.
138

149
### Changed
1510

1611
- Channels 'set' rewrite doesn't clear AxisChannel properties.
17-
- Split charts
18-
- axis line multiplication.
19-
- axis labels multiplication.
20-
- axis range interpretation differently for all split part.
21-
- align center / stretch fix.
12+
- Split charts
13+
- axis line multiplication.
14+
- axis labels multiplication.
15+
- axis range interpretation differently for all split part.
16+
- align center / stretch fix.
2217

2318
### Added
2419

@@ -28,6 +23,35 @@
2823
- Enable split and align on mainAxis.
2924
- Add 'isContiguous' property for dimension series
3025

26+
27+
## [0.16.3] - 2025-04-28
28+
29+
### Added
30+
31+
- Added new (development) style parameter: 'plot.marker.label.unit' with options 'original' (default) and 'percent'.
32+
33+
## [0.16.2] - 2025-04-03
34+
35+
### Fixed
36+
37+
- Fix "Cerror: vector" where if a lot of categories are present without usage,
38+
memory allocation could be failed.
39+
- Fix appearing split markers starter position to center of separation space.
40+
41+
## [0.16.1] - 2025-02-24
42+
43+
### Fixed
44+
45+
- Fix invalid read/write when animation is contiguous (onFinish callback calls setKeyframe).
46+
- Waterfall chart preset not aligned.
47+
- Split chart count negative values too.
48+
- Visible non-sum aggregated value jumped.
49+
- Add record didn't handle when a measure got an empty string.
50+
- Fix no fontparent set bug.
51+
- Fix NaN handling on markers linking.
52+
- Fix handling negative numbers on stacked charts.
53+
- Fix connected charts when nan values is the prev connection.
54+
3155
## [0.16.0] - 2024-11-28
3256

3357
### Fixed

src/base/math/renard.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@ namespace Math
1313

1414
Renard Renard::R3()
1515
{
16-
static const std::array R3Numbers = {1.0, 2.0, 5.0, 10.0};
16+
static constexpr std::array R3Numbers = {1.0, 2.0, 5.0, 10.0};
1717
return Renard{R3Numbers};
1818
}
1919
Renard Renard::R5()
2020
{
21-
static const std::array R5Numbers =
21+
static constexpr std::array R5Numbers =
2222
{1.0, 1.5, 2.5, 4.0, 6.0, 10.0};
2323
return Renard{R5Numbers};
2424
}
2525

26-
double Renard::ceil(double value)
26+
double Renard::ceil(double value) const
2727
{
2828
if (value == 0.0) return 0.0;
2929

@@ -39,7 +39,7 @@ double Renard::ceil(double value)
3939
+ std::to_string(value) + ".");
4040
}
4141

42-
double Renard::floor(double value)
42+
double Renard::floor(double value) const
4343
{
4444
if (value == 0.0) return 0.0;
4545

src/base/math/renard.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ class Renard
1414
explicit Renard(std::span<const double> const &numbers) :
1515
numbers(numbers)
1616
{}
17-
double ceil(double value);
18-
double floor(double value);
17+
[[nodiscard]] double ceil(double value) const;
18+
[[nodiscard]] double floor(double value) const;
1919

2020
private:
2121
std::span<const double> numbers;

src/chart/animator/styles.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ void StyleMorphFactory::operator()(const T &source,
6262
template <typename T, typename PT>
6363
requires(std::is_same_v<PT, Text::NumberFormat>
6464
|| std::is_same_v<PT, Text::NumberScale>
65-
|| std::is_same_v<PT, Styles::MarkerLabel::Format>)
65+
|| std::is_same_v<PT, Styles::MarkerLabel::Format>
66+
|| std::is_same_v<PT, Styles::MarkerLabel::Unit>)
6667
void StyleMorphFactory::operator()(const T &, const T &, T &) const
6768
{}
6869

src/chart/animator/styles.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ class StyleMorphFactory
8484
template <typename T, typename PT = Style::ParamT<T>>
8585
requires(std::is_same_v<PT, Text::NumberFormat>
8686
|| std::is_same_v<PT, Text::NumberScale>
87-
|| std::is_same_v<PT, Styles::MarkerLabel::Format>)
87+
|| std::is_same_v<PT, Styles::MarkerLabel::Format>
88+
|| std::is_same_v<PT, Styles::MarkerLabel::Unit>)
8889
void operator()(const T &, const T &, T &) const;
8990

9091
private:

src/chart/generator/axis.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ namespace Vizzu::Gen
2121
struct ChannelStats
2222
{
2323
using TrackType = std::variant<Math::Range<>,
24-
std::vector<std::optional<Data::SliceIndex>>>;
24+
std::map<std::uint32_t, Data::SliceIndex>>;
2525

2626
Refl::EnumArray<ChannelId, TrackType> tracked;
2727
Math::Range<> lightness;
@@ -35,7 +35,9 @@ struct ChannelStats
3535
void track(ChannelId at, const Data::MarkerId &id)
3636
{
3737
auto &vec = std::get<1>(tracked[at]);
38-
vec[id.itemId] = id.label;
38+
if (id.label)
39+
vec.try_emplace(static_cast<std::uint32_t>(id.itemId),
40+
*id.label);
3941
}
4042

4143
void track(ChannelId at, const double &value)

src/chart/generator/marker.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,8 @@ bool Marker::connectMarkers(bool first,
152152
bool main,
153153
bool polarConnection)
154154
{
155-
if (prev && next && main && (!first || polarConnection)) {
155+
if (prev && next && main && (!first || polarConnection)
156+
&& static_cast<bool>(prev->enabled)) {
156157
next->prevMainMarker =
157158
RelativeMarkerIndex{prev->idx, prev - next};
158159
next->polarConnection = polarConnection && first;

0 commit comments

Comments
 (0)