protected function writeAxisStyle(Chart $chart)
{
$chartType = $chart->getPlotArea()->getType();
// AxisX
// style:style
$this->xmlContent->startElement('style:style');
$this->xmlContent->writeAttribute('style:name', 'styleAxisX');
$this->xmlContent->writeAttribute('style:family', 'chart');
// style:style > style:chart-properties
$this->xmlContent->startElement('style:chart-properties');
$this->xmlContent->writeAttribute('chart:display-label', 'true');
$this->xmlContent->writeAttribute('chart:tick-marks-major-inner', 'false');
$this->xmlContent->writeAttribute('chart:tick-marks-major-outer', 'false');
if ($chartType instanceof AbstractTypePie) {
$this->xmlContent->writeAttribute('chart:reverse-direction', 'true');
}
$this->xmlContent->endElement();
// style:style > style:text-properties
$oFont = $chart->getPlotArea()->getAxisX()->getFont();
$this->xmlContent->startElement('style:text-properties');
$this->xmlContent->writeAttribute('fo:color', '#' . $oFont->getColor()->getRGB());
$this->xmlContent->writeAttribute('fo:font-family', $oFont->getName());
$this->xmlContent->writeAttribute('fo:font-size', $oFont->getSize() . 'pt');
$this->xmlContent->writeAttribute('fo:font-style', $oFont->isItalic() ? 'italic' : 'normal');
$this->xmlContent->endElement();
// style:style > style:graphic-properties
$this->xmlContent->startElement('style:graphic-properties');
$this->xmlContent->writeAttribute('svg:stroke-width', '0.026cm');
$this->xmlContent->writeAttribute('svg:stroke-color', '#878787');
$this->xmlContent->endElement();
// ##style:style
$this->xmlContent->endElement();
// AxisX GridLines Major
$this->writeGridlineStyle($chart->getPlotArea()->getAxisX()->getMajorGridlines(), 'styleAxisXGridlinesMajor');
// AxisX GridLines Minor
$this->writeGridlineStyle($chart->getPlotArea()->getAxisX()->getMinorGridlines(), 'styleAxisXGridlinesMinor');
// AxisY
// style:style
$this->xmlContent->startElement('style:style');
$this->xmlContent->writeAttribute('style:name', 'styleAxisY');
$this->xmlContent->writeAttribute('style:family', 'chart');
// style:style > style:chart-properties
$this->xmlContent->startElement('style:chart-properties');
$this->xmlContent->writeAttribute('chart:display-label', 'true');
$this->xmlContent->writeAttribute('chart:tick-marks-major-inner', 'false');
$this->xmlContent->writeAttribute('chart:tick-marks-major-outer', 'false');
if ($chartType instanceof AbstractTypePie) {
$this->xmlContent->writeAttribute('chart:reverse-direction', 'true');
}
$this->xmlContent->endElement();
// style:style > style:text-properties
$oFont = $chart->getPlotArea()->getAxisY()->getFont();
$this->xmlContent->startElement('style:text-properties');
$this->xmlContent->writeAttribute('fo:color', '#' . $oFont->getColor()->getRGB());
$this->xmlContent->writeAttribute('fo:font-family', $oFont->getName());
$this->xmlContent->writeAttribute('fo:font-size', $oFont->getSize() . 'pt');
$this->xmlContent->writeAttribute('fo:font-style', $oFont->isItalic() ? 'italic' : 'normal');
$this->xmlContent->endElement();
// style:graphic-properties
$this->xmlContent->startElement('style:graphic-properties');
$this->xmlContent->writeAttribute('svg:stroke-width', '0.026cm');
$this->xmlContent->writeAttribute('svg:stroke-color', '#878787');
$this->xmlContent->endElement();
// ## style:style
$this->xmlContent->endElement();
// AxisY GridLines Major
$this->writeGridlineStyle($chart->getPlotArea()->getAxisY()->getMajorGridlines(), 'styleAxisYGridlinesMajor');
// AxisY GridLines Minor
$this->writeGridlineStyle($chart->getPlotArea()->getAxisY()->getMinorGridlines(), 'styleAxisYGridlinesMinor');
}