Add leaderboard to desktop
This commit is contained in:
parent
5a344576b8
commit
04c4ce353c
@ -134,6 +134,14 @@ def get_data():
|
||||
"link": "pos",
|
||||
"label": _("POS")
|
||||
},
|
||||
{
|
||||
"module_name": "Leaderboard",
|
||||
"color": "#589494",
|
||||
"icon": "octicon octicon-graph",
|
||||
"type": "page",
|
||||
"link": "leaderboard",
|
||||
"label": _("Leaderboard")
|
||||
},
|
||||
{
|
||||
"module_name": "Projects",
|
||||
"color": "#8e44ad",
|
||||
|
@ -132,21 +132,21 @@ frappe.Leaderboard = Class.extend({
|
||||
|
||||
me.$graph_area.show().empty();
|
||||
let args = {
|
||||
parent: me.$graph_area,
|
||||
y: [
|
||||
{
|
||||
color: 'light-green',
|
||||
values: graph_items.map(d=>d.value),
|
||||
formatted: graph_items.map(d=>d[me.options.selected_filter_item])
|
||||
}
|
||||
],
|
||||
x: {
|
||||
values: graph_items.map(d=>d.name)
|
||||
parent: '.leaderboard-graph',
|
||||
data: {
|
||||
datasets: [
|
||||
{
|
||||
values: graph_items.map(d=>d.value)
|
||||
}
|
||||
],
|
||||
labels: graph_items.map(d=>d.name)
|
||||
},
|
||||
mode: 'bar',
|
||||
colors: ['light-green'],
|
||||
format_tooltip_x: d=>d[me.options.selected_filter_item],
|
||||
type: 'bar',
|
||||
height: 140
|
||||
};
|
||||
new frappe.ui.Graph(args);
|
||||
new Chart(args);
|
||||
|
||||
notify(me, r, $container);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user