mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Added initial support of statistical charts in earn channel section.
This commit is contained in:
@@ -61,7 +61,7 @@ Data::StatisticalChart StatisticalChartFromJSON(const QByteArray &json) {
|
||||
line.isHiddenOnStart = ranges::contains(hiddenLines, columnId);
|
||||
line.y.resize(length);
|
||||
for (auto i = 0; i < length; i++) {
|
||||
const auto value = array.at(i + 1).toInt();
|
||||
const auto value = array.at(i + 1).toInteger();
|
||||
line.y[i] = value;
|
||||
if (value > line.maxValue) {
|
||||
line.maxValue = value;
|
||||
@@ -132,6 +132,13 @@ Data::StatisticalChart StatisticalChartFromJSON(const QByteArray &json) {
|
||||
result.weekFormat = tooltipFormat.contains(u"'week'"_q);
|
||||
}
|
||||
}
|
||||
{
|
||||
const auto tickFormatIt = root.constFind(u"yTickFormatter"_q);
|
||||
if (tickFormatIt != root.constEnd()) {
|
||||
const auto tickFormat = tickFormatIt->toString();
|
||||
result.isCurrency = tickFormat.contains(u"TON"_q);
|
||||
}
|
||||
}
|
||||
|
||||
const auto colors = root.value(u"colors"_q).toObject();
|
||||
const auto names = root.value(u"names"_q).toObject();
|
||||
|
||||
Reference in New Issue
Block a user