Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/openpyxl/chart/stock_chart.py: 73%
30 statements
« prev ^ index » next coverage.py v7.3.3, created at 2023-12-20 06:34 +0000
« prev ^ index » next coverage.py v7.3.3, created at 2023-12-20 06:34 +0000
1# Copyright (c) 2010-2023 openpyxl
3from openpyxl.descriptors.serialisable import Serialisable
4from openpyxl.descriptors import (
5 Typed,
6 Sequence,
7 Alias,
8)
9from openpyxl.descriptors.excel import ExtensionList
11from ._chart import ChartBase
12from .axis import TextAxis, NumericAxis, ChartLines
13from .updown_bars import UpDownBars
14from .label import DataLabelList
15from .series import Series
18class StockChart(ChartBase):
20 tagname = "stockChart"
22 ser = Sequence(expected_type=Series) #min 3, max4
23 dLbls = Typed(expected_type=DataLabelList, allow_none=True)
24 dataLabels = Alias('dLbls')
25 dropLines = Typed(expected_type=ChartLines, allow_none=True)
26 hiLowLines = Typed(expected_type=ChartLines, allow_none=True)
27 upDownBars = Typed(expected_type=UpDownBars, allow_none=True)
28 extLst = Typed(expected_type=ExtensionList, allow_none=True)
30 x_axis = Typed(expected_type=TextAxis)
31 y_axis = Typed(expected_type=NumericAxis)
33 _series_type = "line"
35 __elements__ = ('ser', 'dLbls', 'dropLines', 'hiLowLines', 'upDownBars',
36 'axId')
38 def __init__(self,
39 ser=(),
40 dLbls=None,
41 dropLines=None,
42 hiLowLines=None,
43 upDownBars=None,
44 extLst=None,
45 **kw
46 ):
47 self.ser = ser
48 self.dLbls = dLbls
49 self.dropLines = dropLines
50 self.hiLowLines = hiLowLines
51 self.upDownBars = upDownBars
52 self.x_axis = TextAxis()
53 self.y_axis = NumericAxis()
54 super(StockChart, self).__init__(**kw)