/usr/lib/python2.7/dist-packages/openpyxl/chart/trendline.py is in python-openpyxl 2.4.9-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 83 84 85 86 87 88 89 90 91 92 93 94 95 96 | from openpyxl.descriptors.serialisable import Serialisable
from openpyxl.descriptors import (
Typed,
String,
Alias
)
from openpyxl.descriptors.excel import ExtensionList
from openpyxl.descriptors.nested import (
NestedBool,
NestedInteger,
NestedFloat,
NestedSet
)
from .data_source import NumFmt
from .shapes import GraphicalProperties
from .text import RichText, Text
from .layout import Layout
class TrendlineLabel(Serialisable):
tagname = "trendlineLbl"
layout = Typed(expected_type=Layout, allow_none=True)
tx = Typed(expected_type=Text, allow_none=True)
numFmt = Typed(expected_type=NumFmt, allow_none=True)
spPr = Typed(expected_type=GraphicalProperties, allow_none=True)
graphicalProperties = Alias("spPr")
txPr = Typed(expected_type=RichText, allow_none=True)
textProperties = Alias("txPr")
extLst = Typed(expected_type=ExtensionList, allow_none=True)
__elements__ = ('layout', 'tx', 'numFmt', 'spPr', 'txPr')
def __init__(self,
layout=None,
tx=None,
numFmt=None,
spPr=None,
txPr=None,
extLst=None,
):
self.layout = layout
self.tx = tx
self.numFmt = numFmt
self.spPr = spPr
self.txPr = txPr
class Trendline(Serialisable):
tagname = "trendline"
name = String(allow_none=True)
spPr = Typed(expected_type=GraphicalProperties, allow_none=True)
graphicalProperties = Alias('spPr')
trendlineType = NestedSet(values=(['exp', 'linear', 'log', 'movingAvg', 'poly', 'power']))
order = NestedInteger(allow_none=True)
period = NestedInteger(allow_none=True)
forward = NestedFloat(allow_none=True)
backward = NestedFloat(allow_none=True)
intercept = NestedFloat(allow_none=True)
dispRSqr = NestedBool(allow_none=True)
dispEq = NestedBool(allow_none=True)
trendlineLbl = Typed(expected_type=TrendlineLabel, allow_none=True)
extLst = Typed(expected_type=ExtensionList, allow_none=True)
__elements__ = ('name', 'spPr', 'trendlineType', 'order', 'period',
'forward', 'backward', 'intercept', 'dispRSqr', 'dispEq', 'trendlineLbl')
def __init__(self,
name=None,
spPr=None,
trendlineType='linear',
order=None,
period=None,
forward=None,
backward=None,
intercept=None,
dispRSqr=None,
dispEq=None,
trendlineLbl=None,
extLst=None,
):
self.name = name
self.spPr = spPr
self.trendlineType = trendlineType
self.order = order
self.period = period
self.forward = forward
self.backward = backward
self.intercept = intercept
self.dispRSqr = dispRSqr
self.dispEq = dispEq
self.trendlineLbl = trendlineLbl
|