Skip to content

Commit

Permalink
Reset means reset + set doesn't reset
Browse files Browse the repository at this point in the history
  • Loading branch information
schaumb committed Nov 18, 2024
1 parent 1eb6d02 commit 3514412
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
1 change: 1 addition & 0 deletions src/chart/options/channel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ void Channel::reset()
set = {};
labelLevel = {};
title = {};
range = {};
}

bool Channel::isEmpty() const
Expand Down
16 changes: 6 additions & 10 deletions src/chart/options/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,29 +89,25 @@ void Config::setChannelParam(const std::string &path,

if (property == "set") {
if (parts.size() == 3) {
channel.reset();
channel.set = {};
options.markersInfo.clear();
return;
}

if (auto &listParser = ChannelSeriesList::Parser::instance();
parts.size() == 4) {
auto &listParser = ChannelSeriesList::Parser::instance();
if (parts.size() == 4) {
if (parts[3] == "begin") {
if (parts[2] == "set") channel.reset();

if (parts[2] == "set") channel.set = {};
options.markersInfo.clear();
listParser.table = &table.get();
listParser.channels.resize(std::stoull(value));
return;
}

listParser.current = std::nullopt;
listParser.path = parts;
}
else {
else
listParser.current = std::stoull(parts.at(3));
listParser.path = parts;
}
listParser.path = parts;
}

if (property == "range") property += "." + parts.at(3);
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/tests/config_tests/dimension_axis_title.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const testSteps = [
(chart) =>
chart.animate({
x: { set: 'Baz' },
size: { set: 'Baz' }
size: { set: 'Baz', title: 'Bigness' }
})
]

Expand Down

0 comments on commit 3514412

Please sign in to comment.