FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Make line properties scriptable by janelledement · Pull Request #6128 · chartjs/Chart.js · GitHub

Make line properties scriptable - #6128

Merged
simonbrunel merged 29 commits into
chartjs:masterfrom
janelledement:make-all-line-properties-scriptable
Mar 21, 2019
Merged

Make line properties scriptable#6128
simonbrunel merged 29 commits into
chartjs:masterfrom
janelledement:make-all-line-properties-scriptable

Conversation

Copy link
Copy Markdown
Contributor

Background:

This PR introduces scriptable capability to these line options:

  • backgroundColor
  • borderColor
  • borderWidth
  • borderCapStyle
  • borderJoinStyle
  • borderDash
  • borderDashOffset
  • fill
  • cubicInterpolationMode

Testing:

Wrote fixture tests for all the line options listed above.

Updated a test in plugin.filler.tests.js: 'should ignore invalid values'. (This test formerly listed functions as an ignored value for 'fill').

Documentation:

Updated the line chart documentation to acknowledge that these line options are also scriptable.

Updated the line sample to demonstrate scriptable background color.

etimberg previously approved these changes Mar 14, 2019

etimberg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Just have one minor comment. looks good!

kurkle previously approved these changes Mar 14, 2019
etimberg previously approved these changes Mar 14, 2019
benmccann previously approved these changes Mar 15, 2019

simonbrunel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Nice work @janelledement!

I know it's a lot of work but I would change a few things in the unit tests. I would first make sure no element (line/point) are cut by setting layout padding. Else, some tests are useless (e.g. border cap). And I would make the scriptables simpler (no reduce()), easier to read and maintain.

Comment thread samples/scriptable/line.html Outdated
Comment thread samples/scriptable/line.html Outdated
Comment thread src/controllers/controller.line.js Outdated
Comment thread src/controllers/controller.line.js Outdated
exwm pushed a commit to exwm/Chart.js that referenced this pull request Apr 30, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

7 participants


Back | FazBrowse Home | New Git URL