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

Single data point leads to annotations not rendering #1279

Closed
wozzo opened this issue Feb 3, 2020 · 3 comments · May be fixed by cherrypoppins226/tfjs-linear-regression-demo#1
Closed

Single data point leads to annotations not rendering #1279

wozzo opened this issue Feb 3, 2020 · 3 comments · May be fixed by cherrypoppins226/tfjs-linear-regression-demo#1

Comments

@wozzo
Copy link

wozzo commented Feb 3, 2020

Bug Report

Codepen

Modified Codepen

Explanation

  • What is the behavior you expect?
    Annotations to always appear regardless of data
  • What is happening instead?
    When only a single data point in the series the annotation isn't appearing.
    The annotations block has the following classes apexcharts-xaxis-annotations apexcharts-element-hidden leading to the annotations not being visible. Updating the options passed in after the initial render seems to get the annotations to appear again.
  • What error message are you getting?
    No error message
@wozzo
Copy link
Author

wozzo commented Feb 3, 2020

As a workaround for react I've added a useEffect call which modifies something on the options

	useEffect(() => {
		setTimeout(() => {
			setDashboardChart({...dashboardChart,
				options: {
					...dashboardChart.options,
					markers: { size: 5}
				}})
		}, 0)
	// eslint-disable-next-line
	}, [])

@junedchhipa
Copy link
Contributor

Thanks for the bug report.
I have fixed it and should work fine in the next patch release.

@wozzo
Copy link
Author

wozzo commented Feb 3, 2020

Awesome. Cheers.

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

Successfully merging a pull request may close this issue.

2 participants