Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/openpyxl/chart/error_bar.py: 74%

Shortcuts on this page

r m x   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

31 statements  

1# Copyright (c) 2010-2024 openpyxl 

2 

3from openpyxl.descriptors.serialisable import Serialisable 

4from openpyxl.descriptors import ( 

5 Typed, 

6 Float, 

7 Set, 

8 Alias 

9) 

10 

11from openpyxl.descriptors.excel import ExtensionList 

12from openpyxl.descriptors.nested import ( 

13 NestedNoneSet, 

14 NestedSet, 

15 NestedBool, 

16 NestedFloat, 

17) 

18 

19from .data_source import NumDataSource 

20from .shapes import GraphicalProperties 

21 

22 

23class ErrorBars(Serialisable): 

24 

25 tagname = "errBars" 

26 

27 errDir = NestedNoneSet(values=(['x', 'y'])) 

28 direction = Alias("errDir") 

29 errBarType = NestedSet(values=(['both', 'minus', 'plus'])) 

30 style = Alias("errBarType") 

31 errValType = NestedSet(values=(['cust', 'fixedVal', 'percentage', 'stdDev', 'stdErr'])) 

32 size = Alias("errValType") 

33 noEndCap = NestedBool(nested=True, allow_none=True) 

34 plus = Typed(expected_type=NumDataSource, allow_none=True) 

35 minus = Typed(expected_type=NumDataSource, allow_none=True) 

36 val = NestedFloat(allow_none=True) 

37 spPr = Typed(expected_type=GraphicalProperties, allow_none=True) 

38 graphicalProperties = Alias("spPr") 

39 extLst = Typed(expected_type=ExtensionList, allow_none=True) 

40 

41 __elements__ = ('errDir','errBarType', 'errValType', 'noEndCap','minus', 'plus', 'val', 'spPr') 

42 

43 

44 def __init__(self, 

45 errDir=None, 

46 errBarType="both", 

47 errValType="fixedVal", 

48 noEndCap=None, 

49 plus=None, 

50 minus=None, 

51 val=None, 

52 spPr=None, 

53 extLst=None, 

54 ): 

55 self.errDir = errDir 

56 self.errBarType = errBarType 

57 self.errValType = errValType 

58 self.noEndCap = noEndCap 

59 self.plus = plus 

60 self.minus = minus 

61 self.val = val 

62 self.spPr = spPr