<LineChart
config={{
data: chartData,
}}
/><LineChart
config={{
data: chartData,
hover: {
enabled: true,
showDot: true,
},
}}
/><LineChart
config={{
data: chartData,
hover: {
enabled: true,
showDot: true,
highlightLine: true,
},
}}
/><LineChart
config={{
data: chartData,
xAxis: {
enabled: true,
isTimeData: true,
},
yAxis: {
enabled: true,
},
}}
/><LineChart
config={{
data: chartData,
xAxis: {
enabled: true,
isTimeData: true,
showGridLines: true,
},
yAxis: {
enabled: true,
showGridLines: true,
},
}}
/><LineChart
config={{
data: chartData,
hover: {
enabled: true,
showDot: true,
highlightLine: true,
},
colors: {
lineBase: "#9EB1FF",
highlightColor: "#3E63DD",
dotBase: "#0090FF",
},
xAxis: {
enabled: true,
isTimeData: true,
showGridLines: true,
color: "#3E63DD",
gridLineColor: "#E0E7FF",
},
yAxis: {
enabled: true,
showGridLines: true,
color: "#3E63DD",
gridLineColor: "#E0E7FF",
},
}}
/><LineChart
config={{
series: [
{
id: "series1",
label: "Revenue",
data: revenueData,
colors: {
highlightColor: "#3E63DD",
lineBase: "#9EB1FF",
dotBase: "#0090FF",
},
},
{
id: "series2",
label: "Expenses",
data: expensesData,
colors: {
highlightColor: "#E5484D",
lineBase: "#FFBDBD",
dotBase: "#E5484D",
},
},
],
hover: {
enabled: true,
showDot: true,
highlightLine: true,
},
xAxis: {
enabled: true,
isTimeData: true,
showGridLines: true,
},
yAxis: {
enabled: true,
showGridLines: true,
},
}}
/><LineChart
config={{
data: chartData,
hover: {
enabled: true,
showDot: true,
tooltip: {
renderContent: (dataPoint) => (
<View style={styles.tooltip}>
<Text>{new Date(dataPoint.x).toLocaleDateString()}</Text>
<Text style={styles.value}>
{dataPoint.y.toFixed(2)}
</Text>
</View>
),
snapToPoint: true,
},
},
}}
/>