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

Implement per-dataset type (default and per-chart) options by benmccann · Pull Request #5999 · chartjs/Chart.js · GitHub

Implement per-dataset type (default and per-chart) options - #5999

Merged
simonbrunel merged 11 commits into
chartjs:masterfrom
benmccann:controller-default-opts
May 6, 2019
Merged

Implement per-dataset type (default and per-chart) options#5999
simonbrunel merged 11 commits into
chartjs:masterfrom
benmccann:controller-default-opts

Conversation

Copy link
Copy Markdown
Contributor

This fixes mixed line and scatter charts. Issue described in #4587

Closes #5997 & #5151

kurkle 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

After the discussion in Slack, this seems like a good start!

Comment thread karma.conf.js Outdated
Comment thread src/controllers/controller.line.js Outdated
Comment thread src/controllers/controller.line.js Outdated
Comment thread src/core/core.datasetController.js Outdated
Comment thread src/controllers/controller.line.js Outdated
benmccann force-pushed the controller-default-opts branch 5 times, most recently from 15dd6bf to 0b86cf9 Compare January 21, 2019 18:46
Comment thread src/controllers/controller.line.js Outdated
Comment thread src/core/core.datasetController.js Outdated
kurkle previously approved these changes Jan 22, 2019

kurkle 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

Looks good to me

Comment thread src/core/core.defaults.js

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

A minor update in _defaults.

We also need unit tests per controller (line + scatter) to make sure that dataset defaults are correctly handled for every options. And I guess we also need to update the docs about configuring dataset defaults.

Comment thread src/core/core.datasetController.js Outdated

Copy link
Copy Markdown
Contributor Author

We also need unit tests per controller (line + scatter) to make sure that dataset defaults are correctly handled for every options.

The line chart showLine option was already well tested. I added additional tests for spanGaps and for scatter's showLine.

And I guess we also need to update the docs about configuring dataset defaults.

We don't allow users to configure default options. defaults._set is private

benmccann force-pushed the controller-default-opts branch 4 times, most recently from 3c0bad6 to 1be7103 Compare January 29, 2019 17:25

kurkle 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

One line to remove and a question to consider.

Comment thread src/controllers/controller.line.js Outdated

Copy link
Copy Markdown
Member

We don't allow users to configure default options. defaults._set is private

_set is indeed an internal helper but users are allowed to modify Chart.defaults.datasets.*. So since we are introducing a new public API that allows users to configure defaults for all dataset options, we should also add unit tests for it.

Copy link
Copy Markdown
Contributor Author

Ok, I went ahead and added documentation. I had already added unit tests

Comment thread docs/configuration/README.md Outdated
benmccann force-pushed the controller-default-opts branch 5 times, most recently from b0bd6f4 to 5c3f88f Compare February 12, 2019 04:20
exwm pushed a commit to exwm/Chart.js that referenced this pull request Apr 30, 2021

Copy link
Copy Markdown

I want to combined the candlestick chart with a line chart. Is that possible, and if so, how?

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.

6 participants


Back | FazBrowse Home | New Git URL