-
Hi, i need to create a area chart for stock 1day performance. I need to create something like this:: Of course only the charting part is of relevance here. Thanks for hints if Apex can do this. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Here is a starting point at least, based on what I just scraped together from Googling. Not sure it's satisfactory though. var options = { var chart = new ApexCharts(document.querySelector("#chart"), options); chart.render(); |
Beta Was this translation helpful? Give feedback.
-
Upgrade to [email protected] and see this example https://apexcharts.com/javascript-chart-demos/area-charts/negative/ |
Beta Was this translation helpful? Give feedback.
Here is a starting point at least, based on what I just scraped together from Googling. Not sure it's satisfactory though.
var options = {
chart: {
height: 380,
type: "area"
},
series: [
{
name: "Series 1",
data: [23, -7, -45, -8, 32, 45,20, 23, -7, -45, -8, -32, 45,-20, -23, -7, -45, -8, 32, 45,]
}
],
plotOptions: {
area: {
fillTo: origin,
}
},
colors: ['#00FFAF'], // Starting color greenish
fill: {
type: 'gradient',
gradient: {
gradientToColors: ['#FF0000'], // Finishing color red
opacityFrom: 1,
opacityTo: 1,
stops: [0,100,100,100]
}
},
stroke: {
width: 0
},
xaxis: {
categories: [
"01 Jan",
"02 Jan",
"03 Jan",
"04 Jan",
"05 Jan",
"06 Jan",
"07 Jan"
]
}
};
var chart = new ApexCharts(doc…