Other stepped options
- Dominant language
- JavaScript
- Stars
- 67.7k
- Forks
- 11.9k
- Avg merge
- 7h 39m
- Merged PRs (30d)
- 5
Description
### Feature Proposal
I need to have some other options to assign as stepped in line charts.
Besides after, before and middle...
- Could be good to have at less one I call it "down" where the segment "y" goes from higher value to lower it drops at the beginning, similar to "before" and when it goes from lower "y" to higher it if goes up at the end, similar to after:

- Another one is a mix, so it only work as stepped when "y" goes from lower to higher, in other case it doesn't do any step:

Ofcourse other cases in the other way around are very welcome.
### Possible Implementation
I already re-engineered my copy of Chartjs.js even the code is very good and it works properly:
` //function Fe(t,e,i,s,n){if(!e)return t.lineTo(i.x,i.y);if("middle"===n){const s=(e.x+i.x)/2;t.lineTo(s,e.y),t.lineTo(s,i.y)}else"after"===n!=!!s?t.lineTo(e.x,i.y):t.lineTo(i.x,e.y);t.lineTo(i.x,i.y)}
function Fe(t,e,i,s,n)
{
if(!e)return t.lineTo(i.x,i.y);
if("middle"===n)
{
const s=(e.x+i.x)/2;
t.lineTo(s,e.y),t.lineTo(s,i.y)
}
else if ("after"===n!=!!s)
{t.lineTo(e.x,i.y) }
else if ("down"===n)
{
if (e.y>=i.y)
{
t.lineTo(i.x,e.y)
}
else{
t.lineTo(e.x,i.y)
}
}
else if ("onlyup"===n)
{
if (e.y>=i.y)
{
t.lineTo(i.x,e.y)
}
else{
t.lineTo(i.x,i.y)
}
}
else { t.lineTo(i.x,e.y);}
t.lineTo(i.x,i.y)
}`
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.