xanderdeseyn / react-native-responsive-linechart

A customizable and responsive line or area chart for react-native
https://react-native-responsive-linechart.surge.sh
MIT License
202 stars 46 forks source link

Is there any way to initially show all tooltips #184

Open kailashAppDev opened 7 months ago

kailashAppDev commented 7 months ago

Is there any possible way to initially showcase the tooltip values or data points ` <Line theme={{ stroke: { color: theme.colors.secondary, width: 1 }, scatter: { default: { width: 10, height: 10, rx: 5, color: theme.colors.active, }, selected: { color: theme.colors.secondary }, },

    }}
    initialTooltipIndex={0}
    tooltipComponent={(
      <Tooltip
        theme={{
          label: {
            color: theme.colors.secondary,
            fontSize: 16,
            fontWeight: 700,
            visible: true,
          },
          shape: {
            width: 30,
            height: 20,
            dx: 0,
            dy: 20,
            rx: 4,
            color: theme.colors.textBold,
          },
          formatter: ChartDataPoint => currencyFormatter(ChartDataPoint.y),
        }}
      />

    )}
  /> `
  or can we pass array of numbers to  initialTooltipIndex