服装智能制造软件平台V3.0
http://182.92.169.222/hhxy/#/user/login
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
66 lines
1.2 KiB
66 lines
1.2 KiB
<template> |
|
<div :style="{ padding: '0 0 32px 32px' }"> |
|
<h4 :style="{ marginBottom: '20px' }">{{ title }}</h4> |
|
<v-chart |
|
:height="height" |
|
:data="data" |
|
:scale="scale" |
|
:forceFit="true" |
|
:padding="['auto', 'auto', '40', '50']"> |
|
<v-tooltip/> |
|
<v-axis/> |
|
<v-bar position="x*y"/> |
|
</v-chart> |
|
</div> |
|
</template> |
|
|
|
<script> |
|
|
|
export default { |
|
name: 'Bar', |
|
props: { |
|
title: { |
|
type: String, |
|
default: '' |
|
}, |
|
x: { |
|
type: String, |
|
default: 'x' |
|
}, |
|
y: { |
|
type: String, |
|
default: 'y' |
|
}, |
|
data: { |
|
type: Array, |
|
default: () => [] |
|
}, |
|
height: { |
|
type: Number, |
|
default: 254 |
|
} |
|
}, |
|
data() { |
|
return {} |
|
}, |
|
computed: { |
|
scale() { |
|
return [ |
|
{ dataKey: 'x', title: this.x, alias: this.x }, |
|
{ dataKey: 'y', title: this.y, alias: this.y } |
|
] |
|
} |
|
}, |
|
created() { |
|
// this.getMonthBar() |
|
}, |
|
methods: { |
|
// getMonthBar() { |
|
// this.$http.get('/analysis/month-bar') |
|
// .then(res => { |
|
// this.data = res.result |
|
// }) |
|
// } |
|
} |
|
} |
|
</script> |