question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Line is diagonal if yAxis options set

See original GitHub issue

If no title is set for yAxis, it behaves correctly, there is an horizontal line

But if we set a title, the line becomes diagonal:

To reproduce,

Go on https://www.chartjs.org/chartjs-plugin-annotation/master/guide/types/line.html#configuration and add in the options:

scales: {
    yAxis: {
        title: {
            display: true,
            text: "My First Dataset"
        }
    }
},

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
kurklecommented, Feb 10, 2022

I think we could improve the defaults to be the first axes in the chart, which would mean you only need to specify when more than two scales are involved. That would be a breaking change, so something to consider for v2.

1reaction
stockiNailcommented, Feb 10, 2022

I have set this issue and the PR #678 as breaking change because the x/yScaleID options defaults are changed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Axis Options for LAYOUT OVERLAY - SAS Help Center
For the Y and Y2 axes, the label is oriented vertically and is centered in the axis area (including the offsets). The label...
Read more >
Change the display of chart axes - Microsoft Support
Display or hide axes, or change other aspects of a chart axes in Excel, Word, ... or y axis), and a horizontal axis...
Read more >
Chart Js Change Label orientation on x-Axis for Line Charts
If you are using chart.js 2.x, just set maxRotation: 90 and minRotation: 90 in ticks options. It works for me! And if you...
Read more >
How to get horizontal lines instead of diagonal li...
How to get horizontal lines instead of diagonal lines in my line graph · 1. Create a calendar table: Table 2 = CALENDAR...
Read more >
Intercepts of lines review (x-intercepts and y-intercepts) (article)
The x-intercept is where a line crosses the x-axis, and the y-intercept is the point where the line crosses the y-axis. Thinking about...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found