Complex classes like ObjectsChart often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes. You can also have a look at the cohesion graph to spot any un-connected, or weakly-connected components.
Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.
While breaking up the class, it is a good idea to analyze how other classes use ObjectsChart, and based on these observations, apply Extract Interface, too.
| 1 | <?php |
||
| 23 | class ObjectsChart extends AbstractDecoratorWriter |
||
| 24 | { |
||
| 25 | /** |
||
| 26 | * @var XMLWriter |
||
| 27 | */ |
||
| 28 | protected $xmlContent; |
||
| 29 | /** |
||
| 30 | * @var mixed |
||
| 31 | */ |
||
| 32 | protected $arrayData; |
||
| 33 | /** |
||
| 34 | * @var mixed |
||
| 35 | */ |
||
| 36 | protected $arrayTitle; |
||
| 37 | /** |
||
| 38 | * @var integer |
||
| 39 | */ |
||
| 40 | protected $numData; |
||
| 41 | /** |
||
| 42 | * @var integer |
||
| 43 | */ |
||
| 44 | protected $numSeries; |
||
| 45 | /** |
||
| 46 | * @var string |
||
| 47 | */ |
||
| 48 | protected $rangeCol; |
||
| 49 | |||
| 50 | /** |
||
| 51 | * @return ZipInterface |
||
| 52 | */ |
||
| 53 | 61 | public function render() |
|
| 54 | { |
||
| 55 | 61 | foreach ($this->getArrayChart() as $keyChart => $shapeChart) { |
|
| 56 | 24 | $content = $this->writeContentPart($shapeChart); |
|
| 57 | |||
| 58 | 24 | if (!empty($content)) { |
|
| 59 | 24 | $this->getZip()->addFromString('Object '.$keyChart.'/content.xml', $content); |
|
| 60 | } |
||
| 61 | } |
||
| 62 | |||
| 63 | 61 | return $this->getZip(); |
|
| 64 | } |
||
| 65 | |||
| 66 | /** |
||
| 67 | * @param Chart $chart |
||
| 68 | * @return string |
||
| 69 | * @throws \Exception |
||
| 70 | */ |
||
| 71 | 24 | protected function writeContentPart(Chart $chart) |
|
| 72 | { |
||
| 73 | 24 | $this->xmlContent = new XMLWriter(XMLWriter::STORAGE_MEMORY); |
|
| 74 | |||
| 75 | 24 | $chartType = $chart->getPlotArea()->getType(); |
|
| 76 | |||
| 77 | // Data |
||
| 78 | 24 | $this->arrayData = array(); |
|
| 79 | 24 | $this->arrayTitle = array(); |
|
| 80 | 24 | $this->numData = 0; |
|
| 81 | 24 | foreach ($chartType->getSeries() as $series) { |
|
| 82 | 22 | $inc = 0; |
|
| 83 | 22 | $this->arrayTitle[] = $series->getTitle(); |
|
| 84 | 22 | foreach ($series->getValues() as $key => $value) { |
|
| 85 | 22 | if (!isset($this->arrayData[$inc])) { |
|
| 86 | 22 | $this->arrayData[$inc] = array(); |
|
| 87 | } |
||
| 88 | 22 | if (empty($this->arrayData[$inc])) { |
|
| 89 | 22 | $this->arrayData[$inc][] = $key; |
|
| 90 | } |
||
| 91 | 22 | $this->arrayData[$inc][] = $value; |
|
| 92 | 22 | $inc++; |
|
| 93 | } |
||
| 94 | 22 | if ($inc > $this->numData) { |
|
| 95 | 22 | $this->numData = $inc; |
|
| 96 | } |
||
| 97 | } |
||
| 98 | |||
| 99 | // office:document-content |
||
| 100 | 24 | $this->xmlContent->startElement('office:document-content'); |
|
| 101 | 24 | $this->xmlContent->writeAttribute('xmlns:office', 'urn:oasis:names:tc:opendocument:xmlns:office:1.0'); |
|
| 102 | 24 | $this->xmlContent->writeAttribute('xmlns:style', 'urn:oasis:names:tc:opendocument:xmlns:style:1.0'); |
|
| 103 | 24 | $this->xmlContent->writeAttribute('xmlns:text', 'urn:oasis:names:tc:opendocument:xmlns:text:1.0'); |
|
| 104 | 24 | $this->xmlContent->writeAttribute('xmlns:table', 'urn:oasis:names:tc:opendocument:xmlns:table:1.0'); |
|
| 105 | 24 | $this->xmlContent->writeAttribute('xmlns:draw', 'urn:oasis:names:tc:opendocument:xmlns:drawing:1.0'); |
|
| 106 | 24 | $this->xmlContent->writeAttribute('xmlns:fo', 'urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0'); |
|
| 107 | 24 | $this->xmlContent->writeAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink'); |
|
| 108 | 24 | $this->xmlContent->writeAttribute('xmlns:dc', 'http://purl.org/dc/elements/1.1/'); |
|
| 109 | 24 | $this->xmlContent->writeAttribute('xmlns:meta', 'urn:oasis:names:tc:opendocument:xmlns:meta:1.0'); |
|
| 110 | 24 | $this->xmlContent->writeAttribute('xmlns:number', 'urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0'); |
|
| 111 | 24 | $this->xmlContent->writeAttribute('xmlns:svg', 'urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0'); |
|
| 112 | 24 | $this->xmlContent->writeAttribute('xmlns:chart', 'urn:oasis:names:tc:opendocument:xmlns:chart:1.0'); |
|
| 113 | 24 | $this->xmlContent->writeAttribute('xmlns:dr3d', 'urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0'); |
|
| 114 | 24 | $this->xmlContent->writeAttribute('xmlns:math', 'http://www.w3.org/1998/Math/MathML'); |
|
| 115 | 24 | $this->xmlContent->writeAttribute('xmlns:form', 'urn:oasis:names:tc:opendocument:xmlns:form:1.0'); |
|
| 116 | 24 | $this->xmlContent->writeAttribute('xmlns:script', 'urn:oasis:names:tc:opendocument:xmlns:script:1.0'); |
|
| 117 | 24 | $this->xmlContent->writeAttribute('xmlns:ooo', 'http://openoffice.org/2004/office'); |
|
| 118 | 24 | $this->xmlContent->writeAttribute('xmlns:ooow', 'http://openoffice.org/2004/writer'); |
|
| 119 | 24 | $this->xmlContent->writeAttribute('xmlns:oooc', 'http://openoffice.org/2004/calc'); |
|
| 120 | 24 | $this->xmlContent->writeAttribute('xmlns:dom', 'http://www.w3.org/2001/xml-events'); |
|
| 121 | 24 | $this->xmlContent->writeAttribute('xmlns:xforms', 'http://www.w3.org/2002/xforms'); |
|
| 122 | 24 | $this->xmlContent->writeAttribute('xmlns:xsd', 'http://www.w3.org/2001/XMLSchema'); |
|
| 123 | 24 | $this->xmlContent->writeAttribute('xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance'); |
|
| 124 | 24 | $this->xmlContent->writeAttribute('xmlns:rpt', 'http://openoffice.org/2005/report'); |
|
| 125 | 24 | $this->xmlContent->writeAttribute('xmlns:of', 'urn:oasis:names:tc:opendocument:xmlns:of:1.2'); |
|
| 126 | 24 | $this->xmlContent->writeAttribute('xmlns:xhtml', 'http://www.w3.org/1999/xhtml'); |
|
| 127 | 24 | $this->xmlContent->writeAttribute('xmlns:grddl', 'http://www.w3.org/2003/g/data-view#'); |
|
| 128 | 24 | $this->xmlContent->writeAttribute('xmlns:tableooo', 'http://openoffice.org/2009/table'); |
|
| 129 | 24 | $this->xmlContent->writeAttribute('xmlns:chartooo', 'http://openoffice.org/2010/chart'); |
|
| 130 | 24 | $this->xmlContent->writeAttribute('xmlns:drawooo', 'http://openoffice.org/2010/draw'); |
|
| 131 | 24 | $this->xmlContent->writeAttribute('xmlns:calcext', 'urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0'); |
|
| 132 | 24 | $this->xmlContent->writeAttribute('xmlns:loext', 'urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0'); |
|
| 133 | 24 | $this->xmlContent->writeAttribute('xmlns:field', 'urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0'); |
|
| 134 | 24 | $this->xmlContent->writeAttribute('xmlns:formx', 'urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0'); |
|
| 135 | 24 | $this->xmlContent->writeAttribute('xmlns:css3t', 'http://www.w3.org/TR/css3-text/'); |
|
| 136 | 24 | $this->xmlContent->writeAttribute('office:version', '1.2'); |
|
| 137 | |||
| 138 | // office:automatic-styles |
||
| 139 | 24 | $this->xmlContent->startElement('office:automatic-styles'); |
|
| 140 | |||
| 141 | // Chart |
||
| 142 | 24 | $this->writeChartStyle($chart); |
|
| 143 | |||
| 144 | // Axis |
||
| 145 | 24 | $this->writeAxisStyle($chart); |
|
| 146 | |||
| 147 | // Series |
||
| 148 | 24 | $this->numSeries = 0; |
|
| 149 | 24 | foreach ($chartType->getSeries() as $series) { |
|
| 150 | 22 | $this->writeSeriesStyle($chart, $series); |
|
| 151 | |||
| 152 | 22 | $this->numSeries++; |
|
| 153 | } |
||
| 154 | |||
| 155 | // Floor |
||
| 156 | 24 | $this->writeFloorStyle(); |
|
| 157 | |||
| 158 | // Legend |
||
| 159 | 24 | $this->writeLegendStyle($chart); |
|
| 160 | |||
| 161 | // PlotArea |
||
| 162 | 24 | $this->writePlotAreaStyle($chart); |
|
| 163 | |||
| 164 | // Title |
||
| 165 | 24 | $this->writeTitleStyle($chart->getTitle()); |
|
| 166 | |||
| 167 | // Wall |
||
| 168 | 24 | $this->writeWallStyle($chart); |
|
| 169 | |||
| 170 | // > office:automatic-styles |
||
| 171 | 24 | $this->xmlContent->endElement(); |
|
| 172 | |||
| 173 | // office:body |
||
| 174 | 24 | $this->xmlContent->startElement('office:body'); |
|
| 175 | // office:chart |
||
| 176 | 24 | $this->xmlContent->startElement('office:chart'); |
|
| 177 | // office:chart |
||
| 178 | 24 | $this->xmlContent->startElement('chart:chart'); |
|
| 179 | 24 | $this->xmlContent->writeAttribute('svg:width', Text::numberFormat(CommonDrawing::pixelsToCentimeters($chart->getWidth()), 3) . 'cm'); |
|
| 180 | 24 | $this->xmlContent->writeAttribute('svg:height', Text::numberFormat(CommonDrawing::pixelsToCentimeters($chart->getHeight()), 3) . 'cm'); |
|
| 181 | 24 | $this->xmlContent->writeAttribute('xlink:href', '.'); |
|
| 182 | 24 | $this->xmlContent->writeAttribute('xlink:type', 'simple'); |
|
| 183 | 24 | $this->xmlContent->writeAttribute('chart:style-name', 'styleChart'); |
|
| 184 | 24 | $this->xmlContent->writeAttributeIf($chartType instanceof Area, 'chart:class', 'chart:area'); |
|
| 185 | 24 | $this->xmlContent->writeAttributeIf($chartType instanceof AbstractTypeBar, 'chart:class', 'chart:bar'); |
|
| 186 | 24 | if (!($chartType instanceof Doughnut)) { |
|
| 187 | 23 | $this->xmlContent->writeAttributeIf($chartType instanceof AbstractTypePie, 'chart:class', 'chart:circle'); |
|
| 188 | } |
||
| 189 | 24 | $this->xmlContent->writeAttributeIf($chartType instanceof Doughnut, 'chart:class', 'chart:ring'); |
|
| 190 | 24 | $this->xmlContent->writeAttributeIf($chartType instanceof Line, 'chart:class', 'chart:line'); |
|
| 191 | 24 | $this->xmlContent->writeAttributeIf($chartType instanceof Scatter, 'chart:class', 'chart:scatter'); |
|
| 192 | |||
| 193 | //**** Title **** |
||
| 194 | 24 | $this->writeTitle($chart->getTitle()); |
|
| 195 | |||
| 196 | //**** Legend **** |
||
| 197 | 24 | $this->writeLegend($chart); |
|
| 198 | |||
| 199 | //**** Plotarea **** |
||
| 200 | 24 | $this->writePlotArea($chart); |
|
| 201 | |||
| 202 | //**** Table **** |
||
| 203 | 24 | $this->writeTable(); |
|
| 204 | |||
| 205 | // > chart:chart |
||
| 206 | 24 | $this->xmlContent->endElement(); |
|
| 207 | // > office:chart |
||
| 208 | 24 | $this->xmlContent->endElement(); |
|
| 209 | // > office:body |
||
| 210 | 24 | $this->xmlContent->endElement(); |
|
| 211 | // > office:document-content |
||
| 212 | 24 | $this->xmlContent->endElement(); |
|
| 213 | |||
| 214 | 24 | return $this->xmlContent->getData(); |
|
| 215 | } |
||
| 216 | |||
| 217 | /** |
||
| 218 | * @param Chart $chart |
||
| 219 | */ |
||
| 220 | 24 | private function writeAxis(Chart $chart) |
|
| 221 | { |
||
| 222 | 24 | $chartType = $chart->getPlotArea()->getType(); |
|
| 223 | |||
| 224 | // chart:axis |
||
| 225 | 24 | $this->xmlContent->startElement('chart:axis'); |
|
| 226 | 24 | $this->xmlContent->writeAttribute('chart:dimension', 'x'); |
|
| 227 | 24 | $this->xmlContent->writeAttribute('chart:name', 'primary-x'); |
|
| 228 | 24 | $this->xmlContent->writeAttribute('chartooo:axis-type', 'text'); |
|
| 229 | 24 | $this->xmlContent->writeAttribute('chart:style-name', 'styleAxisX'); |
|
| 230 | // chart:axis > chart:categories |
||
| 231 | 24 | $this->xmlContent->startElement('chart:categories'); |
|
| 232 | 24 | $this->xmlContent->writeAttribute('table:cell-range-address', 'table-local.$A$2:.$A$'.($this->numData+1)); |
|
| 233 | 24 | $this->xmlContent->endElement(); |
|
| 234 | // chart:axis > chart:grid |
||
| 235 | 24 | $this->writeGridline($chart->getPlotArea()->getAxisX()->getMajorGridlines(), 'styleAxisXGridlinesMajor', 'major'); |
|
| 236 | // chart:axis > chart:grid |
||
| 237 | 24 | $this->writeGridline($chart->getPlotArea()->getAxisX()->getMinorGridlines(), 'styleAxisXGridlinesMinor', 'minor'); |
|
| 238 | // ##chart:axis |
||
| 239 | 24 | $this->xmlContent->endElement(); |
|
| 240 | |||
| 241 | // chart:axis |
||
| 242 | 24 | $this->xmlContent->startElement('chart:axis'); |
|
| 243 | 24 | $this->xmlContent->writeAttribute('chart:dimension', 'y'); |
|
| 244 | 24 | $this->xmlContent->writeAttribute('chart:name', 'primary-y'); |
|
| 245 | 24 | $this->xmlContent->writeAttribute('chart:style-name', 'styleAxisY'); |
|
| 246 | // chart:axis > chart:grid |
||
| 247 | 24 | $this->writeGridline($chart->getPlotArea()->getAxisY()->getMajorGridlines(), 'styleAxisYGridlinesMajor', 'major'); |
|
| 248 | // chart:axis > chart:grid |
||
| 249 | 24 | $this->writeGridline($chart->getPlotArea()->getAxisY()->getMinorGridlines(), 'styleAxisYGridlinesMinor', 'minor'); |
|
| 250 | // ##chart:axis |
||
| 251 | 24 | $this->xmlContent->endElement(); |
|
| 252 | |||
| 253 | 24 | if ($chartType instanceof Bar3D || $chartType instanceof Pie3D) { |
|
| 254 | // chart:axis |
||
| 255 | 5 | $this->xmlContent->startElement('chart:axis'); |
|
| 256 | 5 | $this->xmlContent->writeAttribute('chart:dimension', 'z'); |
|
| 257 | 5 | $this->xmlContent->writeAttribute('chart:name', 'primary-z'); |
|
| 258 | // > chart:axis |
||
| 259 | 5 | $this->xmlContent->endElement(); |
|
| 260 | } |
||
| 261 | 24 | } |
|
| 262 | |||
| 263 | 24 | protected function writeGridline($oGridlines, $styleName, $chartClass) |
|
| 274 | |||
| 275 | /** |
||
| 276 | * @param Chart $chart |
||
| 277 | * @todo Set function in \PhpPresentation\Shape\Chart\Axis for defining width and color of the axis |
||
| 278 | */ |
||
| 279 | 24 | protected function writeAxisStyle(Chart $chart) |
|
| 280 | { |
||
| 281 | 24 | $chartType = $chart->getPlotArea()->getType(); |
|
| 282 | |||
| 283 | // AxisX |
||
| 284 | // style:style |
||
| 285 | 24 | $this->xmlContent->startElement('style:style'); |
|
| 286 | 24 | $this->xmlContent->writeAttribute('style:name', 'styleAxisX'); |
|
| 287 | 24 | $this->xmlContent->writeAttribute('style:family', 'chart'); |
|
| 288 | // style:style > style:chart-properties |
||
| 289 | 24 | $this->xmlContent->startElement('style:chart-properties'); |
|
| 290 | 24 | $this->xmlContent->writeAttribute('chart:display-label', 'true'); |
|
| 291 | 24 | $this->xmlContent->writeAttribute('chart:tick-marks-major-inner', 'false'); |
|
| 292 | 24 | $this->xmlContent->writeAttribute('chart:tick-marks-major-outer', 'false'); |
|
| 293 | 24 | if ($chartType instanceof AbstractTypePie) { |
|
| 294 | 5 | $this->xmlContent->writeAttribute('chart:reverse-direction', 'true'); |
|
| 295 | } |
||
| 296 | 24 | if ($chart->getPlotArea()->getAxisX()->getMinBounds() != null) { |
|
|
|
|||
| 297 | 1 | $this->xmlContent->writeAttribute('chart:minimum', $chart->getPlotArea()->getAxisX()->getMinBounds()); |
|
| 298 | } |
||
| 299 | 24 | if ($chart->getPlotArea()->getAxisX()->getMaxBounds() != null) { |
|
| 300 | 1 | $this->xmlContent->writeAttribute('chart:maximum', $chart->getPlotArea()->getAxisX()->getMaxBounds()); |
|
| 301 | } |
||
| 302 | 24 | $this->xmlContent->endElement(); |
|
| 303 | // style:style > style:text-properties |
||
| 304 | 24 | $oFont = $chart->getPlotArea()->getAxisX()->getFont(); |
|
| 305 | 24 | $this->xmlContent->startElement('style:text-properties'); |
|
| 306 | 24 | $this->xmlContent->writeAttribute('fo:color', '#'.$oFont->getColor()->getRGB()); |
|
| 307 | 24 | $this->xmlContent->writeAttribute('fo:font-family', $oFont->getName()); |
|
| 308 | 24 | $this->xmlContent->writeAttribute('fo:font-size', $oFont->getSize().'pt'); |
|
| 309 | 24 | $this->xmlContent->writeAttribute('fo:font-style', $oFont->isItalic() ? 'italic' : 'normal'); |
|
| 310 | 24 | $this->xmlContent->endElement(); |
|
| 311 | // style:style > style:graphic-properties |
||
| 312 | 24 | $this->xmlContent->startElement('style:graphic-properties'); |
|
| 313 | 24 | $this->xmlContent->writeAttribute('svg:stroke-width', '0.026cm'); |
|
| 314 | 24 | $this->xmlContent->writeAttribute('svg:stroke-color', '#878787'); |
|
| 315 | 24 | $this->xmlContent->endElement(); |
|
| 316 | // ##style:style |
||
| 317 | 24 | $this->xmlContent->endElement(); |
|
| 318 | |||
| 319 | // AxisX GridLines Major |
||
| 320 | 24 | $this->writeGridlineStyle($chart->getPlotArea()->getAxisX()->getMajorGridlines(), 'styleAxisXGridlinesMajor'); |
|
| 321 | |||
| 322 | // AxisX GridLines Minor |
||
| 323 | 24 | $this->writeGridlineStyle($chart->getPlotArea()->getAxisX()->getMinorGridlines(), 'styleAxisXGridlinesMinor'); |
|
| 324 | |||
| 325 | // AxisY |
||
| 326 | // style:style |
||
| 327 | 24 | $this->xmlContent->startElement('style:style'); |
|
| 328 | 24 | $this->xmlContent->writeAttribute('style:name', 'styleAxisY'); |
|
| 329 | 24 | $this->xmlContent->writeAttribute('style:family', 'chart'); |
|
| 330 | // style:style > style:chart-properties |
||
| 331 | 24 | $this->xmlContent->startElement('style:chart-properties'); |
|
| 332 | 24 | $this->xmlContent->writeAttribute('chart:display-label', 'true'); |
|
| 333 | 24 | $this->xmlContent->writeAttribute('chart:tick-marks-major-inner', 'false'); |
|
| 334 | 24 | $this->xmlContent->writeAttribute('chart:tick-marks-major-outer', 'false'); |
|
| 335 | 24 | if ($chartType instanceof AbstractTypePie) { |
|
| 336 | 5 | $this->xmlContent->writeAttribute('chart:reverse-direction', 'true'); |
|
| 337 | } |
||
| 338 | 24 | if ($chart->getPlotArea()->getAxisY()->getMinBounds() != null) { |
|
| 339 | $this->xmlContent->writeAttribute('chart:minimum', $chart->getPlotArea()->getAxisY()->getMinBounds()); |
||
| 340 | } |
||
| 341 | 24 | if ($chart->getPlotArea()->getAxisY()->getMaxBounds() != null) { |
|
| 342 | $this->xmlContent->writeAttribute('chart:maximum', $chart->getPlotArea()->getAxisY()->getMaxBounds()); |
||
| 343 | } |
||
| 344 | 24 | $this->xmlContent->endElement(); |
|
| 345 | // style:style > style:text-properties |
||
| 346 | 24 | $oFont = $chart->getPlotArea()->getAxisY()->getFont(); |
|
| 347 | 24 | $this->xmlContent->startElement('style:text-properties'); |
|
| 348 | 24 | $this->xmlContent->writeAttribute('fo:color', '#'.$oFont->getColor()->getRGB()); |
|
| 349 | 24 | $this->xmlContent->writeAttribute('fo:font-family', $oFont->getName()); |
|
| 350 | 24 | $this->xmlContent->writeAttribute('fo:font-size', $oFont->getSize().'pt'); |
|
| 351 | 24 | $this->xmlContent->writeAttribute('fo:font-style', $oFont->isItalic() ? 'italic' : 'normal'); |
|
| 352 | 24 | $this->xmlContent->endElement(); |
|
| 353 | // style:graphic-properties |
||
| 354 | 24 | $this->xmlContent->startElement('style:graphic-properties'); |
|
| 355 | 24 | $this->xmlContent->writeAttribute('svg:stroke-width', '0.026cm'); |
|
| 356 | 24 | $this->xmlContent->writeAttribute('svg:stroke-color', '#878787'); |
|
| 357 | 24 | $this->xmlContent->endElement(); |
|
| 358 | // ## style:style |
||
| 359 | 24 | $this->xmlContent->endElement(); |
|
| 360 | |||
| 361 | // AxisY GridLines Major |
||
| 362 | 24 | $this->writeGridlineStyle($chart->getPlotArea()->getAxisY()->getMajorGridlines(), 'styleAxisYGridlinesMajor'); |
|
| 363 | |||
| 364 | // AxisY GridLines Minor |
||
| 365 | 24 | $this->writeGridlineStyle($chart->getPlotArea()->getAxisY()->getMinorGridlines(), 'styleAxisYGridlinesMinor'); |
|
| 366 | 24 | } |
|
| 367 | |||
| 368 | /** |
||
| 369 | * @param Chart\Gridlines $oGridlines |
||
| 370 | * @param string $styleName |
||
| 371 | */ |
||
| 372 | 24 | protected function writeGridlineStyle($oGridlines, $styleName) |
|
| 389 | |||
| 390 | /** |
||
| 391 | * @param Chart $chart |
||
| 392 | */ |
||
| 393 | 24 | private function writeChartStyle(Chart $chart) |
|
| 408 | |||
| 409 | 24 | private function writeFloor() |
|
| 417 | |||
| 418 | 24 | private function writeFloorStyle() |
|
| 436 | |||
| 437 | /** |
||
| 438 | * @param Chart $chart |
||
| 439 | */ |
||
| 440 | 24 | private function writeLegend(Chart $chart) |
|
| 470 | |||
| 471 | /** |
||
| 472 | * @param Chart $chart |
||
| 473 | */ |
||
| 474 | 24 | private function writeLegendStyle(Chart $chart) |
|
| 496 | |||
| 497 | /** |
||
| 498 | * @param Chart $chart |
||
| 499 | */ |
||
| 500 | 24 | private function writePlotArea(Chart $chart) |
|
| 551 | |||
| 552 | /** |
||
| 553 | * @param Chart $chart |
||
| 554 | * @link : http://books.evc-cit.info/odbook/ch08.html#chart-plot-area-section |
||
| 555 | */ |
||
| 556 | 24 | private function writePlotAreaStyle(Chart $chart) |
|
| 604 | |||
| 605 | /** |
||
| 606 | * @param Chart $chart |
||
| 607 | * @param Chart\Series $series |
||
| 608 | * @throws \Exception |
||
| 609 | */ |
||
| 610 | 22 | private function writeSeries(Chart $chart, Chart\Series $series) |
|
| 678 | |||
| 679 | /** |
||
| 680 | * @param Chart $chart |
||
| 681 | * @param Chart\Series $series |
||
| 682 | */ |
||
| 683 | 22 | private function writeSeriesStyle(Chart $chart, Chart\Series $series) |
|
| 814 | |||
| 815 | /** |
||
| 816 | */ |
||
| 817 | 24 | private function writeTable() |
|
| 904 | |||
| 905 | /** |
||
| 906 | * @param Title $oTitle |
||
| 907 | */ |
||
| 908 | 24 | private function writeTitle(Title $oTitle) |
|
| 926 | |||
| 927 | /** |
||
| 928 | * @param Title $oTitle |
||
| 929 | */ |
||
| 930 | 24 | private function writeTitleStyle(Title $oTitle) |
|
| 950 | |||
| 951 | 24 | private function writeWall() |
|
| 959 | |||
| 960 | /** |
||
| 961 | * @param Chart $chart |
||
| 962 | */ |
||
| 963 | 24 | private function writeWallStyle(Chart $chart) |
|
| 988 | } |
||
| 989 |