Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignoring decimal places parameters. #55

Closed
BillYovino opened this issue Jun 21, 2023 · 3 comments
Closed

Ignoring decimal places parameters. #55

BillYovino opened this issue Jun 21, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@BillYovino
Copy link

Platform

Raspberry Pi OS Bullseye 64

Node.js Version

16.20.0

MagicMirror Version

2.23

Module Version

v2.80

Description

The module is ignoring the config values for numberDecimalsPercentages and numberDecimalsValues
Regardless of the settings, the stock values and change percentages are showing 3 decimal places.

MMM-Jast Screenshot

Expected behavior

I would expect AMZN to show as 124..86 (-0.93) and UA as 6.83 (-0.10)

Current behavior

AMZN shows as 124..855 (-0.925) and UA as 6.825 (-0.0985)

Possible solution

I believe the module is ignoring the config values and defaults for those attributes.

Steps to reproduce

The issue is constant and repeatable.

Log

No errors, just incorrect formatting

config.js

{
	module: "MMM-Jast",
	position: "bottom_bar",
	config: {
		currencyStyle: "code", // One of ["code", "symbol", "name"]
		fadeSpeedInSeconds: 100,
		lastUpdateFormat: "HH:mm",
		maxChangeAge: 1 * 24 * 60 * 60 * 1000,
		maxWidth: "100%",
		numberDecimalsPercentages: 1,
		numberDecimalsValues: 2,
		scroll: "horizontal", // One of ["none", "vertical", "horizontal"]
		showColors: true,
		showCurrency: false,
		showChangePercent: false,
		showChangeValue: true,
		showChangeValueCurrency: false,
		showHiddenStocks: false,
		showLastUpdate: false,
		showPortfolioValue: false,
		showPortfolioGrowthPercent: false,
		showPortfolioGrowth: false,
		updateIntervalInSeconds: 300,
		useGrouping: false,
		virtualHorizontalMultiplier: 2,
		stocks: [
			{ name: "DJI", symbol: "^DJI"},
			{ name: "NASD", symbol: "^IXIC"},
			{ name: "AAPL", symbol: "AAPL" },
			{ name: "GOOG", symbol: "GOOG"},
                        { name: "AMZN", symbol: "AMZN"},
                        { name: "META", symbol: "META"},
                        { name: "TSLA", symbol: "TSLA"},
                        { name: "UA", symbol: "UA"}
		]
	}
}

Additional info

No response

@BillYovino BillYovino added the bug Something isn't working label Jun 21, 2023
@jalibu
Copy link
Owner

jalibu commented Jul 15, 2023

Hi @BillYovino ,

thank you for reporting this.

I can reproduce your finding. I'll try to fix it asap

@jalibu jalibu closed this as completed in 0295f2c Jul 15, 2023
@jalibu
Copy link
Owner

jalibu commented Jul 15, 2023

Should be fixed with https://github.com/jalibu/MMM-Jast/releases/tag/v2.8.2

@BillYovino
Copy link
Author

BillYovino commented Jul 15, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants