Chart.js icon indicating copy to clipboard operation
Chart.js copied to clipboard

BorderOffset Not working

Open amankadamciq opened this issue 1 year ago • 3 comments

Expected behavior

The Y Axis should show a dotted line when the dash is set in the config for the Y Axis.

Current behavior

The Y Axis does not show a dotted line when the dash is set in the config for the Y Axis.

Reproducible sample

https://codepen.io/leelenaleee/pen/WNyJXEe

Optional extra steps/info to reproduce

No response

Possible solution

No response

Context

No response

chart.js version

v3.9.1

Browser name and version

No response

Link to your project

No response

amankadamciq avatar Jul 27 '24 13:07 amankadamciq

Chart.js v3 is not supported anymore, also a reproducible sample is required. You have provided the default template. Please add a reproducible sample in V4

LeeLenaleee avatar Aug 08 '24 18:08 LeeLenaleee

@LeeLenaleee this is the updated code and its chartjs v4

var ctx = document.getElementById("myChart"); var myChart = new Chart(ctx, { type: 'line', data: { labels: ["Red", "Blue", "Yellow", "Green", "Purple", "Orange"], datasets: [{ label: '# of Votes', data: [12, 19, 3, 5, 2, 3] }] }, options: { scales: { y: { border: { color: 'blue', borderWidth: 2, dash: [2, 2] }, } } } });

amankadamciq avatar Aug 09 '24 12:08 amankadamciq

This is currently not fixable, the dash is now used for the gridlines instead of the border.

We can only fix this in V5 by splitting it up and moving the current dash to the grid namespace where it belongs and use this dash for the border

LeeLenaleee avatar Aug 22 '24 19:08 LeeLenaleee