Пример #1
0
 def it_can_construct_a_new_chart_graphicFrame(
         self, new_chart_graphicFrame_fixture):
     id_, name, rId, x, y, cx, cy, expected_xml = (
         new_chart_graphicFrame_fixture)
     graphicFrame = CT_GraphicalObjectFrame.new_chart_graphicFrame(
         id_, name, rId, x, y, cx, cy)
     assert graphicFrame.xml == expected_xml
Пример #2
0
 def _new_chart_graphicFrame(self, rId, x, y, cx, cy):
     """
     Return a newly created `p:graphicFrame` element having the specified
     position and size and containing the chart identified by *rId*.
     """
     id_, name = self.shape_id, self.name
     return CT_GraphicalObjectFrame.new_chart_graphicFrame(
         id_, name, rId, x, y, cx, cy)
Пример #3
0
 def it_can_construct_a_new_chart_graphicFrame(
         self, new_chart_graphicFrame_fixture):
     id_, name, rId, x, y, cx, cy, expected_xml = (
         new_chart_graphicFrame_fixture
     )
     graphicFrame = CT_GraphicalObjectFrame.new_chart_graphicFrame(
         id_, name, rId, x, y, cx, cy
     )
     assert graphicFrame.xml == expected_xml
Пример #4
0
    def _add_chart_graphicFrame(self, rId, x, y, cx, cy):
        """Return new `p:graphicFrame` element appended to this shape tree.

        The `p:graphicFrame` element has the specified position and size and
        refers to the chart part identified by *rId*.
        """
        shape_id = self._next_shape_id
        name = "Chart %d" % (shape_id - 1)
        graphicFrame = CT_GraphicalObjectFrame.new_chart_graphicFrame(
            shape_id, name, rId, x, y, cx, cy)
        self._spTree.append(graphicFrame)
        return graphicFrame
Пример #5
0
 def _add_chart_graphicFrame(self, rId, x, y, cx, cy):
     """
     Add a new ``<p:graphicFrame>`` element to this shape tree having the
     specified position and size and referring to the chart part
     identified by *rId*.
     """
     shape_id = self._next_shape_id
     name = 'Chart %d' % (shape_id - 1)
     graphicFrame = CT_GraphicalObjectFrame.new_chart_graphicFrame(
         shape_id, name, rId, x, y, cx, cy)
     self._spTree.append(graphicFrame)
     return graphicFrame
Пример #6
0
    def _add_chart_graphicFrame(self, rId, x, y, cx, cy):
        """Return new `p:graphicFrame` element appended to this shape tree.

        The `p:graphicFrame` element has the specified position and size and
        refers to the chart part identified by *rId*.
        """
        shape_id = self._next_shape_id
        name = "Chart %d" % (shape_id - 1)
        graphicFrame = CT_GraphicalObjectFrame.new_chart_graphicFrame(
            shape_id, name, rId, x, y, cx, cy
        )
        self._spTree.append(graphicFrame)
        return graphicFrame