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

colors mixed up with mode: "categories" with two serial data #330

Open
tablecell opened this issue Oct 1, 2021 · 0 comments
Open

colors mixed up with mode: "categories" with two serial data #330

tablecell opened this issue Oct 1, 2021 · 0 comments

Comments

@tablecell
Copy link

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
	</head>
	<body>
		<div id="chart" style="margin-left:100px;width: 600px;height: 300px;"></div>
		<script src="flotr2.min.js"></script>
		<script>
			var  cat = [[0,'A'],[1,'B'],[2,'C']];  
			
					 var d1 = [[  2,0],[  5,1],[  8,2] ]; 
			 		 var d2 = [[  9,0],[  6,1],[  3,2] ]; 
			
			        
			(function t(t, e) {
			    e = !! e;
			  
			 
			
			    
			    Flotr.draw(t, [d1,d2], {
			        colors:["#19afd2", "#0e204b", "#df021d", "#0e204b", "#e67840"],
			        bars: {
			            show: !0,
			            horizontal: true,
			            shadowSize: 0,
			               barWidth:0.4,
			                      fillOpacity: 0.3,
			                        lineWidth:1,
			                        borderWidth:0,
			        },
			        mouse: {
			            track: !0,
			            relative: !0
			        },
			        grid:{
			borderWidth:0,
			        },
			        xaxis:{
			      min:0,
			
			        },
			        yaxis: {
			        ticks:  cat , 
			    
			        showTicks: false,
				offset: { below:2,above: -0.5	 },
			        mode: "categories",
			    
			        }
			    })
			})(document.getElementById("chart"),true);
		</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