Skip to content

Commit

Permalink
Feat: run lint
Browse files Browse the repository at this point in the history
  • Loading branch information
rarestoma committed Feb 22, 2021
1 parent 2fe3779 commit f113a35
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 74 deletions.
2 changes: 1 addition & 1 deletion src/components/Charts/Chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export const ordersChart = {
};

const funcs = {
ordersChart() {}
ordersChart() {},
};

export default funcs;
152 changes: 79 additions & 73 deletions src/views/Dashboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,82 @@ export default {
methods: {
initBigChart(index) {
chart.destroy();
chart = new Chart(document.getElementById(this.salesChartID).getContext("2d"), {
chart = new Chart(
document.getElementById(this.salesChartID).getContext("2d"),
{
type: "line",
data: {
labels: ["May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
datasets: [
{
label: "Performance",
tension: 0.4,
borderWidth: 4,
borderColor: "#5e72e4",
pointRadius: 0,
backgroundColor: "transparent",
data: this.bigLineChart.allData[index],
},
],
},
options: {
responsive: true,
maintainAspectRatio: false,
legend: {
display: false,
},
tooltips: {
enabled: true,
mode: "index",
intersect: false,
},
scales: {
yAxes: [
{
barPercentage: 1.6,
gridLines: {
drawBorder: false,
color: "rgba(29,140,248,0.0)",
zeroLineColor: "transparent",
},
ticks: {
padding: 0,
fontColor: "#8898aa",
fontSize: 13,
fontFamily: "Open Sans",
},
},
],
xAxes: [
{
barPercentage: 1.6,
gridLines: {
drawBorder: false,
color: "rgba(29,140,248,0.0)",
zeroLineColor: "transparent",
},
ticks: {
padding: 10,
fontColor: "#8898aa",
fontSize: 13,
fontFamily: "Open Sans",
},
},
],
},
layout: {
padding: 0,
},
},
}
);
this.bigLineChart.activeIndex = index;
},
},
mounted() {
chart = new Chart(
document.getElementById(this.salesChartID).getContext("2d"),
{
type: "line",
data: {
labels: ["May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
Expand All @@ -189,7 +264,7 @@ export default {
borderColor: "#5e72e4",
pointRadius: 0,
backgroundColor: "transparent",
data: this.bigLineChart.allData[index],
data: this.bigLineChart.allData[1],
},
],
},
Expand Down Expand Up @@ -242,77 +317,8 @@ export default {
padding: 0,
},
},
});
this.bigLineChart.activeIndex = index;
},
},
mounted() {
chart = new Chart(document.getElementById(this.salesChartID).getContext("2d"), {
type: "line",
data: {
labels: ["May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
datasets: [
{
label: "Performance",
tension: 0.4,
borderWidth: 4,
borderColor: "#5e72e4",
pointRadius: 0,
backgroundColor: "transparent",
data: this.bigLineChart.allData[1],
},
],
},
options: {
responsive: true,
maintainAspectRatio: false,
legend: {
display: false,
},
tooltips: {
enabled: true,
mode: "index",
intersect: false,
},
scales: {
yAxes: [
{
barPercentage: 1.6,
gridLines: {
drawBorder: false,
color: "rgba(29,140,248,0.0)",
zeroLineColor: "transparent",
},
ticks: {
padding: 0,
fontColor: "#8898aa",
fontSize: 13,
fontFamily: "Open Sans",
},
},
],
xAxes: [
{
barPercentage: 1.6,
gridLines: {
drawBorder: false,
color: "rgba(29,140,248,0.0)",
zeroLineColor: "transparent",
},
ticks: {
padding: 10,
fontColor: "#8898aa",
fontSize: 13,
fontFamily: "Open Sans",
},
},
],
},
layout: {
padding: 0,
},
},
});
}
);
ordersChart.createChart(this.ordersChartID);
},
};
Expand Down

0 comments on commit f113a35

Please sign in to comment.