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

Color markers appear in other locations #892

Open
cooper1x opened this issue Mar 29, 2023 · 0 comments
Open

Color markers appear in other locations #892

cooper1x opened this issue Mar 29, 2023 · 0 comments

Comments

@cooper1x
Copy link

cooper1x commented Mar 29, 2023

image

<!DOCTYPE html>
<html>
<head>
<title>echarts demo</title>
<script src="https://cdn.jsdelivr.net/npm/echarts@5.2.1/dist/echarts.min.js"></script>
</head>
<body>
	<div id="barChart" style="width: 50%; height: 400px;"></div>
	<div id="lineChart" style="width: 50%; height: 400px;"></div>
	<script>
		var barChart = echarts.init(document.getElementById('barChart'));
		var barOption = {
			title: {
				text: 'Sales'
			},
			tooltip: {},
			xAxis: {
				data: ['January', 'February', 'March', 'April', 'May', 'June', 'July']
			},
			yAxis: {},
			series: [{
				name: 'Sales',
				type: 'bar',
				data: [12, 19, 3, 5, 2, 3, 7],
				itemStyle: {
					color: 'rgba(255, 99, 132, 0.2)',
					borderColor: 'rgba(255, 99, 132, 1)',
					borderWidth: 1
				}
			}]
		};
		barChart.setOption(barOption);

		var lineChart = echarts.init(document.getElementById('lineChart'));
		var lineOption = {
			title: {
				text: 'Sales'
			},
			tooltip: {},
			xAxis: {
				data: ['January', 'February', 'March', 'April', 'May', 'June', 'July']
			},
			yAxis: {},
			series: [{
				name: 'Sales',
				type: 'line',
				data: [12, 19, 3, 5, 2, 3, 7],
				itemStyle: {
					color: 'rgba(54, 162, 235, 0.2)',
					borderColor: 'rgba(54, 162, 235, 1)',
					borderWidth: 1
				}
			}]
		};
		lineChart.setOption(lineOption);
	</script>
</body>
</html>
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