Exemple #1
0
	def test_write_A(self):
		mock_data = [
			["Month","Web Traffic","Call to actions"],
			["January",Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56}),
				Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56})],
			["February",Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56}),
				Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56})],
			["March",Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56}),
				Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56})],
			["April",Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56}),
				Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56})],
			["May",Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56}),
				Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56})]
		]
		stylesheet = StyleSheet()
		options = {
			'data': mock_data,
			'title': 'My First Heatmap title',
			'subtitle': 'The first heatmap subtitle',
			'theme': Theme(),
			'stylesheet': stylesheet,
			'xaxis_title': 'Title of X-Axis',
			'yaxis_title': 'Title of Y-Axis'
		}
		filepath = "myoutputfile.html"
		heatmap = HeatMap(options)
		html_writer = HTMLWriter(filepath=filepath, heatmap=heatmap)
		html_writer.write()
		self.assertTrue(os.path.exists(filepath))
		os.remove(filepath)
Exemple #2
0
	def test___init__A(self):
		mock_data = [
			["Month","Web Traffic","Call to actions"],
			["January",Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56}),
				Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56})],
			["February",Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56}),
				Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56})],
			["March",Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56}),
				Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56})],
			["April",Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56}),
				Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56})],
			["May",Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56}),
				Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56})]
		]
		stylesheet = StyleSheet()
		options = {
			'data': mock_data,
			'title': 'My First Heatmap title',
			'subtitle': 'The first heatmap subtitle',
			'theme': Theme(),
			'stylesheet': stylesheet,
			'xaxis_title': 'Title of X-Axis',
			'yaxis_title': 'Title of Y-Axis'
		}
		filepath = "myfilepath.html"
		heatmap = HeatMap(options)
		

		html_writer = HTMLWriter(filepath=filepath, heatmap=heatmap)

		self.assertRaises(TypeError, HTMLWriter, filepath=filepath,
			heatmap=list())
Exemple #3
0
	def setUp(self):
		self.options1 = {'label': 'L1', 'rgb': '#ff00aa', 'value': 59, 'alpha': 0.88}
		self.options2 = {'label': 'L2', 'rgb': '#ffaaaa', 'value': -56, 'alpha': 0.43}
		self.options3 = {'label': 'L3', 'rgb': '#ff1baa', 'value': 0x234, 'alpha': 0.43}
		self.options4 = {'label': 'L4', 'rgb': '#23f0aa', 'value': 102, 'alpha': 0.43}
		self.tile1 = Tile(self.options1)
		self.tile2 = Tile(self.options2)
		self.tile3 = Tile(self.options3)
		self.tile4 = Tile(self.options4)
Exemple #4
0
	def test___init__A(self):
		options = dict()
		options['title'] = "A Title"
		options['subtitle'] = "A Subtitle"
		options['theme'] = Theme()
		options['stylesheet'] = StyleSheet()
		options['xaxis_title'] = 'XAxis Title'
		options['yaxis_title'] = 'YAxis Title'

		# declare some mock tiles.
		t1 = Tile({'value': 105, 'alpha': 0.45, 'rgb': '#f00000'})
		t2 = Tile({'value': 10, 'alpha': 0.2566, 'rgb': '#f10000'})
		t3 = Tile({'value': 123, 'alpha': 0.89, 'rgb': '#f20000'})
		t4 = Tile({'value': 45, 'alpha': 0.15, 'rgb': '#f30000'})
		t5 = Tile({'value': 35, 'alpha': 0.97, 'rgb': '#f40000'})
		t6 = Tile({'value': 89, 'alpha': 0.24, 'rgb': '#f50000'})
		t7 = Tile({'value': 67.43, 'alpha': 0.522, 'rgb': '#f60000'})
		t8 = Tile({'value': 49, 'alpha': 0.567, 'rgb': '#f70000'})
		t9 = Tile({'value': 100, 'alpha': 0.11, 'rgb': '#f80000'})

		options['data'] = [
			['',			'Monday',	'Tuesday',	'Wednesday'],
			['Morning',		t1, 		t2, 				t3],
			['Midday', 		t4, 		t5, 				t6],
			['Afternoon',	t7, 		t8, 				t9],
		]

		heatmap = HeatMap(options)
Exemple #5
0
	def setUp(self):
		self.options = dict()
		self.options['title'] = "A Title"
		self.options['subtitle'] = "A Subtitle"
		self.options['theme'] = Theme()
		self.options['stylesheet'] = StyleSheet()
		self.options['xaxis_title'] = 'XAxis Title'
		self.options['yaxis_title'] = 'YAxis Title'
		# declare some mock tiles.
		self.t1 = Tile({'value': 105, 'alpha': 0.45, 'rgb': '#f00000'})
		self.t2 = Tile({'value': 10, 'alpha': 0.2566, 'rgb': '#f10000'})
		self.t3 = Tile({'value': 123, 'alpha': 0.89, 'rgb': '#f20000'})
		self.t4 = Tile({'value': 45, 'alpha': 0.15, 'rgb': '#f30000'})
		self.t5 = Tile({'value': 45, 'alpha': 0.15, 'rgb': '#f30000'})
		self.t6 = Tile({'value': 89, 'alpha': 0.24, 'rgb': '#f50000'})
		self.t7 = Tile({'value': 89, 'alpha': 0.24, 'rgb': '#f50000'})
		self.t8 = Tile({'value': 89, 'alpha': 0.24, 'rgb': '#f50000'})
		self.t9 = Tile({'value': 100, 'alpha': 0.11, 'rgb': '#f80000'})
		self.options['data'] = [
			['',			'Monday',	'Tuesday',	'Wednesday'],
			['Morning',		self.t1, 	self.t2, 	self.t3],
			['Midday', 		self.t4, 	self.t5, 	self.t6],
			['Afternoon',	self.t7, 	self.t8, 	self.t9],
		]
		self.heatmap = HeatMap(self.options)
Exemple #6
0
	def setUp(self):
		self.options1 = {'label': 'L3', 'rgb': '#ff1baa', 'value': 0x234, 'alpha': 0.43}
		self.options2 = {'label': 'L4', 'rgb': '#23f0aa', 'value': 102, 'alpha': 0.43}
		self.options3 = {'rgb': '#4455aa', 'value': -56, 'alpha': 0.991}
		self.options4 = {'rgb': '#aaff11', 'value': 1908, 'alpha': 0.2345}
		self.tile1 = Tile(self.options1)
		self.tile2 = Tile(self.options2)
		self.tile3 = Tile(self.options3)
		self.tile4 = Tile(self.options4)
Exemple #7
0
class TestGreaterThan(unittest.TestCase):
	def setUp(self):
		self.options1 = {'label': 'L3', 'rgb': '#ff1baa', 'value': 0x234, 'alpha': 0.43}
		self.options2 = {'label': 'L4', 'rgb': '#23f0aa', 'value': 102, 'alpha': 0.43}
		self.options3 = {'rgb': '#4455aa', 'value': -56, 'alpha': 0.991}
		self.options4 = {'rgb': '#aaff11', 'value': 1908, 'alpha': 0.2345}
		self.tile1 = Tile(self.options1)
		self.tile2 = Tile(self.options2)
		self.tile3 = Tile(self.options3)
		self.tile4 = Tile(self.options4)
	def test___gt__A(self):
		self.assertTrue(self.tile4.__gt__(self.tile2))
	def test___gt__B(self):
		self.assertTrue(self.tile1.__gt__(self.tile3))
	def test___gt__C(self):
		self.assertFalse(self.tile2.__gt__(self.tile1))
	def test___gt__D(self):
		self.assertFalse(self.tile3.__gt__(self.tile4))
Exemple #8
0
class TestRepr(unittest.TestCase):
	def setUp(self):
		self.options1 = {'label': 'L3', 'rgb': '#ff1baa', 'value': 0x234, 'alpha': 0.43}
		self.options2 = {'label': 'L4', 'rgb': '#23f0aa', 'value': 102, 'alpha': 0.43}
		self.options3 = {'rgb': '#4455aa', 'value': -56, 'alpha': 0.991}
		self.options4 = {'rgb': '#aaff11', 'value': 1908, 'alpha': 0.2345}
		self.tile1 = Tile(self.options1)
		self.tile2 = Tile(self.options2)
		self.tile3 = Tile(self.options3)
		self.tile4 = Tile(self.options4)
	def test___repr__A(self):
		self.assertEqual(self.tile1.__repr__(), "Tile("+repr(self.options1)+")")
	def test___repr__B(self):
		self.assertEqual(self.tile2.__repr__(), "Tile("+repr(self.options2)+")")
	def test___repr__C(self):
		self.assertEqual(self.tile3.__repr__(), "Tile("+repr(self.options3)+")")
	def test___repr__D(self):
		self.assertEqual(self.tile4.__repr__(), "Tile("+repr(self.options4)+")")
Exemple #9
0
class TestLessEqual(unittest.TestCase):
	def setUp(self):
		self.options1 = {'label': 'L3', 'rgb': '#ff1baa', 'value': 0x234, 'alpha': 0.43}
		self.options2 = {'label': 'L4', 'rgb': '#23f0aa', 'value': 102, 'alpha': 0.43}
		self.options3 = {'rgb': '#4455aa', 'value': -56, 'alpha': 0.991}
		self.options4 = {'rgb': '#aaff11', 'value': 1908, 'alpha': 0.2345}
		self.options5 = {'rgb': '#2aff11', 'value': -56, 'alpha': 0.2345}
		self.options6 = {'rgb': '#a7ff11', 'value': 0x234, 'alpha': 0.2345}
		self.tile1 = Tile(self.options1)
		self.tile2 = Tile(self.options2)
		self.tile3 = Tile(self.options3)
		self.tile4 = Tile(self.options4)
		self.tile5 = Tile(self.options5)
		self.tile6 = Tile(self.options6)
	def test___le__A(self):
		self.assertTrue(self.tile2.__le__(self.tile1))
	def test___le__B(self):
		self.assertTrue(self.tile3.__le__(self.tile4))
	def test___le__C(self):
		self.assertFalse(self.tile4.__le__(self.tile2))
	def test___le__D(self):
		self.assertFalse(self.tile1.__le__(self.tile3))
	def test___le__E(self):
		self.assertTrue(self.tile5.__le__(self.tile3))
	def test___le__F(self):
		self.assertTrue(self.tile6.__le__(self.tile1))
	def test_write_A(self):
		mock_data = [
			["Month","Web Traffic","Call to actions"],
			["January",Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56}),Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56})],
			["February",Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56}),Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56})],
			["March",Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56}),Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56})],
			["April",Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56}),Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56})],
			["May",Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56}),Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56})]
		]
		stylesheet = StyleSheet()
		options = {
			'data': mock_data,
			'title': 'My First Heatmap title',
			'subtitle': 'The first heatmap subtitle',
			'theme': Theme(),
			'stylesheet': stylesheet,
			'xaxis_title': 'Title of X-Axis',
			'yaxis_title': 'Title of Y-Axis'
		}
		heatmap = HeatMap(options)
		file_output_writer=FileOutputWriter(filepath="filepath.file",heatmap=heatmap)
		self.assertRaises(NotImplementedError,
			file_output_writer.write)
Exemple #11
0
    def generate_tile(self, data_item, min_value, max_value, theme):
        ''' generates a new tile of type Tile '''
        # set some colors to use.
        highColor = theme.palette["primary"]
        lowColor = theme.palette["secondary"]
        highColorDec = Themes().rgb_hex_to_decimal(highColor)
        lowColorDec = Themes().rgb_hex_to_decimal(lowColor)
        label = None

        thereAreGroupings = self.grouping is not None
        groupingHasColor = False
        tileInGroup = False
        if(thereAreGroupings):
            tileInGroup = self.grouping.group(data_item.value) is not None
        if(thereAreGroupings and tileInGroup):
            groupingHasColor = self.grouping.group(data_item.value).color is not None
            label = self.grouping.group(data_item.value).label
        
        # first, check if tile groups available, with colors specified.
        if(thereAreGroupings):
            # there are groupings
            if(tileInGroup):
                # Current Tile is in group
                if(groupingHasColor):
                    # grouping has color so just use specified color.
                    rgb = self.grouping.group(data_item.value).color
                    alpha = 1.0
                else:
                    # grouping has no color, so use generated color
                    # based on the group's alpha.
                    alpha = self.grouping.alpha(data_item.value)
                    alpha_color = Themes().generate_alpha_rgb_bicolor(
                        highColorDec, lowColorDec, alpha)
                    rgb = Themes().decimal_to_rgb_hex(alpha_color)
            else:
                # there are no groupings, so generate alpha color
                # as usual. This is the typical behavior.
                alpha_color = Themes().generate_alpha_rgb_bicolor(
                    highColorDec,lowColorDec,self.calculate_rgb_alpha(
                        data_item.value, min_value, max_value))
                rgb = Themes().decimal_to_rgb_hex(alpha_color)
                alpha = self.calculate_rgb_alpha(data_item.value, 
                    min_value, max_value)

        elif(not thereAreGroupings):
            # there are no groupings, so generate alpha color
            # as usual. This is the typical behavior.
            alpha_color = Themes().generate_alpha_rgb_bicolor(
                highColorDec,lowColorDec,self.calculate_rgb_alpha(
                    data_item.value, min_value, max_value))
            rgb = Themes().decimal_to_rgb_hex(alpha_color)
            alpha = self.calculate_rgb_alpha(data_item.value, 
                min_value, max_value)

        # create a dictionary for all Tile options.
        tile_options = {
                'value': data_item.value,
                'alpha': alpha,
                'rgb': rgb,
                'label': label
        }
        # return a Tile object, passing the options too.
        return Tile(tile_options)            
	def test_file_path_setter_A(self):
		mock_data = [
			["Month","Web Traffic","Call to actions"],
			["January",Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56}),Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56})],
			["February",Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56}),Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56})],
			["March",Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56}),Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56})],
			["April",Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56}),Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56})],
			["May",Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56}),Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56})],
			["June",Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56}),Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56})],
			["July",Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56}),Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56})],
			["August",Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56}),Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56})],
			["September",Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56}),Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56})],
			["October",Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56}),Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56})],
			["November",Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56}),Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56})],
			["December",Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56}),Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56})]
		]
		options = {
			'data': mock_data,
			'title': 'My First Heatmap title',
			'subtitle': 'The first heatmap subtitle',
			'theme': Theme(),
			'stylesheet': StyleSheet(),
			'xaxis_title': 'Title of X-Axis',
			'yaxis_title': 'Title of Y-Axis'
		}
		heatmap = HeatMap(options)
		file_output_writer=FileOutputWriter(filepath="filepath.file",heatmap=heatmap)
		self.assertEqual(file_output_writer.filepath,
			"filepath.file")
		file_output_writer.filepath = "myfile.html"
		self.assertEqual(file_output_writer.filepath,
			"myfile.html")
	def test_heatmap_setter_A(self):
		mock_data1 = [
			["Month","Web Traffic","Call to actions"],
			["January",Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56}),Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56})],
			["February",Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56}),Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56})],
			["March",Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56}),Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56})],
			["April",Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56}),Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56})],
			["May",Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56}),Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56})],
			["June",Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56}),Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56})],
			["July",Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56}),Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56})],
			["August",Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56}),Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56})],
			["September",Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56}),Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56})],
			["October",Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56}),Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56})],
			["November",Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56}),Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56})],
			["December",Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56}),Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56})]
		]
		mock_data2 = [
			["Month","Web Traffic","Call to actions"],
			["January",Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56}),Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56})],
			["February",Tile({'value': 60.67, 'rgb': '#a45aff', 'alpha': 0.56}),Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56})],
			["March",Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56}),Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56})],
			["April",Tile({'value': 20, 'rgb': '#a45aff', 'alpha': 0.56}),Tile({'value': 10, 'rgb': '#a45aff', 'alpha': 0.56})],
			["May",Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56}),Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.345})],
			["June",Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56}),Tile({'value': 15.89, 'rgb': '#a45aff', 'alpha': 0.34})],
			["July",Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56}),Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56})],
			["August",Tile({'value': 67.89, 'rgb': '#a45aff', 'alpha': 0.56}),Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56})],
			["September",Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.56}),Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.553})],
			["October",Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.45}),Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.11})],
			["November",Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.5}),Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.911})],
			["December",Tile({'value': 908, 'rgb': '#a45aff', 'alpha': 0.56}),Tile({'value': 60, 'rgb': '#a45aff', 'alpha': 0.734})]
			]
		options1 = {
			'data': mock_data1,
			'title': 'My First Heatmap title',
			'subtitle': 'The first heatmap subtitle',
			'theme': Theme(),
			'stylesheet': StyleSheet(),
			'xaxis_title': 'Title of X-Axis',
			'yaxis_title': 'Title of Y-Axis'
		}
		options2 = {
			'data': mock_data2,
			'title': 'My First Heatmap title',
			'subtitle': 'The first heatmap subtitle',
			'theme': Theme(),
			'stylesheet': StyleSheet(),
			'xaxis_title': 'Title of X-Axis',
			'yaxis_title': 'Title of Y-Axis'
		}
		heatmap1 = HeatMap(options1)
		heatmap2 = HeatMap(options2)
		file_output_writer=FileOutputWriter(filepath="filepath.file",heatmap=heatmap1)
		self.assertEqual(file_output_writer.heatmap,
			heatmap1)
		file_output_writer.heatmap = heatmap2
		self.assertEqual(file_output_writer.heatmap,
			heatmap2)
Exemple #14
0
 def test___init__B(self):
     mock_data = [["Month", "Web Traffic", "Call to actions"],
                  [
                      "January",
                      Tile({
                          'value': 60,
                          'rgb': '#a45aff',
                          'alpha': 0.56
                      }),
                      Tile({
                          'value': 60,
                          'rgb': '#a45aff',
                          'alpha': 0.56
                      })
                  ],
                  [
                      "February",
                      Tile({
                          'value': 60,
                          'rgb': '#a45aff',
                          'alpha': 0.56
                      }),
                      Tile({
                          'value': 60,
                          'rgb': '#a45aff',
                          'alpha': 0.56
                      })
                  ],
                  [
                      "March",
                      Tile({
                          'value': 60,
                          'rgb': '#a45aff',
                          'alpha': 0.56
                      }),
                      Tile({
                          'value': 60,
                          'rgb': '#a45aff',
                          'alpha': 0.56
                      })
                  ],
                  [
                      "April",
                      Tile({
                          'value': 60,
                          'rgb': '#a45aff',
                          'alpha': 0.56
                      }),
                      Tile({
                          'value': 60,
                          'rgb': '#a45aff',
                          'alpha': 0.56
                      })
                  ],
                  [
                      "May",
                      Tile({
                          'value': 60,
                          'rgb': '#a45aff',
                          'alpha': 0.56
                      }),
                      Tile({
                          'value': 60,
                          'rgb': '#a45aff',
                          'alpha': 0.56
                      })
                  ],
                  [
                      "June",
                      Tile({
                          'value': 60,
                          'rgb': '#a45aff',
                          'alpha': 0.56
                      }),
                      Tile({
                          'value': 60,
                          'rgb': '#a45aff',
                          'alpha': 0.56
                      })
                  ],
                  [
                      "July",
                      Tile({
                          'value': 60,
                          'rgb': '#a45aff',
                          'alpha': 0.56
                      }),
                      Tile({
                          'value': 60,
                          'rgb': '#a45aff',
                          'alpha': 0.56
                      })
                  ],
                  [
                      "August",
                      Tile({
                          'value': 60,
                          'rgb': '#a45aff',
                          'alpha': 0.56
                      }),
                      Tile({
                          'value': 60,
                          'rgb': '#a45aff',
                          'alpha': 0.56
                      })
                  ],
                  [
                      "September",
                      Tile({
                          'value': 60,
                          'rgb': '#a45aff',
                          'alpha': 0.56
                      }),
                      Tile({
                          'value': 60,
                          'rgb': '#a45aff',
                          'alpha': 0.56
                      })
                  ],
                  [
                      "October",
                      Tile({
                          'value': 60,
                          'rgb': '#a45aff',
                          'alpha': 0.56
                      }),
                      Tile({
                          'value': 60,
                          'rgb': '#a45aff',
                          'alpha': 0.56
                      })
                  ],
                  [
                      "November",
                      Tile({
                          'value': 60,
                          'rgb': '#a45aff',
                          'alpha': 0.56
                      }),
                      Tile({
                          'value': 60,
                          'rgb': '#a45aff',
                          'alpha': 0.56
                      })
                  ],
                  [
                      "December",
                      Tile({
                          'value': 60,
                          'rgb': '#a45aff',
                          'alpha': 0.56
                      }),
                      Tile({
                          'value': 60,
                          'rgb': '#a45aff',
                          'alpha': 0.56
                      })
                  ]]
     options = {
         'data': mock_data,
         'title': 'My First Heatmap title',
         'subtitle': 'The first heatmap subtitle',
         'theme': Theme(),
         'stylesheet': StyleSheet(),
         'xaxis_title': 'Title of X-Axis',
         'yaxis_title': 'Title of Y-Axis'
     }
     heatmap = HeatMap(options)
     HeatMapWindow(self.parent, heatmap=heatmap)