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

y axis numbers break #382

Open
alpap opened this issue May 11, 2022 · 2 comments
Open

y axis numbers break #382

alpap opened this issue May 11, 2022 · 2 comments

Comments

@alpap
Copy link

alpap commented May 11, 2022

Expected Behaviour

the y axis numbers are shown in order

Actual Behaviour

some of the y axis numbers are wrong

Steps to Reproduce:

  • pass the bellow data to a line chart
{
	"data": {
		"labels": [
			"2022-02-11",
			"2022-02-15",
			"2022-02-16",
			"2022-02-16",
			"2022-02-16",
			"2022-02-16",
			"2022-02-16",
			"2022-02-17",
			"2022-02-17",
			"2022-02-17",
			"2022-02-18",
			"2022-02-18",
			"2022-02-18",
			"2022-02-19",
			"2022-02-21",
			"2022-02-22",
			"2022-02-22",
			"2022-02-22",
			"2022-02-22",
			"2022-02-22",
			"2022-02-22",
			"2022-02-22",
			"2022-02-22",
			"2022-02-22",
			"2022-02-23",
			"2022-02-23",
			"2022-02-23",
			"2022-02-23",
			"2022-02-23",
			"2022-02-23",
			"2022-02-23",
			"2022-02-23",
			"2022-02-24",
			"2022-02-25",
			"2022-02-25",
			"2022-02-25",
			"2022-02-26",
			"2022-02-28",
			"2022-02-28",
			"2022-02-28",
			"2022-02-28",
			"2022-02-28",
			"2022-03-01",
			"2022-03-01",
			"2022-03-03",
			"2022-03-03",
			"2022-03-04",
			"2022-03-07",
			"2022-03-08",
			"2022-03-08",
			"2022-03-08",
			"2022-03-09",
			"2022-03-09",
			"2022-03-10",
			"2022-03-10",
			"2022-03-11",
			"2022-03-11",
			"2022-03-14",
			"2022-03-15",
			"2022-03-15",
			"2022-03-15",
			"2022-03-15",
			"2022-03-16",
			"2022-03-16",
			"2022-03-17",
			"2022-03-17",
			"2022-03-17",
			"2022-03-17",
			"2022-03-17",
			"2022-03-17",
			"2022-03-17",
			"2022-03-17",
			"2022-03-18",
			"2022-03-18",
			"2022-03-21",
			"2022-03-21",
			"2022-03-21",
			"2022-03-21",
			"2022-03-22"
		],
		"datasets": [
			{
				"name": "hours",
				"values": [
					0.33,
					0.35,
					0.28,
					0.29,
					0.32,
					0.33,
					0.36,
					0.36,
					0.38,
					0.4,
					0.37,
					0.41,
					0.5,
					0.31,
					0.32,
					0.28,
					0.33,
					0.34,
					0.35,
					0.37,
					0.38,
					0.48,
					0.55,
					0.57,
					0.29,
					0.34,
					0.47,
					0.51,
					0.51,
					0.52,
					0.57,
					0.58,
					0.38,
					0.38,
					0.52,
					0.54,
					0.44,
					0.34,
					0.36,
					0.37,
					0.4,
					0.48,
					0.39,
					0.41,
					0.44,
					0.48,
					0.38,
					0.46,
					0.35,
					0.41,
					0.47,
					0.35,
					0.43,
					0.38,
					0.39,
					0.39,
					0.47,
					0.42,
					0.38,
					0.39,
					0.39,
					0.47,
					0.44,
					0.45,
					0.22,
					0.35,
					0.35,
					0.44,
					0.45,
					0.46,
					0.47,
					0.5,
					0.39,
					0.45,
					0.38,
					0.39,
					0.53,
					0.56,
					0.54
				]
			}
		],
		"yMarkers": [
			{
				"label": "Target",
				"value": 0,
				"options": {
					"labelPos": "left"
				},
				"color": "#ff0000"
			}
		]
	}
}

NOTE: Add a GIF/Screenshot if required.
Screenshot 2022-05-11 at 16 19 15
Screenshot 2022-05-11 at 16 24 14

Frappé Charts version: 1.62
Codepen / Codesandbox:

@rokasga
Copy link

rokasga commented May 18, 2022

I'm almost sure it is in order. If you select and check that ....00001 number in dev tools, you'll see it's actually 0.600000001. I'm having the same problem and not sure how/why that fraction adds up :(

@scmmishra
Copy link
Contributor

Try using the 2.0.0-rc20. See if that fixes it. I'll port any fixes to the latest v1 branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants