mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-23 06:35:13 +01:00
* Dashboard: Fix app stats tiles They broke with #4747, because they contain script blocks that are loaded asynchronuosly and need to get run once the chart data is added to the page. * Refactor PoS dashboard component * Collocate the component JS files in separate files --------- Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
18 lines
508 B
JavaScript
18 lines
508 B
JavaScript
if (!window.appTopItems) {
|
|
window.appTopItems =
|
|
{
|
|
dataLoaded: function (model) {
|
|
const id = "AppTopItems-" + model.id;
|
|
const series = model.salesCount;
|
|
new Chartist.Bar(`#${id} .ct-chart`, { series }, {
|
|
distributeSeries: true,
|
|
horizontalBars: true,
|
|
showLabel: false,
|
|
stackBars: true,
|
|
axisY: {
|
|
offset: 0
|
|
}
|
|
});
|
|
}
|
|
};
|
|
}
|