Beispiel #1
0
 def __getitem__(self, index):
     xCharts = self._plotArea.xCharts
     if isinstance(index, slice):
         plots = [PlotFactory(xChart, self._chart) for xChart in xCharts]
         return plots[index]
     else:
         xChart = xCharts[index]
         return PlotFactory(xChart, self._chart)
 def has_data_labels_set_fixture(self, request):
     xChart_cxml, new_value, expected_cxml = request.param
     # apply extended suffix to replace trailing '+' where present
     if expected_cxml.endswith("+"):
         expected_cxml = expected_cxml[:-1] + (
             "(c:showLegendKey{val=0},c:showVal{val=1},c:showCatName{val="
             "0},c:showSerName{val=0},c:showPercent{val=0},c:showBubbleSi"
             "ze{val=0},c:showLeaderLines{val=1})")
     plot = PlotFactory(element(xChart_cxml), None)
     expected_xml = xml(expected_cxml)
     return plot, new_value, expected_xml
 def chart_type_fixture(self, request):
     xChart_cxml, expected_chart_type = request.param
     plot = PlotFactory(element(xChart_cxml), None)
     return plot, expected_chart_type
 def it_contructs_a_plot_object_from_a_plot_element(self, call_fixture):
     xChart, chart_, PlotClass_, plot_ = call_fixture
     plot = PlotFactory(xChart, chart_)
     PlotClass_.assert_called_once_with(xChart, chart_)
     assert plot is plot_
Beispiel #5
0
 def categories_get_fixture(self, request):
     xChart_cxml, expected_value = request.param
     plot = PlotFactory(element(xChart_cxml), None)
     return plot, expected_value