forked from scanny/python-pptx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cht-legend-props.feature
82 lines (62 loc) · 3.11 KB
/
cht-legend-props.feature
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
Feature: Get and set legend properties
In order to customize the appearance of the legend on a chart
As a developer using python-pptx
I need a way to get and set legend properties
Scenario: Access legend font
Given a legend
Then legend.font is a Font object
Scenario Outline: Determine legend horizontal offset
Given a legend having horizontal offset of <value>
Then legend.horz_offset is <expected-value>
Examples: legend horizontal offset values
| value | expected-value |
| none | 0.0 |
| -0.5 | -0.5 |
| 0.42 | 0.42 |
Scenario Outline: Change legend horizontal offset
Given a legend having horizontal offset of <value>
When I assign <new-value> to legend.horz_offset
Then legend.horz_offset is <expected-value>
Examples: expected results of changing horz_offset
| value | new-value | expected-value |
| none | -1.0 | -1.0 |
| -0.5 | 0.5 | 0.5 |
| 0.42 | -0.5 | -0.5 |
| -0.5 | 0 | 0.0 |
Scenario Outline: Determine whether the legend is beside or overlays the chart
Given a legend with overlay setting of <setting>
Then legend.include_in_layout is <expected-value>
Examples: legend.include_in_layout expected values
| setting | expected-value |
| no explicit setting | True |
| True | True |
| False | False |
Scenario Outline: Change whether the legend is beside or overlays the chart
Given a legend with overlay setting of <setting>
When I assign <value> to legend.include_in_layout
Then legend.include_in_layout is <expected-value>
Examples: expected results of changing legend.include_in_layout
| setting | value | expected-value |
| no explicit setting | True | True |
| no explicit setting | False | False |
| True | False | False |
| True | True | True |
| False | True | True |
| False | False | False |
Scenario Outline: Determine legend position
Given a legend positioned <location> the chart
Then legend.position is <expected-value>
Examples: legend position values
| location | expected-value |
| at an unspecified location of | RIGHT |
| below | BOTTOM |
| to the right of | RIGHT |
Scenario Outline: Change legend position
Given a legend positioned <location> the chart
When I assign <new-value> to legend.position
Then legend.position is <expected-value>
Examples: expected results of changing legend.position
| location | new-value | expected-value |
| at an unspecified location of | RIGHT | RIGHT |
| below | TOP | TOP |
| to the right of | BOTTOM | BOTTOM |