Is it possible to make the legend box of dashed line in line chart to have no dashed border?
I read about generateLegend() and legendCallback but I can't understand how it works in react-chartjs-2 together with React functional component. Also, I'm not sure if they can be used to change the border style of legend.
This is my sample code:
import { Line } from "react-chartjs-2";
const LineChart = () => {
const data = {
labels: ["Jan", "Feb", "Mar", "Apr", "May", "Jun"],
datasets: [
{
label: "Line 1", data: [10, 10, 20, 20, 30, 30]
},
{
label: 'Line 2',
borderDash: [15, 5],
data: [20, 20, 20, 20, 20, 20],
}],
};
const options = {
legend: {
position: legendPosition,
align: legendAlign,
}
};
return <Line data={data} options={options} />
};
This is sample of desired Line 1(red) and Line 2(grey dahsed)