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

Line scriptable options #5973

Merged
merged 14 commits into from Jan 15, 2019
Merged

Conversation

etimberg
Copy link
Member

Background

This PR introduces scriptable configuration options for points on line charts. The user can script the styling and interaction options.

Testing

The existing unit tests covering the setHoverStyle dataset controller method were removed as they did not have proper setup for use with scriptable options.

Fixture based tests were written to test:

  • pointBackgroundColor
  • pointBorderColor
  • pointBorderWidth
  • pointRadius
  • pointRotation
  • pointStyle

Documentation

I updated the line chart documentation to match the style of the bubble & bar charts. It may be a good idea to split the Styling section of the documents into Line Styling and Point Styling. If there is agreement on that change I can go ahead and make the update.

docs/charts/line.md Outdated Show resolved Hide resolved
src/controllers/controller.line.js Outdated Show resolved Hide resolved
src/controllers/controller.line.js Show resolved Hide resolved
docs/charts/line.md Outdated Show resolved Hide resolved
benmccann
benmccann previously approved these changes Jan 11, 2019
@nagix
Copy link
Contributor

nagix commented Jan 11, 2019

It may be a good idea to split the Styling section of the documents into Line Styling and Point Styling.

I agree this because it is a long list and Line Styling and Point Styling options fallback differently.

kurkle
kurkle previously approved these changes Jan 11, 2019
@etimberg etimberg dismissed stale reviews from kurkle and benmccann via 29fe1f2 January 11, 2019 12:55
@etimberg
Copy link
Member Author

I quickly split the table into two sections: Point Properties and Line Properties. I will edit the copy again this evening.

@simonbrunel
Copy link
Member

@etimberg I would not split the options table which gives a complete overview of all the dataset options but I would split only the styling section (Line Styling and Point Styling as you suggested).

nagix
nagix previously approved these changes Jan 12, 2019
kurkle
kurkle previously approved these changes Jan 12, 2019
docs/charts/line.md Show resolved Hide resolved
docs/charts/line.md Show resolved Hide resolved
Copy link
Member

@simonbrunel simonbrunel left a comment

Choose a reason for hiding this comment

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

Awesome work @etimberg, thanks!

@simonbrunel simonbrunel merged commit a655da0 into chartjs:master Jan 15, 2019
@etimberg etimberg deleted the line-scriptable-options branch October 27, 2019 20:46
exwm pushed a commit to exwm/Chart.js that referenced this pull request Apr 30, 2021
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.

None yet

5 participants