Merge branch 'linechart-formatmoney' into 'master'

Linechart formatmoney and change rout for mark as sent

See merge request mohit.panjvani/crater-web!3
This commit is contained in:
Mohit Panjwani
2019-11-12 10:02:59 +00:00
4 changed files with 17 additions and 2 deletions

View File

@ -9,6 +9,7 @@
<script>
import Chart from 'chart.js'
import Utils from '../../helpers/utilities'
import { mapGetters } from 'vuex'
export default {
props: {
@ -46,9 +47,20 @@ export default {
type: Function,
require: false,
default: Function
},
FormatGraphMoney: {
type: Function,
require: false,
default: Function
}
},
computed: {
...mapGetters('currency', [
'defaultCurrency'
])
},
watch: {
labels (val) {
this.update()
@ -56,6 +68,7 @@ export default {
},
mounted () {
let self = this
let context = this.$refs.graph.getContext('2d')
let options = {
responsive: true,
@ -64,7 +77,7 @@ export default {
enabled: true,
callbacks: {
label: function (tooltipItem, data) {
return Utils.formatGraphMoney(tooltipItem.value)
return self.FormatGraphMoney(tooltipItem.value, self.defaultCurrency)
}
}
},