I'm trying to draw a limited dashed line with CSS, I mean that the number of dashes will be limited, For example, if the limit number will be 3 the line will be: _____ _____ _____
Currently, I'm using a percentage calculation to get the same result but not sure it's durable.
Current:
grid: { line: { stroke: theme.palette.secondary.main , strokeWidth: 1, strokeDasharray: "32% 2%"} },
Desirable:
grid: { line: { stroke: theme.palette.secondary.main , strokeWidth: 1, strokeDasharray: "1rem 0.2rem" numberOfdashes: 3} },