Jason R. Coombs avatar Jason R. Coombs committed 43f9ade

Added a vertical bar with top stacking to the samples

Comments (0)

Files changed (1)

 	yield 'VerticalBar', SampleBar.vertical()
 	yield 'HorizontalBar', SampleBar.horizontal()
 	yield 'VerticalBarLarge', SampleBar.vertical_large()
+	yield 'VerticalBarStackTop', SampleBar.vertical_top()
 	yield 'Pie', sample_Pie()
 	yield 'Schedule', sample_Schedule()
 	yield 'Line', sample_Line()
 		g.add_data(dict(data=[2,26,106,193,105], title='old'))
 		return g
+	@classmethod
+	def vertical_top(cls):
+		g = bar.VerticalBar(cls.fields, dict(stack='top'))
+		assert g.stack == 'top'
+		g.scale_integers = True
+		g.width, g.height = 640,480
+		g.graph_title = 'Question 7'
+		g.show_graph_title = True
+		g.add_data({'data': [-2, 3, 1, 3, 1], 'title': 'Female'})
+		g.add_data({'data': [0, 2, 1, 5, 4], 'title': 'Male'})
+		return g
 def sample_Line():
 	g = line.Line()
 	options = dict(
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.