Files
tanami-admin-panel/src/Components/Doughnut/ApexLine.jsx

67 lines
1.6 KiB
React
Raw Normal View History

2024-08-12 17:23:56 +05:30
import React, { useState } from 'react';
2024-08-12 12:22:01 +05:30
import ReactApexChart from 'react-apexcharts';
2024-08-12 17:23:56 +05:30
function ApexLine() {
const [chartOptions, setChartOptions] = useState({
series: [{
name: 'Rate',
data: [45, 23, 70, 65, 5, 34, 32],
gradientToColors: ['#004017'],
}],
options: {
chart: {
height: 350,
type: 'line',
toolbar: {
show: false // Hide the action icons
}
},
stroke: {
width: 5,
curve: 'smooth',
colors: ['#598369'], // Customize the line color here
},
2024-08-12 12:22:01 +05:30
markers: {
size: 6, // Size of markers
2024-08-12 17:23:56 +05:30
colors: ['#004118'], // Marker (dot) color
strokeColor: '#fff', // Stroke color of the marker
2024-08-12 12:22:01 +05:30
strokeWidth: 2
},
2024-08-12 17:23:56 +05:30
xaxis: {
type: 'category', // Change from 'datetime' to 'category'
categories: ['BH', 'KW', 'OM', 'QA', 'SA', 'UAE', 'IND'],
tickAmount: 7
},
title: {
text: 'Exchange Rate Currency', // Adjust the title if needed
align: 'left',
style: {
fontSize: '15px',
color: '#000',
fontWeight: 400
}
},
fill: {
type: 'gradient',
gradient: {
shade: 'dark',
gradientToColors: ['#004017'],
shadeIntensity: 4,
type: 'horizontal',
opacityFrom: 1,
opacityTo: 1,
stops: [0, 100] // Gradient stops
},
}
2024-08-12 12:22:01 +05:30
}
2024-08-12 17:23:56 +05:30
});
2024-08-12 12:22:01 +05:30
return (
2024-08-12 17:23:56 +05:30
<div>
<ReactApexChart options={chartOptions.options} series={chartOptions.series} type="line" height={"100%"} width={"600"} />
2024-08-12 17:23:56 +05:30
</div>
2024-08-12 12:22:01 +05:30
);
2024-08-12 17:23:56 +05:30
}
2024-08-12 12:22:01 +05:30
export default ApexLine;