Line is diagonal if yAxis options set
See original GitHub issueIf 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:
- Created 2 years ago
- Comments:7 (1 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
I have set this issue and the PR #678 as breaking change because the
x/yScaleID
options defaults are changed.