コード例 #1
0
    def test_simple_page(self):
        """Test displaying a page with single distribution."""
        dist_info = []
        new_info = random_distribution()
        dist_info.append(new_info)
        distribution = BarChartDistribution(dist_info)

        dist_page = DistributionPage()
        dist_page.distributions.append(distribution)

        dist_page.draw(self.simple_page, "Test Bar Chart")
コード例 #2
0
    def test_simple_page(self):
        """Test displaying a page with single distribution."""
        dist_info = []
        new_info = random_distribution()
        dist_info.append(new_info)
        distribution = BarChartDistribution(dist_info)

        dist_page = DistributionPage()
        dist_page.distributions.append(distribution)

        dist_page.draw(self.simple_page, "Test Bar Chart")
コード例 #3
0
    def test_multi_page(self):
        """Create a page with multiple distributions on it."""
        dist_page = DistributionPage()

        dist_page.number_of_columns = 3

        for multi in range(self.num_multi):
            dist_info = []
            new_info = random_distribution()
            dist_info.append(new_info)

            distribution = BarChartDistribution(dist_info)
            distribution.chart_title = f"Distribution {multi + 1}"
            dist_page.distributions.append(distribution)

        dist_page.draw(self.multi_page, "Test Multi Bar Chart")
コード例 #4
0
    def test_multi_page(self):
        """Create a page with multiple distributions on it."""
        dist_page = DistributionPage()

        dist_page.number_of_columns = 3

        for multi in range(self.num_multi):
            dist_info = []
            new_info = random_distribution()
            dist_info.append(new_info)

            distribution = BarChartDistribution(dist_info)
            distribution.chart_title = "Distribution %s" % (multi + 1)
            dist_page.distributions.append(distribution)

        dist_page.draw(self.multi_page, "Test Multi Bar Chart")