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

Charts: lineShadow option #138

Merged
merged 7 commits into from
Aug 21, 2017

Conversation

kajda90
Copy link

@kajda90 kajda90 commented Aug 11, 2017

This PR includes:

  • New chart data option lineShadow that accepts the same object as text shadow option and enables author to hide the shadow when 'none' set.
  • Function createShadowElement that transforms shadow options (merged with defaults) to a:innerShdw or a:outerShdw element.
  • Function correctShadowOptions that performs validity checks (originally, this check was included in addText function, but now it's required in line chart as well) and corrects the values if needed.
  • Constants for text shadow and data line shadow defaults.
  • Readme update (also added mention of lineSize option – I've found out it had been already implemented but not mentioned in docs).

Note: I've added the possibility to pass none string instead of an object to the lineShadow property to enforce hiding the shadow. It preserves backward compatibility (currently, data line shadow is visible by default). But personally, no shadow should be used by default in general I think. I'd suggest not to display any shadow until the lineShadow property is set (then, using none wouldn't be needed anymore). But it corrupts backward compatibility. However, this is a decision up to you, @gitbrent 🙂

Michal Kacerovsky added 6 commits August 11, 2017 09:53
…ndles defaults for not passed options. Used in creating text element.
* no shadow state handled
* shadow props correction moved to a separate function and used when creating a line chart
@gitbrent gitbrent self-requested a review August 15, 2017 04:14
@gitbrent gitbrent self-assigned this Aug 15, 2017
gitbrent pushed a commit that referenced this pull request Aug 21, 2017
@gitbrent gitbrent merged commit 11e0bc3 into gitbrent:master Aug 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants