fix(charts): bump frappe charts to 1.2.2
This commit is contained in:
parent
6cd1068841
commit
5cf73c4390
5 changed files with 15 additions and 12 deletions
|
|
@ -6,12 +6,15 @@
|
|||
}
|
||||
|
||||
.chart-container {
|
||||
padding: 15px;
|
||||
margin: 15px;
|
||||
margin-top: 30px;
|
||||
margin-left: 0px;
|
||||
}
|
||||
|
||||
.chart-container > .title {
|
||||
.frappe-chart > text.title {
|
||||
margin: 0px;
|
||||
font-size: 14px;
|
||||
font-size: 14px !important;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.chart-loading-state {
|
||||
|
|
|
|||
|
|
@ -227,13 +227,13 @@ class DashboardChart {
|
|||
"Bar": "bar",
|
||||
};
|
||||
let chart_args = {
|
||||
title: this.chart_doc.chart_name.bold(),
|
||||
title: this.chart_doc.chart_name,
|
||||
data: this.data,
|
||||
type: chart_type_map[this.chart_doc.type],
|
||||
colors: [this.chart_doc.color || "light-blue"],
|
||||
axisOptions: {
|
||||
xIsSeries: this.chart_doc.timeseries
|
||||
},
|
||||
}
|
||||
};
|
||||
this.chart_container.find('.chart-loading-state').addClass('hide');
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
from __future__ import unicode_literals
|
||||
import frappe, json
|
||||
from frappe.core.page.dashboard.dashboard import cache_source, get_from_date_from_timespan
|
||||
from frappe.utils import nowdate, add_to_date, getdate, get_last_day
|
||||
from frappe.utils import nowdate, add_to_date, getdate, get_last_day, formatdate
|
||||
from frappe.model.document import Document
|
||||
|
||||
@frappe.whitelist()
|
||||
|
|
@ -59,7 +59,7 @@ def get(chart_name, from_date=None, to_date=None, refresh = None):
|
|||
result = add_missing_values(result, timegrain, from_date, to_date)
|
||||
|
||||
return {
|
||||
"labels": [r[0].strftime('%Y-%m-%d') for r in result],
|
||||
"labels": [formatdate(r[0].strftime('%Y-%m-%d')) for r in result],
|
||||
"datasets": [{
|
||||
"name": chart.name,
|
||||
"values": [r[1] for r in result]
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
"cookie": "^0.3.1",
|
||||
"express": "^4.16.2",
|
||||
"fast-deep-equal": "^2.0.1",
|
||||
"frappe-charts": "^1.2.0",
|
||||
"frappe-charts": "^1.2.2",
|
||||
"frappe-datatable": "^1.13.3",
|
||||
"frappe-gantt": "^0.1.0",
|
||||
"fuse.js": "^3.2.0",
|
||||
|
|
|
|||
|
|
@ -1753,10 +1753,10 @@ fragment-cache@^0.2.1:
|
|||
dependencies:
|
||||
map-cache "^0.2.2"
|
||||
|
||||
frappe-charts@^1.2.0:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/frappe-charts/-/frappe-charts-1.2.0.tgz#05616e656825e6736b5f617a16c6e1a8ce76d0c2"
|
||||
integrity sha512-yj47OIDaU9BCpV3gpcLE1rG5r0gCPPr3DUzwxG2DQj9vGLcLRHmNixmsF9pXZOOiOy1M/UeBrCL7l9I0JoGzMQ==
|
||||
frappe-charts@^1.2.2:
|
||||
version "1.2.2"
|
||||
resolved "https://registry.yarnpkg.com/frappe-charts/-/frappe-charts-1.2.2.tgz#2af592c1dfce07554b8278ad2fb330922fbcd5d8"
|
||||
integrity sha512-TrZ/JPqvr/RWHKW0fneh3dDzKPm3d+oDEMJj8aREbOWXNhOOIwfonp0uLwo8hxyGEZPwpDAKqs0154GgahSXkA==
|
||||
|
||||
frappe-datatable@^1.13.3:
|
||||
version "1.13.3"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue