I want to give string values on the yaxis of this chart. if I give number its working. but string not working. this is react.js does rechart don't support string value.? i didn'tt get any answers from google so I opted here
const data=[{
"timestamp": 1645727400000,
"value": "test1"
},
{
"timestamp": 1645790232297,
"value": "test2"
},
{
"timestamp": 1645790232297,
"value": "test3"
},
{
"timestamp": 1645790232297,
"value": "test4"
},
{
"timestamp": 1645790232297,
"value": "test5"
}]
return (
<XAxis style={{fontSize:"12px"}} dataKey="timestamp" />
<YAxis />
<Tooltip />
<defs>
<linearGradient id="splitColor" x1="0" y1="0" x2="0" y2="1">
<stop offset={off} stopColor="green" stopOpacity={1} />
<stop offset={off} stopColor="red" stopOpacity={1} />
</linearGradient>
</defs>
<Area style={{fontSize:"12px"}}
type="monotone"
dataKey="value"
stroke="#000"
fill="url(#splitColor)"
/>
</AreaChart>
</ResponsiveContainer>
</Container>
);
}