We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This only happens when the top edge of the annotation is positioned at the y-coordinate 0.
0
The bug is caused by a wrong null-check in
apexcharts.js/src/modules/annotations/YAxisAnnotations.js
Line 66 in 318bc91
y2
null
y2 || y1
y1
<script src="https://cdn.jsdelivr.net/npm/apexcharts"></script> <div id="chart"></div> <script> let chart = new ApexCharts(document.querySelector("#chart"), { chart: { type: 'line', width: 300, height: 200, toolbar: { show: false } }, series: [{ data: [0, 1] }], annotations: { yaxis: [ { y: 0.0, y2: 0.5, label: { text: '0.0 to 0.5', offsetX: -60, style: { background: '#00ff00' } } }, { y: 0.5, y2: 1.0, label: { text: '0.5 to 1.0', style: { background: '#ff0000' } } }, { y: 1.0, y2: 1.01, label: { text: '1.0 to 1.01', style: { background: '#ffff00' } } } ] } }); chart.render(); </script>
The green annotation should be at y=0.5, the red one at y=1.0, and the yellow one at y=1.01.
The red annotation is placed at y=0.5 instead of y=1.0
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Description
This only happens when the top edge of the annotation is positioned at the y-coordinate
0
.The bug is caused by a wrong null-check in
apexcharts.js/src/modules/annotations/YAxisAnnotations.js
Line 66 in 318bc91
If
y2
isnull
, theny2 || y1
is correct. Ify2
is0
, however, theny1
is wrongly used instead.Steps to Reproduce
Expected Behavior
The green annotation should be at y=0.5, the red one at y=1.0, and the yellow one at y=1.01.
Actual Behavior
The red annotation is placed at y=0.5 instead of y=1.0
Screenshots
The text was updated successfully, but these errors were encountered: