mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-02 03:57:52 +00:00
fix: Upgrade chart.js to 2.9.4, fix grid-line option (#2268)
This commit is contained in:
@@ -14,12 +14,12 @@ const chartOptions = {
|
||||
scales: {
|
||||
xAxes: [
|
||||
{
|
||||
barPercentage: 1.26,
|
||||
barPercentage: 1.1,
|
||||
ticks: {
|
||||
fontFamily,
|
||||
},
|
||||
gridLines: {
|
||||
display: false,
|
||||
drawOnChartArea: false,
|
||||
},
|
||||
},
|
||||
],
|
||||
@@ -30,7 +30,7 @@ const chartOptions = {
|
||||
beginAtZero: true,
|
||||
},
|
||||
gridLines: {
|
||||
display: false,
|
||||
drawOnChartArea: false,
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
@@ -38,6 +38,18 @@
|
||||
{
|
||||
"id": 1,
|
||||
"name": "Last 30 days"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"name": "Last 3 months"
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"name": "Last 6 months"
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"name": "Last year"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -83,7 +83,14 @@ export default {
|
||||
return getUnixTime(startOfDay(new Date()));
|
||||
},
|
||||
from() {
|
||||
const diff = this.currentDateRangeSelection.id ? 29 : 6;
|
||||
const dateRange = {
|
||||
0: 6,
|
||||
1: 29,
|
||||
2: 89,
|
||||
3: 179,
|
||||
4: 364,
|
||||
};
|
||||
const diff = dateRange[this.currentDateRangeSelection.id];
|
||||
const fromDate = subDays(new Date(), diff);
|
||||
return getUnixTime(startOfDay(fromDate));
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user