-
-
Notifications
You must be signed in to change notification settings - Fork 438
Closed
Labels
questionFurther information is requestedFurther information is requested
Description
I am trying to make a chart that will have visible x line as dotted line(that matches the position of the values(ticks?)), to have positive value have green color and fill and negative value to have red color and fill, both with gradient.
So far I have this:
{
uplotData: [
[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],
[5,-5, 0, 1,5,9,10,15,5,-10,-15,-20,-20,-5,0, 5]
],
uplotOpts: {
width: 100,
height: 50,
cursor: {
show: false
},
select: {
show: false,
},
legend: {
show: false
},
scales: {
x: {
time: false
}
},
axes: [
{
show: false,
},
{
show: false,
}
],
series: [
{},
{
stroke: "red",
width: 1,
fill: "rgba(255, 0, 0, 0.3)",
}
],
},
So far that will render me this:

Since the documentation is non-existent i checked the demos but I really don't get how that fill works or how to render that x- axis properly. I came from apex charts which could not render small charts without a ton of padding and chartjs documentation is horrible to go through.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested
