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 a separate labelDrawTime option #275

Merged
merged 4 commits into from
Jan 2, 2021

Commits on Jan 2, 2021

  1. Implement a separate labelDrawTime option

    Implementation notes:
    
    Since not all annotation types implement labels, the `drawLabel` method is optional.
    
    If the `labelDrawTime` option isn't specified, then it checks the individual annotation's `drawTime` option, then the chart-wide annotation plugin's `labelDrawTime` option, then the chart-wide annotation plugin's `drawTime` option. This means that you can't override an individual annotation's `drawTime` without also affecting its `labelDrawTime`, but I think it's the more intuitive and backward-compatible behavior.
    
    Since the option should default to `drawTime` if not set, I did not add it to the `defaults` object. Please let me know if I've misunderstood how plugins' default options should be implemented.
    joshkel committed Jan 2, 2021
    Configuration menu
    Copy the full SHA
    42a0f94 View commit details
    Browse the repository at this point in the history
  2. Switch to label.drawTime

    As suggested in code review.
    joshkel committed Jan 2, 2021
    Configuration menu
    Copy the full SHA
    95afb10 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d9758bc View commit details
    Browse the repository at this point in the history
  4. Update type definitions

    joshkel committed Jan 2, 2021
    Configuration menu
    Copy the full SHA
    78e4add View commit details
    Browse the repository at this point in the history