Open marcelomunozr opened 4 years ago
@marcelomunozr Were you able to solve the problem?
@GleidsonDaniel at the moment I have this solution ...
const [indexPuntoSeleccionado, setIndexPuntoSeleccionado] = useState(0);
const renderChart = () => {
const white = '#ffffff';
const primary = '#295EFF';
return (
<LineChart
onDataPointClick={(info) => {
const {
index,
} = info;
console.log('IndexMarkerChart', index);
setIndexPuntoSeleccionado(index);
}}
getDotColor={(value, index) => (index === indexPuntoSeleccionado ? (white) : (primary))}
{...OTHER_PROPS}
/>
);
};
if i find some way to modify the stroke i will post it, At the moment there is no other solution
@marcelomunozr I have a solution to let you change the stroke color to your desire design.
You can use the getDotProps getDotProps={(value, index) => ({ r: '7', strokeWidth: '5', stroke: index !== selectedPoint(coming from the onDataPointClick prop) ? 'red' : 'yellow, })}
I need to change the stroke color of a selected point. It only allows you to change the color of the point, but not the stroke.
this i did:
this i need:
I love this package, please help me.
react-native-chart-kit