Quiero dar valores de cadena en el eje y de este gráfico. si le doy el número de su trabajo. pero la cadena no funciona. esto es react.js, ¿rechart no admite el valor de cadena? No obtuve ninguna respuesta de Google, así que opté aquí.
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> ); }