Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Option for Dynamic Chart Legend Position #1699 #1922

Merged
merged 9 commits into from
Feb 9, 2021

Conversation

csk83
Copy link
Contributor

@csk83 csk83 commented Aug 31, 2020

Description

Currently thechart legend position cannot be altered via an option. This release fixes that by adding in an option in getStyle to set the legend position. It's using the ISO standards for adding it.
(#1699)

Checklist:

  • I have run composer run-script check --timeout=0 and no errors were reported
  • The new code is covered by unit tests (check build/coverage for coverage report)
  • I have updated the documentation to describe the changes

* Writer/Part/chart.php - Add dynamic Legend positions

The position of the legend of charts was always fixed to the right. Adding in the option to set it dynamically via a new option under styles/chart

* Update Styles/Chart.php

Add in the public functions to getStyle() to get and set the legend position
* Writer/Part/Chart.php Add dynamic Legend positions

The position of the legend of charts was always fixed to the right. Adding in the option to set it dynamically via a new option under styles/chart

* Update Syle/Chart.php

Add in the public functions to getStyle() to get and set the legend position
Add Option for Dynamic Chart Legend Position
@troosan troosan added this to the v0.18.0 milestone Feb 7, 2021
@troosan troosan merged commit 4840faa into PHPOffice:develop Feb 9, 2021
protected static function parseHorizRule($node, $element)
{
$styles = self::parseInlineStyle($node);

// <hr> is implemented as an empty paragraph - extending 100% inside the section
// Some properties may be controlled, e.g. <hr style="border-bottom: 3px #DDDDDD solid; margin-bottom: 0;">

$fontStyle = $styles + ['size' => 3];
$fontStyle = $styles + array('size' => 3);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why you changed [] => array() ???

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/PHPOffice/PHPWord/blob/develop/src/PhpWord/Shared/Html.php
To keep the same code style. Other code of 'Html.php' file use 'array()' instead of '[]' too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants