"+(engine_mode_?btn("statistics-mode","‹ Vereinsanalyse","statistics-back","id=\"statistics-mode-analysis\" data-id=\"analysis\""):std::string())+"
"+esc(data.at("title").get())+" ";
if(winners)out+="
"+statistics_text(data.value("note",""))+"
";
if(engine_mode_&&!data.value("available",false)){out+="
"+statistics_text(data.value("reason","")=="not_recorded"?"Diese Auswertung wurde in der Karriere noch nicht aufgezeichnet.":"Keine Statistikdaten für diese Auswahl vorhanden.")+"
";}
else if(section==2) {
std::string svg="
";
const auto &series=data.at("series");
for(const auto &curve:series)if(curve.at("active")==true) {
svg+=" ";
}
svg+="";
out+="
"+picture(renderer_.diagram("statistics-analytics",svg,5100),2496,812)+"
";
for(size_t k=0;k();
out+=btn("statistics-curve","()+";\"> "+esc(curve.at("name").get())+" ","statistics-action statistics-series-button",
"id=\"statistics-curve-"+std::to_string(k)+"\" data-index=\""+std::to_string(k)+"\" aria-pressed=\""+(active?"true":"false")+"\" style=\""+rect(double(k%3)*854.666666667,double(k/3)*100,836.666666667,82)+"\"");
}
out+="
";
} else {
const auto &columns=data.at("columns"),&rows=data.at("rows");
const size_t count=columns.size();
const double table_width=2548;
const double first=minutes?table_width*.12:winners?190:table_width*.4;
const double rest=count>1?(table_width-first)/double(count-1):0;
const auto width=[&](size_t column){return finals?(column==1?160:1194):column?rest:first;};
const bool trophies=winners&&std::any_of(columns.begin(),columns.end(),[](const Json &column){return !column.value("trophy","").empty();});
const double head_height=trophies?400:winners?78:76;
out+="
";
for(size_t c=0;c
());
if(column.contains("round"))heading=""+esc(column.at("round").get())+" "+heading;
if(!trophy.empty()) {
const auto art=asset.empty()?std::string():""+img(asset,290,290,asset.starts_with("asset:"),false,640)+" ";
heading=btn("statistics-trophy",art+""+esc(column.at("text").get())+" ","statistics-trophy-heading",
"id=\"statistics-trophy-heading-"+std::to_string(c)+"\" data-column=\""+std::to_string(c)+"\" data-row=\"-1\" aria-label=\""+esc(column.at("text").get()+" · Siegerbild ansehen")+"\" "+(asset.empty()||!column.contains("winner")?"disabled":""));
}
out+=""+heading+"
";
}
out+=" ";
for(size_t r=0;r
";
for(size_t c=0;c"+esc(value.value("prefix",""))+""+btn("player-detail",statistics_text(title),"statistics-player-link","id=\"statistics-player-"+token+"\" data-id=\""+esc(value.at("player").get())+"\" data-club=\""+esc(value.value("club",""))+"\" title=\""+esc(title)+"\"");
} else if(value.contains("club")) {
const auto id=value.at("club").get();const auto *club=world_->find("clubs",id);const bool reverse=section==1&&c==1;
const auto name=""+esc(title)+" ",badge=crest(club,42);
content=btn("club-detail",reverse?name+badge:badge+name,"report-club-button statistics-club "+std::string(reverse?"name-first ":"")+(data.at("club")==id?"current":""),"id=\"statistics-club-"+token+"\" data-id=\""+esc(id)+"\" title=\""+esc(title)+"\"");
} else if(value.contains("trophy")) {
const auto asset=statistics_trophy_asset(value.at("trophy").get());
content=btn("statistics-trophy",(asset.empty()?std::string():""+img(asset,92,92,asset.starts_with("asset:"),false,256)+" ")+statistics_text(title),"statistics-world-trophy","id=\"statistics-trophy-row-"+token+"\" data-row=\""+std::to_string(r)+"\" data-column=\""+std::to_string(c)+"\" "+(asset.empty()?"disabled":""));
} else content=statistics_text(value.value("prefix","")+title);
if(value.contains("round"))content=""+esc(value.at("round").get())+" "+content;
out+=""+content+"
";
}
out+=" ";
}
if(rows.empty())out+="
"+statistics_text("Keine Statistikdaten für diese Auswahl vorhanden.")+"
";
out+="
";
}
out+="