Skip to content

[BUG] Multiple scale titles are melded with vertical separator lines #4006

Description

@palkakrzysiek

Expected Behavior

While adding multiple scales, their titles shouldn't be melded with the vertical lines from previous scales
2017-03-10 17_06_26-clipboard

Current Behavior

...but they are.
2017-03-10 17_28_32-boneffice eta

Possible Solution

Add a 2 points padding while creating the label text

// Chart.js/src/core/core.scale.js
- scaleLabelX = isLeft ? me.left + (scaleLabelFont.size / 2) : me.right - (scaleLabelFont.size / 2);
+ scaleLabelX = isLeft ? me.left + (scaleLabelFont.size / 2) + 2 : me.right - (scaleLabelFont.size / 2) - 2;

It's enough to separate the text and the vertical line of the scale, and it doesn't interfere with values texts.

Steps to Reproduce (for bugs)

  1. Add multiple y scales

Environment

  • Chart.js version: 2.5

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions