Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 35 additions & 10 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,17 @@

### Fixed

- 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 handled when same dimension on main and sub axis.
- Add record didn't handle when a measure got an empty string.
- Fix no fontparent set bug.

### Changed

- 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.
- Split charts
- axis line multiplication.
- axis labels multiplication.
- axis range interpretation differently for all split part.
- align center / stretch fix.
- Less restrictive 'plot.marker.label.unit'

### Added

Expand All @@ -28,6 +24,35 @@
- Enable split and align on mainAxis.
- Add 'isContiguous' property for dimension series


## [0.16.3] - 2025-04-28

### Added

- Added new (development) style parameter: 'plot.marker.label.unit' with options 'original' (default) and 'percent'.

## [0.16.2] - 2025-04-03

### Fixed

- Fix "Cerror: vector" where if a lot of categories are present without usage,
memory allocation could be failed.
- Fix appearing split markers starter position to center of separation space.

## [0.16.1] - 2025-02-24

### Fixed

- Fix invalid read/write when animation is contiguous (onFinish callback calls setKeyframe).
- Waterfall chart preset not aligned.
- Split chart count negative values too.
- Visible non-sum aggregated value jumped.
- Add record didn't handle when a measure got an empty string.
- Fix no fontparent set bug.
- Fix NaN handling on markers linking.
- Fix handling negative numbers on stacked charts.
- Fix connected charts when nan values is the prev connection.

## [0.16.0] - 2024-11-28

### Fixed
Expand Down
8 changes: 4 additions & 4 deletions src/base/math/renard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ namespace Math

Renard Renard::R3()
{
static const std::array R3Numbers = {1.0, 2.0, 5.0, 10.0};
static constexpr std::array R3Numbers = {1.0, 2.0, 5.0, 10.0};
return Renard{R3Numbers};
}
Renard Renard::R5()
{
static const std::array R5Numbers =
static constexpr std::array R5Numbers =
{1.0, 1.5, 2.5, 4.0, 6.0, 10.0};
return Renard{R5Numbers};
}

double Renard::ceil(double value)
double Renard::ceil(double value) const
{
if (value == 0.0) return 0.0;

Expand All @@ -39,7 +39,7 @@ double Renard::ceil(double value)
+ std::to_string(value) + ".");
}

double Renard::floor(double value)
double Renard::floor(double value) const
{
if (value == 0.0) return 0.0;

Expand Down
4 changes: 2 additions & 2 deletions src/base/math/renard.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ class Renard
explicit Renard(std::span<const double> const &numbers) :
numbers(numbers)
{}
double ceil(double value);
double floor(double value);
[[nodiscard]] double ceil(double value) const;
[[nodiscard]] double floor(double value) const;

private:
std::span<const double> numbers;
Expand Down
3 changes: 2 additions & 1 deletion src/chart/animator/styles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ void StyleMorphFactory::operator()(const T &source,
template <typename T, typename PT>
requires(std::is_same_v<PT, Text::NumberFormat>
|| std::is_same_v<PT, Text::NumberScale>
|| std::is_same_v<PT, Styles::MarkerLabel::Format>)
|| std::is_same_v<PT, Styles::MarkerLabel::Format>
|| std::is_same_v<PT, Styles::MarkerLabel::Unit>)
void StyleMorphFactory::operator()(const T &, const T &, T &) const
{}

Expand Down
3 changes: 2 additions & 1 deletion src/chart/animator/styles.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ class StyleMorphFactory
template <typename T, typename PT = Style::ParamT<T>>
requires(std::is_same_v<PT, Text::NumberFormat>
|| std::is_same_v<PT, Text::NumberScale>
|| std::is_same_v<PT, Styles::MarkerLabel::Format>)
|| std::is_same_v<PT, Styles::MarkerLabel::Format>
|| std::is_same_v<PT, Styles::MarkerLabel::Unit>)
void operator()(const T &, const T &, T &) const;

private:
Expand Down
6 changes: 4 additions & 2 deletions src/chart/generator/axis.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace Vizzu::Gen
struct ChannelStats
{
using TrackType = std::variant<Math::Range<>,
std::vector<std::optional<Data::SliceIndex>>>;
std::map<std::uint32_t, Data::SliceIndex>>;

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

void track(ChannelId at, const double &value)
Expand Down
3 changes: 2 additions & 1 deletion src/chart/generator/marker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@ bool Marker::connectMarkers(bool first,
bool main,
bool polarConnection)
{
if (prev && next && main && (!first || polarConnection)) {
if (prev && next && main && (!first || polarConnection)
&& static_cast<bool>(prev->enabled)) {
next->prevMainMarker =
RelativeMarkerIndex{prev->idx, prev - next};
next->polarConnection = polarConnection && first;
Expand Down
Loading