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

Implement legend.align: 'start'/'center'/'end' #6141

Merged
merged 5 commits into from Mar 23, 2019

Commits on Mar 18, 2019

  1. Fixes Issue chartjs#3175:

    - New config parameter options.legend.align, for controlling alignment of legend blocks in horizontal/vertical legends.
    - Maintains backward compatibility for legends positioned on the left/right by defaulting to 'start'.
    - Replacing nearby pixel unit tests for legend with image based tests
    - Documentation for options.legend.align
    Dave Kichler committed Mar 18, 2019
    Copy the full SHA
    c05a2a6 View commit details
    Browse the repository at this point in the history
  2. Addressing review comments:

    - whitespace as tabs only to align with project lint standards
    - replacing 'this' references with a local 'me' variable
    - removal of label text to avoid cross-platform font issues in image tests
    - added an image test for default alignment of 'start' for vertical legends (left/right)
    Dave Kichler committed Mar 18, 2019
    Copy the full SHA
    4081897 View commit details
    Browse the repository at this point in the history

Commits on Mar 20, 2019

  1. Addressing 2nd round of review feedback:

    - adding colour and removing borders from image tests for legend blocks.
    - corrected/adjusted all images in image tests
    - changed default align for vertical positioned legends to 'center'
    - refactored alignment offset function
    - removed superfluous 'line' variable
    - made consistent the check for moving to a new line/column between vertical/horizontal fit algorithm
    Dave Kichler committed Mar 20, 2019
    Copy the full SHA
    01f2876 View commit details
    Browse the repository at this point in the history
  2. Adding legend alignment image tests for bottom and right positioned l…

    …egends
    Dave Kichler committed Mar 20, 2019
    Copy the full SHA
    b750f79 View commit details
    Browse the repository at this point in the history
  3. Adjustment to legend fit algorithm to make vertical/horizontal more c…

    …onsistent and slightly more readable
    Dave Kichler committed Mar 20, 2019
    Copy the full SHA
    66c0632 View commit details
    Browse the repository at this point in the history