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

What cdn to use toavoid installing night-vision chart? #129

Open
GitCatacao opened this issue Jan 12, 2025 · 0 comments
Open

What cdn to use toavoid installing night-vision chart? #129

GitCatacao opened this issue Jan 12, 2025 · 0 comments

Comments

@GitCatacao
Copy link

GitCatacao commented Jan 12, 2025

NOT A BUG!!

I am very curious to try night-vision chart.
In any case I do not intend to install anything locally.
Do you provide some cnd to implement it directly in a page and see how it goes? 🐸🤵‍♂️🍸

I tried this way, but nothing.

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title></title>
	<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/night-vision.min.js"></script>
</head>
<body>
	<div style="min-height: 500px">
		<div id="nightvision"></div>
	</div>


	
<script>
	let chart = new NightVision('nightvision')

	// Generate some random data
	function data() {
	    return Array(30).fill(1).map((x, i) => [
	        new Date(`${i+1} Nov 2022 GMT+0000`).getTime(),
	        i * Math.random()
	    ])
	}

	// Set the dataset
	chart.data = {
	    panes: [{
	        overlays: [{
	            name: 'APE Stock',
	            type: 'Spline',
	            data: data(),
	            settings: {
	                precision: 2
	            }
	        }]
	    }]
	}
</script>

</body>
</html>

Congratulations because it looks really beautiful.
Good work.

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

No branches or pull requests

1 participant