mirror of
https://github.com/Lissy93/dashy.git
synced 2025-07-15 09:44:48 +02:00
🩹 Minor formatting fix for stock and crypto price widgets
This commit is contained in:
parent
9933766adf
commit
c4ac847fc4
@ -22,7 +22,9 @@
|
|||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import WidgetMixin from '@/mixins/WidgetMixin';
|
import WidgetMixin from '@/mixins/WidgetMixin';
|
||||||
import { widgetApiEndpoints } from '@/utils/defaults';
|
import { widgetApiEndpoints } from '@/utils/defaults';
|
||||||
import { findCurrencySymbol, timestampToDate, roundPrice } from '@/utils/MiscHelpers';
|
import {
|
||||||
|
findCurrencySymbol, timestampToDate, roundPrice, putCommasInBigNum,
|
||||||
|
} from '@/utils/MiscHelpers';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [WidgetMixin],
|
mixins: [WidgetMixin],
|
||||||
@ -69,7 +71,7 @@ export default {
|
|||||||
filters: {
|
filters: {
|
||||||
/* Append currency symbol to price */
|
/* Append currency symbol to price */
|
||||||
formatPrice(price) {
|
formatPrice(price) {
|
||||||
return `${findCurrencySymbol('usd')}${roundPrice(price)}`;
|
return `${findCurrencySymbol('usd')}${putCommasInBigNum(roundPrice(price))}`;
|
||||||
},
|
},
|
||||||
/* Append percentage symbol, and up/ down arrow */
|
/* Append percentage symbol, and up/ down arrow */
|
||||||
formatPercentage(change) {
|
formatPercentage(change) {
|
||||||
|
@ -121,9 +121,9 @@ export default {
|
|||||||
});
|
});
|
||||||
// // Combine results with chart config
|
// // Combine results with chart config
|
||||||
this.chartData = {
|
this.chartData = {
|
||||||
labels: priceLabels,
|
labels: priceLabels.reverse(),
|
||||||
datasets: [
|
datasets: [
|
||||||
{ name: `Price ${this.priceTime}`, type: 'bar', values: priceValues },
|
{ name: `Price ${this.priceTime}`, type: 'bar', values: priceValues.reverse() },
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
// // Call chart render function
|
// // Call chart render function
|
||||||
|
Loading…
x
Reference in New Issue
Block a user